From 82acca24c0159cd7df6515bf1059a6ddafe6b57e Mon Sep 17 00:00:00 2001 From: iainp5 Date: Thu, 14 Nov 2024 17:14:48 +0000 Subject: Updates to view.opp_power_hand --- play.js | 1 - rules.js | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/play.js b/play.js index 079f366..8ea17a2 100644 --- a/play.js +++ b/play.js @@ -765,7 +765,6 @@ function on_update() { action_button("done", "Done") action_button("end_round", "End Round") action_button("undo", "Undo") - console.log('view.power_struggle_discard', view.power_struggle_discard) } // =========================== LOG FUNCTIONS ============================================== diff --git a/rules.js b/rules.js index d6c11ec..8b30342 100644 --- a/rules.js +++ b/rules.js @@ -404,14 +404,9 @@ exports.view = function(state, player) { } else if (player === COM) { view.hand = game.communist_hand - view.opp_hand = [...game.dem_pwr_hand].sort((a, b) => a - b) + if (game.opp_power_hand) {view.opp_power_hand = [...game.dem_pwr_hand].sort((a, b) => a - b) } view.power_hand = [...game.com_pwr_hand].sort((a, b) => a - b) } - if (game.view_opp_power_hand) { - if (player === COM) { - view.view_opp_power_hand = [...game.dem_pwr_hand].sort((a, b) => a - b) - } - } if (player === DEM) { view.samizdat = game.samizdat_card @@ -5069,7 +5064,7 @@ function vm_power_struggle() { //Check for Securitate if (game.pwr_struggle_in === 'Romania' && game.persistent_events.includes(C_SECURITATE)) { log(`C${C_SECURITATE}: Democrat reveals Power Struggle cards`) - game.view_opp_power_hand = true + game.opp_power_hand = game.dem_pwr_hand } log_h2('Deal Cards') game.state = 'draw_power_cards' -- cgit v1.2.3