summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java
index d75ef94..ec974ca 100644
--- a/core/src/ch/asynk/rustanddust/game/Ctrl.java
+++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java
@@ -192,7 +192,11 @@ public class Ctrl implements Disposable
if (battle.hasReinforcement())
hud.notify("You have reinforcement", 2, Position.MIDDLE_CENTER, true);
hud.update();
- setState(battle.getState());
+ if (!battle.getPlayer().canDoSomething()) {
+ hud.notify("No available Actions");
+ setState(StateType.TURN_OVER);
+ } else
+ setState(battle.getState());
}
}
@@ -256,6 +260,9 @@ public class Ctrl implements Disposable
if (battle.getPlayer().apExhausted()) {
hud.notify("No more Action Points");
nextState = StateType.TURN_OVER;
+ } else if (!battle.getPlayer().canDoSomething()) {
+ hud.notify("No available Actions");
+ nextState = StateType.TURN_OVER;
} else
nextState = battle.getState();
}