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); } }
public void ExecuteAgressiveAction(Hero player, Hero enemy) { enemy.StunnedDuration += AbilityDurationConstants.PolymorphDuration; player.Actions.Where(a => a.Name == this.Name).First().SetCooldown(AbilityCooldownConstants.PolymorphCooldown); ArcaneMage mage = (ArcaneMage)player; mage.PassiveDuration--; if (mage.PassiveDuration <= 0) { mage.IsAmplified = false; } }
public void ActivatePassiveWithAmplifyMagic() { //Arrange ArcaneMage sut = new ArcaneMage("Erystrazsa", health, healthRegeneration, new List <Action>() { new AmplifyMagic("AMPLIFY MAGIC", 5, 3) }, armor, mana, manaRegen, spellPower); //Act sut.ActivatePassive("AMPLIFY MAGIC", sut); //Assert Assert.IsTrue(sut.IsAmplified); Assert.AreEqual(3, sut.PassiveDuration); }
public void ExecuteAgressiveAction(Hero player, Hero enemy) { ArcaneMage playerOnTurn = (ArcaneMage)player; if (playerOnTurn.IsAmplified) { enemy.TakeDamage(this.Damage * 2); } else { enemy.TakeDamage(this.Damage); } playerOnTurn.PassiveDuration--; if (playerOnTurn.PassiveDuration <= 0) { playerOnTurn.IsAmplified = false; } }
private static bool GetClassTypePassive(Type typeOfHero, Hero player) { switch (typeOfHero.Name) { case "BerserkerWarrior": BerserkerWarrior berserker = (BerserkerWarrior)player; return(berserker.IsBerserk); case "FrostMage": FrostMage frost = (FrostMage)player; return(frost.IcyVeins); case "ArcaneMage": ArcaneMage arcane = (ArcaneMage)player; return(arcane.IsAmplified); case "ShadowPriest": ShadowPriest shadowPriest = (ShadowPriest)player; return(shadowPriest.S****t); default: return(false); } }