diff options
Diffstat (limited to 'core/src/ch/asynk/tankontank/game/states')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateAttack.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateAttack.java b/core/src/ch/asynk/tankontank/game/states/StateAttack.java index 84ee3d8..34f7d61 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateAttack.java +++ b/core/src/ch/asynk/tankontank/game/states/StateAttack.java @@ -81,8 +81,13 @@ public class StateAttack extends StateCommon int d1 = ctrl.player.d6(); int d2 = ctrl.player.d6(); System.err.print(" attack (" + selectedHex.getCol() + ";" + selectedHex.getRow() + ") -> (" + to.getCol() + ";" + to.getRow() + ") : 2D6 -> (" + d1 + " + " + d2 + ")"); - if (map.attackPawn(selectedUnit, activeUnit, d1 + d2)) + if (map.attackPawn(selectedUnit, activeUnit, d1 + d2)) { ctrl.player.casualty(activeUnit); + if (map.breakPawns.size() > 0) + setNextState(StateType.BREAK); + } + + activeUnit.showTarget(); ctrl.setState(StateType.ANIMATION); |