From 01ad333dd07e4bef4cf386d9373c1757f469e318 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 5 Oct 2021 12:37:18 +0200 Subject: Add confirmation when clicking PASS in a battle dialog. --- ui.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ui.js') diff --git a/ui.js b/ui.js index 7e043e1..2198c7b 100644 --- a/ui.js +++ b/ui.js @@ -746,7 +746,12 @@ function select_undo() { send_action('undo'); } function select_battle_hit(evt) { send_action('battle_hit', evt.target.block); } function select_battle_fire(evt) { send_action('battle_fire', evt.target.block); } function select_battle_retreat(evt) { send_action('battle_retreat', evt.target.block); } -function select_battle_pass(evt) { send_action('battle_pass', evt.target.block); } + +function select_battle_pass(evt) { + if (window.confirm("Are you sure that you want to PASS with " + block_name(evt.target.block) + "?")) + send_action('battle_pass', evt.target.block); +} + build_map(); -- cgit v1.2.3