예제 #1
0
        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"));
        }
예제 #2
0
        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);
        }
예제 #3
0
 public void AdjustStatDownwards()
 {
     creep.AdjustStat(new StatAdjustment("Hp", "", -50.0f));
     Assert.AreEqual(50.0f, creep.GetStatValue("Hp"));
 }