From 90ef2b73ab84193dd4eb0310b1fe01da08cf760b 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 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rules.js') 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(); } -- cgit v1.2.3