Esempio n. 1
0
        public Shaman()
        {
            spell_power = 0;
            spell_crit_rating = 0;
            spell_haste_rating = 0;
            intellect = 0;
            BlessingOfKings = false;
            Misery = false;
            SpellCritBonus = 0.152; //0.022 is a base shaman's crit chance, w/o intellect and crit rating and we get 0.1 from talents and 0.03 from totem
            SpellPowerBonus = 101;  //totem
            SpellCritRatingBonus = 0;
            IntellectBonus = 0;

            HyjalExaltedRing = false;
            TheLightningCapacitor = false;
            HexShrunkenHead = false;
            SkullOfGuldan = false;
            SkycallTotem = false;

            //mana cost and casting time include modifications by talents, but base damage doesn't
            //using broken spell coefficients here
            LightningBolt = new Spell("Lightning Bolt", 563, 643, 270, 2, 0.714, 1);
            ChainLightning = new Spell("Chain Lightning", 734, 838, 684, 1.5, 0.641, 1);

            max_mana = 2958 + (Intellect < 20 ? Intellect : 20 + 15 * (Intellect - 20));
            CurrentMana = max_mana;
        }
        public SpellbookLevel(string levelText)
        {
            allSpells = new ObservableCollection<Spell>();
            casterSpells = new ObservableCollection<Spell>();
            string[] schools = levelText.Split('#');

            foreach (string school in schools)
            {
                string[] spellsFromSchool = school.Split('!');
                for (int i = 1; i < spellsFromSchool.Count(); i++)
                {
                    string[] spellSegments = spellsFromSchool[i].Split(':');
                    Spell spell = new Spell();
                    spell.spellName = spellSegments[0];
                    spell.spellSchool = spellsFromSchool[0];
                    allSpells.Add(spell);
                }
            }
        }