Esempio n. 1
0
        public SpellCasterStats SpellCasterStatsForSpell(Spell spell)
        {
            SpellCasterStats stats = new SpellCasterStats();

            stats.SpellPower = SpellPower;

            stats.SkillLevel = SecondarySkillLevel.None;
            foreach (SecondarySkill skill in SecondarySkills)
            {
                if (spell.IsAffectedBySecondarySkillType(skill.GetType()))
                {
                    if (stats.SkillLevel < skill.SkillLevel)
                    {
                        stats.SkillLevel = skill.SkillLevel;
                    }
                }
            }

            if (spell.GetType() == Hero.SpecializedSpell)
            {
                stats.IsSpecialized       = true;
                stats.SpecializationLevel = Level;
            }

            return(stats);
        }
Esempio n. 2
0
        protected Spell(string name, Type secondarySkillType, int level)
        {
            Name = name;
            SecondarySkillType = secondarySkillType;
            Level = level;

            CasterStats = new SpellCasterStats();
        }
Esempio n. 3
0
        protected Spell(string name, Type secondarySkillType, int level)
        {
            Name = name;
            SecondarySkillType = secondarySkillType;
            Level = level;

            CasterStats = new SpellCasterStats();
        }