summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/play.js b/play.js
index be10507..f8d5cf5 100644
--- a/play.js
+++ b/play.js
@@ -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")