Skip to content

Commit 3bc783b

Browse files
committed
fix cat health bug
1 parent 59d6149 commit 3bc783b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

engine/src/main/battlecode/world/GameWorld.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ public void triggerTrap(Trap trap, InternalRobot robot) {
630630

631631
robot.setMovementCooldownTurns(type.stunTime);
632632

633-
if (type == TrapType.CAT_TRAP && robot.getType().isCatType()) {
633+
if (type == TrapType.CAT_TRAP && robot.getType().isCatType() && robot.getHealth() > 0) {
634634
this.teamInfo.addDamageToCats(trap.getTeam(), Math.min(type.damage, robot.getHealth()));
635635
}
636636

0 commit comments

Comments
 (0)