diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-20 10:58:51 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-20 10:58:51 +0200 |
commit | 5d07f04799e453a86a90f34886c290b825cf244d (patch) | |
tree | 13da040e6437387122c989888f4e7e53bc580303 /core/src/ch/asynk/tankontank | |
parent | 4cc3109a44bbabc20f90e410f8cff77efe8ff629 (diff) | |
download | RustAndDust-5d07f04799e453a86a90f34886c290b825cf244d.zip RustAndDust-5d07f04799e453a86a90f34886c290b825cf244d.tar.gz |
1 at-gun attack 1 hard-target -> no consumed AP
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-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; } |