summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.js8
-rw-r--r--rules.js13
2 files changed, 10 insertions, 11 deletions
diff --git a/play.js b/play.js
index 10eeb96..fd2852c 100644
--- a/play.js
+++ b/play.js
@@ -638,12 +638,6 @@ function on_update() {
// UPDATE CARD DISPLAYS
- ui.played_card.replaceChildren()
-
-/* ui.played_power_card.replaceChildren()
- if (view.played_power_card > 0)
- ui.played_power_card.appendChild(ui.power_cards[view.played_power_card])*/
-
ui.samizdat_card.replaceChildren()
if (view.samizdat > 0)
ui.samizdat_card.appendChild(ui.cards[view.samizdat])
@@ -741,6 +735,8 @@ function on_update() {
action_button("done", "Done")
action_button("end_round", "End Round")
action_button("undo", "Undo")
+
+console.log('view.valid_cards', view.valid_cards, 'view.power_hand', view.power_hand)
}
// =========================== LOG FUNCTIONS ==============================================
diff --git a/rules.js b/rules.js
index 30b7848..1af9405 100644
--- a/rules.js
+++ b/rules.js
@@ -2577,7 +2577,7 @@ function valid_cards(player_hand, presence) {
} else if (game.phase === 1) {
for (let c of player_hand) {
let card = power_cards[c]
- if (card.name === power_cards[game.played_power_card].name) {
+ if (!leader_cards.includes(c) && card.name === power_cards[game.played_power_card].name) {
valid_cards_set.add(c)
} else if (card.name === game.proxy_power_card) {
valid_cards_set.add(c)
@@ -4232,7 +4232,6 @@ function vm_valid_spaces_country () {
if (vm_operand(1)) {country = vm_operand(1)}
else {country = game.vm_active_country}
for (let space of spaces) {
- if (!space) continue
if (space.country === country) {
game.valid_spaces.push(space.space_id);
}
@@ -5800,7 +5799,12 @@ states.vm_remove_infl = {
}
},
done() {
- do_log_summary()
+ if (game.summary.length > 0) {
+ pop_summary()
+ log_br()
+ } else {
+ log('No influence to remove')
+ }
vm_next()
}
}
@@ -5952,7 +5956,6 @@ states.vm_ceh_support_check_prep = {
//Then check Austria-Hungary Border Reopened normally
if (game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED)) {
if (game.active === DEM && game.vm_available_ops > 1) {
-
if (spaces[game.selected_space].country === 'East_Germany' && game.persistent_events.includes(58) && game.active === DEM) {
game.state = 'vm_austria_hungary_border_reopened_check'
return
@@ -6229,7 +6232,7 @@ states.vm_common_european_home_play = {
influence(){
push_undo()
log_gap(`Played C${game.vm_event} to place SPs`)
- game.vm_available_ops = cards[game.vm_event].ops
+ game.vm_available_ops = get_card_ops(game.vm_event)
valid_spaces_infl()
// If ABHR - Set AHBR tracker to true
if (game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED)) {