summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index 2f6287a..1cb802f 100644
--- a/rules.js
+++ b/rules.js
@@ -7447,6 +7447,7 @@ function search_escape_ship(start) {
function goto_play_escape_ship() {
game.state = "escape_ship";
game.who = NOBODY;
+ game.count = 0;
}
states.escape_ship = {
inactive: "Escape Ship",
@@ -7455,7 +7456,8 @@ states.escape_ship = {
for (let lord of game.battle.routed)
if (is_friendly_lord(lord))
gen_action_lord(lord);
- view.actions.done = 1;
+ if (game.count > 0)
+ view.actions.done = 1;
},
lord(lord) {
push_undo();
@@ -7463,6 +7465,7 @@ states.escape_ship = {
exile_lord(lord, false);
set_delete(game.battle.fled, lord);
set_delete(game.battle.routed, lord);
+ game.count++;
},
done() {
push_undo();
@@ -7476,6 +7479,7 @@ function can_play_talbot_to_the_rescue() {
}
function goto_play_talbot_to_the_rescue() {
game.state = "talbot_to_the_rescue";
+ game.count = 0;
}
states.talbot_to_the_rescue = {
inactive: "Talbot to the Rescue",
@@ -7484,13 +7488,15 @@ states.talbot_to_the_rescue = {
for (let lord of game.battle.routed)
if (is_friendly_lord(lord))
gen_action_lord(lord);
- view.actions.done = 1;
+ if (game.count > 0)
+ view.actions.done = 1;
},
lord(lord) {
push_undo();
disband_lord(lord);
set_delete(game.battle.fled, lord);
set_delete(game.battle.routed, lord);
+ game.count++;
},
done() {
push_undo();
@@ -7511,6 +7517,7 @@ function can_play_warden_of_the_marches() {
function goto_play_warden_of_the_marches() {
game.state = "warden_of_the_marches";
game.where = NOWHERE;
+ game.count = 0;
}
states.warden_of_the_marches = {
inactive: "Warden of the Marches",
@@ -7534,7 +7541,8 @@ states.warden_of_the_marches = {
}
if (done)
view.prompt = "Warden of the Marches: All done.";
- view.actions.done = 1;
+ if (game.count > 0)
+ view.actions.done = 1;
}
},
locale(loc) {
@@ -7553,6 +7561,7 @@ states.warden_of_the_marches = {
set_lord_locale(lord, game.where);
// vassals are disbanded in usual death check state
// lords without troops are disbanded during aftermath
+ game.count++;
},
done() {
push_undo();