From 7be34db26d75baadbb8a160e30033ac09d8b7664 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Fri, 4 Oct 2024 20:17:46 +0100 Subject: Fix Power Struggle Deck --- rules.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/rules.js b/rules.js index 3105c5c..85e184d 100644 --- a/rules.js +++ b/rules.js @@ -1036,7 +1036,8 @@ states.draw_power_cards = { }, draw() { push_undo() - game.power_struggle_deck = all_power_cards + game.power_struggle_deck = [...all_power_cards] + console.log('game.power_struggle_deck.length', game.power_struggle_deck.length) console.log('called draw cards, country', game.pwr_struggle_in, 'game.active', game.active, 'game.view_opp_hand', game.view_opp_hand) console.log('test3') let presence = check_presence(game.pwr_struggle_in) @@ -2553,7 +2554,7 @@ function valid_spaces_sc() { function valid_spaces_support_loss() { let valid_spaces_set = new Set(); for (let i = 1; i < game.demInfl.length; i++) { - console.log('spaces.length', game.demInfl.length, 'i', i) + //console.log('spaces.length', game.demInfl.length, 'i', i) space = spaces[i] if (game.active === DEM) { infl = game.demInfl[i] @@ -5463,19 +5464,22 @@ function vm_power_struggle() { console.log('in vm_power_struggle. game.vm_event', game.vm_event, 'game.active', game.active, 'game.view_opp_hand', game.view_opp_hand) game.is_pwr_struggle = true + /* TO DELETE? //Check if Power Struggle is because of an event + */ + if (game.vm_event > 0) { console.log('vm_power_struggle, in game.vm_event check') game.pwr_struggle_in = countries[scoring_cards.indexOf(game.vm_event)] log_h2(`C${game.vm_event}`) } - +/* //Otherwise set Power Struggle country normally else { console.log('vm_power_struggle, country set normally') game.pwr_struggle_in = countries[scoring_cards.indexOf(game.played_card)] log_h2(`C${game.played_card}`) - } + }*/ //Check for Securitate -- cgit v1.2.3