From 70fe9b2c889f5b8cbca1845e996f325494b1edf4 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 21 May 2021 14:49:46 +0200 Subject: Cancel retreats by clicking the selected block. --- rules.js | 5 +++++ 1 file changed, 5 insertions(+) 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(); -- cgit v1.2.3