public static void CreateMage(string playerName, string typeOfMage) { List <Models.Action> actions = new List <Models.Action>(); if (typeOfMage == "FIRE") { actions.Add(new FireBlast("FIRE BLAST", Constants.BaseCooldown, Constants.MageManaRegen, Constants.MageSpellPower)); actions.Add(new FireArmor("ARMOR OF FIRE", Constants.BaseCooldown, 150, Constants.MageSpellPower, 400)); actions.Add(new PyroBlast("PYROBLAST", Constants.BaseCooldown, 200, Constants.MageSpellPower * 5)); actions.Add(new Incinerate("INCINERATE", Constants.BaseCooldown, 0, 800)); Hero fireMage = new FireMage(playerName, Constants.MageHealth, Constants.MageHealthRegen , actions, Constants.HeroBaseArmor, Constants.MageMana, Constants.MageManaRegen, Constants.MageSpellPower); players.Add(fireMage); } else if (typeOfMage == "ARCANE") { actions.Add(new ArcaneBlast("ARCANE BLAST", Constants.BaseCooldown, Constants.MageManaRegen, Constants.MageSpellPower)); actions.Add(new AmplifyMagic("AMPLIFY MAGIC", Constants.BaseCooldown, 200)); actions.Add(new Polymorph("POLYMORPH", Constants.BaseCooldown, 300)); actions.Add(new ManaRegeneration("MANA REGENERATION", Constants.BaseCooldown, 0, Constants.MageManaRegen * 4)); Hero arcaneMage = new ArcaneMage(playerName, Constants.MageHealth, Constants.MageHealthRegen , actions, Constants.HeroBaseArmor, Constants.MageMana, Constants.MageManaRegen, Constants.MageSpellPower); players.Add(arcaneMage); } else { actions.Add(new FrostBolt("FROST BOLT", Constants.BaseCooldown, Constants.MageManaRegen, Constants.MageSpellPower)); actions.Add(new FrostArmor("FROSTED ARMOR", Constants.BaseCooldown, 200, 200, 20)); actions.Add(new IcyVeins("ICY VEINS", Constants.BaseCooldown, 300, 50)); actions.Add(new FrozenGround("FROZEN GROUND", Constants.BaseCooldown, 400, Constants.MageSpellPower * 2)); Hero frostMage = new FrostMage(playerName, Constants.MageHealth, Constants.MageHealthRegen , actions, Constants.HeroBaseArmor, Constants.MageMana, Constants.MageManaRegen, Constants.MageSpellPower); players.Add(frostMage); } }
private FireMage getInstance() { if (instance == null) { instance = this; HeroPool.GetInstance().SetHero(this, CommonConfig.FireMage); LevelManager = new MageLeveling(this, FireMageConfig.Level); } return(instance); }
public void ExecuteAgressiveAction(Hero player, Hero enemy) { enemy.TakeDamage(this.Damage); player.Actions.Where(a => a.Name == this.Name).First().SetCooldown(AbilityCooldownConstants.PyroBlastCooldown); FireMage fireMage = (FireMage)player; fireMage.PassiveDuration--; if (fireMage.PassiveDuration <= 0) { fireMage.FireArmored = false; } }
public void FireMageGoLevel2() { FireMage fireMage = gameObject.AddComponent <FireMage>(); fireMage.LoadAttr(); fireMage.LevelManager = new MageLeveling(fireMage, 1); fireMage.LevelManager.AddEXP(700); Assert.AreEqual(2, fireMage.LevelManager.Level); Assert.AreEqual(110f, fireMage.MaxHPValue); Assert.AreEqual(3f, fireMage.ATKValue); Assert.AreEqual(28f, fireMage.MATKValue); }
public void ActivatePassiveWithFireArmor() { //Arrange FireMage sut = new FireMage("Erystrazsa", health, healthRegeneration, new List <Action>() { new FireArmor("FIRE ARMOR", 3, 3, 4, 10) }, armor, mana, manaRegen, spellPower); //Act sut.ActivatePassive("FIRE ARMOR", sut); //Assert Assert.IsTrue(sut.FireArmored); Assert.AreEqual(3, sut.PassiveDuration); }