summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-11-14 17:14:48 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-11-14 17:14:48 +0000
commit82acca24c0159cd7df6515bf1059a6ddafe6b57e (patch)
treef01dd4d7944852fc79a93e71fbef5de4da948d29
parent2cfaa6f7f223719b3a6e0be7352ccc7b1d712921 (diff)
download1989-dawn-of-freedom-82acca24c0159cd7df6515bf1059a6ddafe6b57e.tar.gz
Updates to view.opp_power_hand
-rw-r--r--play.js1
-rw-r--r--rules.js9
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'