From 8dbc52cfa6c0571b408825dc6b81e75e554b0607 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Sat, 5 Oct 2024 20:18:37 +0100 Subject: Fix Support Falters with no cards --- rules.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 597064a..8ebfe79 100644 --- a/rules.js +++ b/rules.js @@ -8326,7 +8326,10 @@ states.vm_support_surges = { states.vm_support_falters = { inactive: 'discard cards.', prompt() { - if (game.vm_available_ops > 0) { + if ((game.active === DEM && game.dem_pwr_hand.length === 0) || (game.active === COM && game.com_pwr_hand.length === 0)) { + view.prompt = 'Support Falters: no remaining cards to discard.' + gen_action('pass') + } else if (game.vm_available_ops > 0) { view.prompt = 'Support Falters: discard a card.' gen_action('discard') } else { @@ -8340,6 +8343,11 @@ states.vm_support_falters = { else {discard_card(game.com_pwr_hand)} game.vm_available_ops -- }, + pass() { + log_msg_gap('Takes initiative') + game.return = game.active + vm_next() + }, done() { log_msg_gap('Takes initiative') game.return = game.active -- cgit v1.2.3