summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-12-09 23:47:20 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-12-09 23:47:20 +0100
commit46cbb5e2a1a246594fa35b72a53b1a1c76980278 (patch)
tree7d020583dd76289b0f33a15907e6e25071b915d5 /core/src/ch/asynk
parent12e32f31e5b450d5feb2bdf567317604f9a52edc (diff)
downloadRustAndDust-46cbb5e2a1a246594fa35b72a53b1a1c76980278.zip
RustAndDust-46cbb5e2a1a246594fa35b72a53b1a1c76980278.tar.gz
Ctrl: no more AP -> only notify user
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java12
-rw-r--r--core/src/ch/asynk/rustanddust/game/State.java3
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);