diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-12 14:21:30 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-12 14:21:30 +0100 |
commit | 6e7a3c69a79ecca8e45df60b59a22de504e1a2f5 (patch) | |
tree | a7e77ca67b34b1ce10e47048c81d4219f584878e /play.js | |
parent | db5c4c7f8e937b6527a04b097f1c4c61f94ae9c5 (diff) | |
download | 1989-dawn-of-freedom-6e7a3c69a79ecca8e45df60b59a22de504e1a2f5.tar.gz |
Updates to events handling
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -405,8 +405,8 @@ function on_update() { ui.dem_hand_count.innerText = `${view.democrat_power_hand} Power cards`
ui.com_hand_count.innerText = `${view.communist_power_hand} Power cards`
} else{
- ui.dem_hand_count.innerText = `${view.democrat_hand} cards in hand`
- ui.com_hand_count.innerText = `${view.communist_hand} cards in hand`
+ ui.dem_hand_count.innerText = `${view.democrat_hand} cards`
+ ui.com_hand_count.innerText = `${view.communist_hand} cards`
}
ui.deck_length.innerText = `${view.strategy_deck} cards`
@@ -516,7 +516,8 @@ if (!view.is_pwr_struggle) { document.getElementById("opp_hand_panel").classList.add("hide")
}
} else {
- if (view.show_opp_hand && view.opp_hand.length >0) {
+ console.log('power struggle, show opp hand', view.show_opp_hand, 'view opp hand', view.opp_hand )
+ if (view.show_opp_hand && view.opp_hand && view.opp_hand.length > 0) {
document.getElementById("opp_hand_panel").classList.remove("hide")
for (let c of view.opp_hand) {
let card = ui.power_cards[c]
@@ -537,6 +538,7 @@ if (!view.is_pwr_struggle) { for (let c of view.power_hand) {
let power_card = ui.power_cards[c]
document.getElementById("power_hand").appendChild(power_card);
+ power_card.classList.remove('discard_card')
if (view.valid_cards.includes(c)) {
power_card.classList.add('selected');
}
@@ -682,7 +684,7 @@ if (view.persistent_events.includes(97)) { action_button("concede", "Concede")
action_button("struggle", "Begin power struggle")
action_button("raise", "Raise the stakes")
- action_button("draw", "Draw cards")
+ action_button("draw", "Draw")
action_button("scoring", "Scoring")
action_button("event", "Event")
action_button("opp_event", "Resolve opponent event")
|