예제 #1
0
 public static void CheckCreepState(TowerType type, Creep creep)
 {
     if (creep.Type == CreepType.Cloth)
     {
         ClothCreepStateChanger.ChangeStatesIfClothCreep(type, creep);
     }
     else if (creep.Type == CreepType.Sand)
     {
         SandCreepStateChanger.ChangeStatesIfSandCreep(type, creep);
     }
     else if (creep.Type == CreepType.Glass)
     {
         GlassCreepStateChanger.ChangeStatesIfGlassCreep(type, creep);
     }
     else if (creep.Type == CreepType.Wood)
     {
         WoodCreepStateChanger.ChangeStatesIfWoodCreep(type, creep);
     }
     else if (creep.Type == CreepType.Plastic)
     {
         PlasticCreepStateChanger.ChangeStatesIfPlasticCreep(type, creep);
     }
     else if (creep.Type == CreepType.Iron)
     {
         IronCreepStateChanger.ChangeStatesIfIronCreep(type, creep);
     }
     else if (creep.Type == CreepType.Paper)
     {
         PaperCreepStateChanger.ChangeStatesIfPaperCreep(type, creep);
     }
 }
예제 #2
0
 public void ApplyingIceToMeltedIronCreepMightNotShatter()
 {
     Randomizer.Use(new FixedRandom(new[] { 0.9f }));
     IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Ice, creep);
     IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Acid, creep);
     IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Ice, creep);
     Assert.AreEqual(1, creep.GetStatPercentage("Hp"));
 }
예제 #3
0
 public void CheckForFireTowerEffect()
 {
     IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Fire, creep);
     Assert.IsTrue(creep.State.Melt);
     Assert.AreEqual(Vulnerability.Normal,
                     creep.State.VulnerabilityState[(int)TowerType.Slice]);
     Assert.AreEqual(Vulnerability.Weak,
                     creep.State.VulnerabilityState[(int)TowerType.Impact]);
 }
예제 #4
0
 public void ApplyAcidThenWater()
 {
     IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Acid, creep);
     IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Water, creep);
     Assert.AreEqual(Vulnerability.Vulnerable,
                     creep.State.VulnerabilityState[(int)TowerType.Water]);
     Assert.AreEqual(Vulnerability.HardBoiled,
                     creep.State.VulnerabilityState[(int)TowerType.Slice]);
     Assert.AreEqual(Vulnerability.Resistant,
                     creep.State.VulnerabilityState[(int)TowerType.Impact]);
 }
예제 #5
0
 public void CheckForAcidTowerEffect()
 {
     IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Acid, creep);
     Assert.IsTrue(creep.State.Melt);
 }