Esempio n. 1
0
    /**
     * Returns the characters highest skill level from any guild.
     * FromGuild will be set to the guild with the highest fighting value.
     */
    public static float CharacterGeneralAbility(MDRCharacter character, MDRSkill skill, out MDRGuild fromGuild)
    {
        fromGuild = null;
        float bestSkill = 0;

        foreach (MDRGuild guild in CoM.Guilds)
        {
            float skillLevel = CharacterGeneralAbilityFromGuild(character, guild, guild.SkillRate[skill.ID], skill.LearningDifficulty);
            if (skillLevel > bestSkill)
            {
                fromGuild = guild;
                bestSkill = skillLevel;
            }
        }
        return(bestSkill);
    }
Esempio n. 2
0
        public override string LongDescription()
        {
            string magicSchools = "";

            for (var lp = 0; lp < CoM.SpellClasses.Count; lp++)
            {
                MDRSpellClass sc    = CoM.SpellClasses[lp];
                MDRSkill      skill = sc.Skill;
                if (skill != null)
                {
                    if (SkillRate[skill.ID] > 0)
                    {
                        magicSchools += sc + ",";
                    }
                }
            }
            if (magicSchools != "")
            {
                magicSchools = magicSchools.TrimEnd(',');
            }

            return(Name + " may cast spells from [" + magicSchools + "]");
        }
Esempio n. 3
0
    /** Returns the characters highest skill level from any guild.  fromGuild will be set to the guild with the highest fighting value */
    public static float CharacterGeneralAbility(MDRCharacter character, MDRSkill skill)
    {
        MDRGuild guild;

        return(CharacterGeneralAbility(character, skill, out guild));
    }