Ejemplo n.º 1
0
        public void RefreshData(bool statChange, Overseer os = null)
        {
            SpellType[] sts = new SpellType[] { SpellType.Ressurect, SpellType.DrainEssence, SpellType.DeadAgain, SpellType.RestoreEssence, SpellType.ClearDead };

            foreach (SpellType st in sts)
            {
                spell_data[st] = new Spell_Stats(spell_data[st]);
                spell_data[st].Info.Picture = spell_types[st].Texture;

                if (statChange && st != SpellType.ClearDead)
                {
                    var uspell = new Spell_Stats(spell_data[st]);
                    var nspell = Spell_Stats.Empty();
                    nspell.Cost    = spell_data[st].OriginalCost + (float)((os.Zombies.Count * (spell_data[st].OriginalCost * 0.05)));
                    uspell         = Spell_Stats.SetCost(uspell, nspell);
                    spell_data[st] = new Spell_Stats(uspell);
                }
            }
        }