diff --git a/engine/src/main/battlecode/world/GameWorld.java b/engine/src/main/battlecode/world/GameWorld.java index a9b58f2c..c763bb7f 100644 --- a/engine/src/main/battlecode/world/GameWorld.java +++ b/engine/src/main/battlecode/world/GameWorld.java @@ -602,7 +602,7 @@ public void triggerTrap(Trap trap, InternalRobot robot) { robot.setMovementCooldownTurns(type.stunTime); if (type == TrapType.CAT_TRAP && robot.getType().isCatType()) { - this.teamInfo.addDamageToCats(trap.getTeam(), type.damage); + this.teamInfo.addDamageToCats(trap.getTeam(), Math.min(type.damage, robot.getHealth())); } if (trap.getType() != TrapType.CAT_TRAP) { diff --git a/engine/src/main/battlecode/world/InternalRobot.java b/engine/src/main/battlecode/world/InternalRobot.java index 03be7ca9..a9e656cf 100644 --- a/engine/src/main/battlecode/world/InternalRobot.java +++ b/engine/src/main/battlecode/world/InternalRobot.java @@ -614,11 +614,12 @@ public void bite(MapLocation loc, int cheeseConsumed) { this.gameWorld.getMatchMaker().addBiteAction(targetRobot.ID); - targetRobot.addHealth(-damage); if (targetRobot.getType() == UnitType.CAT) { - this.gameWorld.getTeamInfo().addDamageToCats(team, damage); + this.gameWorld.getTeamInfo().addDamageToCats(team, Math.min(damage, targetRobot.getHealth())); } + targetRobot.addHealth(-damage); + if (targetRobot.getType() != UnitType.CAT) { this.gameWorld.isCooperation = false; } diff --git a/specs/specs.pdf b/specs/specs.pdf index 0d76cc73..da25a544 100644 Binary files a/specs/specs.pdf and b/specs/specs.pdf differ