From 031ad670a7ec12c755e2c34baf5a2b79a32df473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 11 Apr 2016 16:26:04 +0200 Subject: Map4Orders: compute activableUnits (break move) only on success --- core/src/ch/asynk/rustanddust/game/map/Map4Orders.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java index 6893b2a..1403e6a 100644 --- a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java +++ b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java @@ -272,10 +272,12 @@ public abstract class Map4Orders extends Map3Animations } else { resolveEngagement(e); activableUnits.clear(); - for (Unit u : activatedUnits) { - u.engage(); - if (u.canBreak()) - activableUnits.add(u); + if (e.success) { + for (Unit u : activatedUnits) { + u.engage(); + if (u.canBreak()) + activableUnits.add(u); + } } } -- cgit v1.1-2-g2b99