summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-05-21 14:49:46 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:12:55 +0100
commit90ef2b73ab84193dd4eb0310b1fe01da08cf760b (patch)
treea56d369495c979335530d23fb0f0953034391e85 /rules.js
parent4b3480c155d7224d3142e545047e91d3686856f2 (diff)
downloadrichard-iii-90ef2b73ab84193dd4eb0310b1fe01da08cf760b.tar.gz
Cancel retreats by clicking the selected block.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 99376e9..1d2ddb3 100644
--- a/rules.js
+++ b/rules.js
@@ -2514,6 +2514,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.active == game.piracy && game.is_pirate[game.who]) {
view.prompt = "Retreat: Move the army to a friendly or vacant areas in the same sea zone.";
for (let to of AREAS[game.where].exits)
@@ -2543,6 +2544,9 @@ states.retreat_in_battle = {
eliminate_block(game.who);
resume_battle();
},
+ block: function () {
+ resume_battle();
+ },
undo: function () {
resume_battle();
}