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 ActivatePassiveWithIcyVeins() { //Arrange FrostMage sut = new FrostMage("Erystrazsa", health, healthRegeneration, new List <Action>() { new IcyVeins("ICY VEINS", 3, 3, 3) }, armor, mana, manaRegen, spellPower); //Act sut.ActivatePassive("ICY VEINS", sut); //Assert Assert.IsTrue(sut.IcyVeins); Assert.AreEqual(0, sut.PassiveDuration); Assert.AreEqual(-1, sut.FrostArmorDuration); Assert.AreEqual(2, sut.IcyVeinsDuration); }
public void ExecuteAgressiveAction(Hero player, Hero enemy) { FrostMage mage = (FrostMage)player; if (mage.IcyVeins) { enemy.TakeDamage((int)(this.Damage * 1.5)); mage.IcyVeinsDuration--; } else { enemy.TakeDamage(this.Damage); } if (mage.IcyVeinsDuration <= 0) { mage.IcyVeins = false; } player.Actions.Where(a => a.Name == this.Name).First().SetCooldown(AbilityCooldownConstants.FrostBoltCooldown); }
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); } }