public void TestNormalVSWaterSpellCards() { var normal = new NormalSpell() { Damage = 20 }; var water = new WaterSpell() { Damage = 20 }; int normalDamage = normal.CalculateDamage(water); int waterDamage = water.CalculateDamage(normal); // normal > water Assert.AreEqual(40, normalDamage); Assert.AreEqual(10, waterDamage); }
public void TestFireVSWaterSpellCards() { var fire = new FireSpell() { Damage = 20 }; var water = new WaterSpell() { Damage = 20 }; int fireDamage = fire.CalculateDamage(water); int waterDamage = water.CalculateDamage(fire); // water > fire Assert.AreEqual(10, fireDamage); Assert.AreEqual(40, waterDamage); }
public void TestMixedFightKrakenWaterSpell() { var kraken = new Kraken() { Damage = 20 }; var water = new WaterSpell() { Damage = 20 }; int krakenDamage = kraken.CalculateDamage(water); int waterDamage = water.CalculateDamage(kraken); // no element type effectiveness applies // kraken not affected by spells Assert.AreEqual(20, krakenDamage); Assert.AreEqual(0, waterDamage); }
public void TestMixedFightKnightWaterSpell() { var knight = new Knight() { Damage = 20 }; var water = new WaterSpell() { Damage = 20 }; int knightDamage = knight.CalculateDamage(water); int waterDamage = water.CalculateDamage(knight); // normal > water // water spell drowns knights instantly Assert.AreEqual(20 * 2, knightDamage); Assert.AreEqual(9999 / 2, waterDamage); }