summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-05-21 14:49:46 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 12:53:17 +0100
commit70fe9b2c889f5b8cbca1845e996f325494b1edf4 (patch)
tree3fb4f0f7cda6f452cad709c3e41d4d6150c6d99f
parent78f831bfe00569981739c51a34a96e9b0237456f (diff)
downloadhammer-of-the-scots-70fe9b2c889f5b8cbca1845e996f325494b1edf4.tar.gz
Cancel retreats by clicking the selected block.
-rw-r--r--rules.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index d8513be..e97357c 100644
--- a/rules.js
+++ b/rules.js
@@ -1856,6 +1856,7 @@ states.retreat_in_battle = {
if (is_inactive_player(current))
return view.prompt = "Waiting for " + game.active + " to retreat.";
gen_action(view, 'undo');
+ gen_action(view, 'block', game.who);
if (game.who == NORSE) {
view.prompt = "Retreat: Move the army to a friendly coastal area.";
for (let to in AREAS)
@@ -1881,6 +1882,10 @@ states.retreat_in_battle = {
game.who = null;
resume_battle();
},
+ block: function () {
+ game.who = null;
+ resume_battle();
+ },
undo: function () {
game.who = null;
resume_battle();