summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Battle.java2
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java5
-rw-r--r--core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java10
3 files changed, 13 insertions, 4 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Battle.java b/core/src/ch/asynk/rustanddust/game/Battle.java
index c6e4983..86d95a7 100644
--- a/core/src/ch/asynk/rustanddust/game/Battle.java
+++ b/core/src/ch/asynk/rustanddust/game/Battle.java
@@ -23,6 +23,8 @@ public interface Battle
public Player getVictor();
+ public boolean actionDone();
+
public boolean turnDone();
public boolean isDeploymentDone();
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java
index 23116db..e80890c 100644
--- a/core/src/ch/asynk/rustanddust/game/Ctrl.java
+++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java
@@ -133,11 +133,8 @@ public class Ctrl implements Disposable
StateType nextState = this.state.execute();
if (nextState == StateType.DONE) {
- map.actionDone();
- if (map.unitsActivatedSize() > 0) {
- RustAndDust.debug("Ctrl", "burn down 1AP");
+ if (battle.actionDone()) {
hud.notify("1 Action Point burnt", 0.6f, Position.BOTTOM_CENTER, false);
- battle.getPlayer().burnDownOneAp();
hud.update();
}
if (battle.getPlayer().apExhausted())
diff --git a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
index 13edd7c..0cc2189 100644
--- a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
+++ b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
@@ -71,6 +71,16 @@ public abstract class BattleCommon implements Battle
}
@Override
+ public boolean actionDone()
+ {
+ boolean burn = (map.unitsActivatedSize() > 0);
+ if (burn)
+ currentPlayer.burnDownOneAp();
+ map.actionDone();
+ return burn;
+ }
+
+ @Override
public boolean turnDone()
{
map.turnDone();