diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 12 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/State.java | 3 |
2 files changed, 10 insertions, 5 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 7dd29d5..9fcfe08 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -233,6 +233,8 @@ public class Ctrl implements Disposable this.state.enter(tmp); + if (nextState == StateType.TURN_OVER) + turnDone(); } private StateType completeDeployment() @@ -257,13 +259,15 @@ public class Ctrl implements Disposable StateType nextState = this.state.execute(); if (nextState == StateType.DONE) { - if (battle.actionDone()) { + if (battle.getPlayer().apExhausted()) { + hud.notify("No more Action Points", 1f, Position.MIDDLE_CENTER, false); + nextState = StateType.TURN_OVER; + } + else if (battle.actionDone()) { hud.notify("1 Action Point burnt", 0.6f, Position.BOTTOM_CENTER, false); hud.update(); + nextState = battle.getState(); } - if (battle.getPlayer().apExhausted()) - hud.notifyNoMoreAP(); - nextState = battle.getState(); } return nextState; diff --git a/core/src/ch/asynk/rustanddust/game/State.java b/core/src/ch/asynk/rustanddust/game/State.java index db0d6af..386df8b 100644 --- a/core/src/ch/asynk/rustanddust/game/State.java +++ b/core/src/ch/asynk/rustanddust/game/State.java @@ -14,7 +14,8 @@ public interface State DEPLOYMENT, WITHDRAW, ABORT, - DONE + DONE, + TURN_OVER }; public void enter(StateType prevState); |