From 5d07f04799e453a86a90f34886c290b825cf244d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 20 Oct 2014 10:58:51 +0200 Subject: 1 at-gun attack 1 hard-target -> no consumed AP --- core/src/ch/asynk/tankontank/game/Map.java | 9 +++++---- 1 file 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; } -- cgit v1.1-2-g2b99