diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 3c648a9..b69f359 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -307,10 +307,6 @@ public abstract class Map extends Board success = ((dice + activatedUnits + flankAttacks) >= hex.defenseFor(target, activatedPawns)); } - // TODO : free move for infantry - for (Pawn p : activatedPawns) - pawn.attack(target); - AnimationSequence seq = AnimationSequence.get(2); if (success) { explosions.init(1, target.getCenter().x, target.getCenter().y); @@ -331,6 +327,11 @@ public abstract class Map extends Board addAnimation(seq); + for (Pawn p : activatedPawns) + pawn.attack(target); + if ((activatedPawnsCount() == 1) && pawn.isA(Unit.UnitType.AT_GUN) && target.isHardTarget()) + activatedPawns.clear(); + return success; } |