From 952a644752ec3d4fcc181fc14c64d659473f50e1 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Mon, 23 Sep 2024 19:16:58 +0100 Subject: Fix for Betrayal with no Dem SPs --- rules.js | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/rules.js b/rules.js index 48d72a5..537e4d6 100644 --- a/rules.js +++ b/rules.js @@ -1017,13 +1017,17 @@ states.draw_power_cards = { game.persistent_events['roundtable_talks'] = false } - if (game.persistent_events['peasant_parties_revolt'] && game.com_pwr_hand_limit >=1) { - log('Democrat receives 1 cards from Communist due to C72') - game.dem_pwr_hand_limit += 1 - game.com_pwr_hand_limit -= 1 - discard_from_table(72) - game.persistent_events['peasant_parties_revolt'] = false - } + /* if (game.persistent_events['peasant_parties_revolt'] { + + && game.com_pwr_hand_limit >=1) { + log('Democrat receives 1 cards from Communist due to C72') + game.dem_pwr_hand_limit += 1 + game.com_pwr_hand_limit -= 1 + permanently_remove(72) + game.persistent_events['peasant_parties_revolt'] = false + } + + }*/ if (game.persistent_events['national_salvation_front'] && game.dem_pwr_hand_limit >=2 && (game.pwr_struggle_in === 'Romania' || game.pwr_struggle_in === 'Bulgaria')) { log('Communist receives 2 cards from Democrat due to C102') @@ -6480,7 +6484,11 @@ states.vm_switch_infl = { return `resolve ${cards[game.played_card].name}.` }, prompt() { - if (game.vm_available_ops > 0 ) { + if (game.valid_spaces.length === 0) { + view.prompt = `${clean_name(cards[this_card()].name)}: No SPs to remove.` + gen_action('pass') + } else { + /*if (game.vm_available_ops > 0 ) {*/ view.prompt = `${clean_name(cards[game.played_card].name)}: ${event_prompt()}.` for (let space_id of game.valid_spaces) { /*const space = spaces.find(s => s && s.space_id === space_id); @@ -6501,6 +6509,9 @@ states.vm_switch_infl = { } vm_next() }, + pass() { + vm_next() + } /*done() { vm_next() }*/ -- cgit v1.2.3