From bd0792e2d55d15a6a25f8332476ee6ce65000b44 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 27 Jun 2022 14:29:50 +0200 Subject: Rename action to abort action after being denied a beg "cancel". --- play.js | 1 + rules.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/play.js b/play.js index 5f8ad64..107b699 100644 --- a/play.js +++ b/play.js @@ -540,6 +540,7 @@ function on_update() { confirm_action_button("end_turn_pass", "End turn", "Are you sure you want to END TURN while you still have actions?") action_button("end_turn", "End turn") + action_button("cancel", "Cancel") action_button("undo", "Undo") ui.favored1.className = view.favored diff --git a/rules.js b/rules.js index 3df00d2..e146625 100644 --- a/rules.js +++ b/rules.js @@ -821,7 +821,7 @@ states.bribe = { if (player.events.courtly_manners) gen_action('courtly_manners') if (game.undo.length === 0) - gen_action('refuse') + gen_action('cancel') }, courtly_manners() { log(`Did not pay bribe.`) @@ -841,6 +841,10 @@ states.bribe = { set_active(p) }, refuse() { + // for old replays + states.bribe.cancel() + }, + cancel() { game.card = 0 game.where = 0 resume_actions() @@ -3161,7 +3165,7 @@ exports.action = function (state, current, action, arg) { load_game(state) let S = states[game.state] if (action in S) { - S[action](arg, current) + S[action](arg) } else { if (action === 'undo' && game.undo && game.undo.length > 0) pop_undo() -- cgit v1.2.3