diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-06-27 14:29:50 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 12:31:29 +0100 |
commit | bd0792e2d55d15a6a25f8332476ee6ce65000b44 (patch) | |
tree | efb105f04069c181f9527d47eeae4e90ac5b21a2 | |
parent | fcd3c32cb666357443393d8a498271a9b25db1de (diff) | |
download | pax-pamir-bd0792e2d55d15a6a25f8332476ee6ce65000b44.tar.gz |
Rename action to abort action after being denied a beg "cancel".
-rw-r--r-- | play.js | 1 | ||||
-rw-r--r-- | rules.js | 8 |
2 files changed, 7 insertions, 2 deletions
@@ -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 @@ -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() |