public void CheckReceiveAttackWithDeadCreep() { var creep = new Creep(CreepType.Cloth, Vector2D.Zero); creep.AdjustStat(new StatAdjustment("Hp", "", -195)); creep.ReceiveAttack(TowerType.Fire, 10.0f); Assert.AreEqual(0.0f, creep.GetStatValue("Hp")); }
private static bool CheckChance(Creep creep) { var chanceForShatter = Randomizer.Current.Get(0, 100); if (chanceForShatter >= 15) { return(false); } creep.AdjustStat(new StatAdjustment("Hp", "", -creep.GetStatValue("Hp"))); return(true); }
public void AdjustStatDownwards() { creep.AdjustStat(new StatAdjustment("Hp", "", -50.0f)); Assert.AreEqual(50.0f, creep.GetStatValue("Hp")); }