summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-10-29 18:44:01 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-11-02 08:22:05 +0000
commitda0546400fb89739aaccc83e182569dab67d5cb2 (patch)
tree1862c9287dce9cb03130714774d91379acaa19d3 /rules.js
parent19416752502804d00046456a798569c622e7800c (diff)
download1989-dawn-of-freedom-da0546400fb89739aaccc83e182569dab67d5cb2.tar.gz
Fix Deutsche Marks
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js21
1 files changed, 9 insertions, 12 deletions
diff --git a/rules.js b/rules.js
index ef4a9af..30b7848 100644
--- a/rules.js
+++ b/rules.js
@@ -1650,16 +1650,16 @@ states.vp_roll = {
}
},
roll () {
- let vp_change = vp_roll[get_aftermath_roll()]
+ let roll = get_aftermath_roll()
+ let vp_change = vp_roll[roll]
if (game.active === DEM) {
log(`+${vp_change} VP`)
} else {
log(`-${vp_change} VP`)
}
- if (roll >= 4)
if (game.active === DEM) {game.vp += vp_change}
else {game.vp -= vp_change}
- if (game.active === DEM && modified_roll >= 4) {
+ if (game.active === DEM && roll >= 4) {
game.phase = 1
} else {
game.phase = 0
@@ -4832,19 +4832,18 @@ function vm_civic_forum() {
}
function vm_common_european_home() {
- let valid_cards = []
- for (let c = first_strategy_card; c <= last_strategy_card; ++c) {
+ let hands = [...game.democrat_hand, ...game.communist_hand]
+ for (let c of hands) {
if (game.active === DEM) {
if (cards[c].side === 'C') {
- valid_cards.push(c)
+ game.valid_cards.push(c)
}
} else {
if (cards[c].side === 'D') {
- valid_cards.push(c)
+ game.valid_cards.push(c)
}
}
}
- game.valid_cards = valid_cards
game.state = "vm_common_european_home_choose"
}
@@ -6352,10 +6351,8 @@ states.vm_deutsche_marks_confirm = {
gen_action('done')
},
done() {
- if (cards[game.vm_event].side === "C") {
- if (is_auto_resolve(game.vm_event) || switch_events.includes(game.vm_event)) {
- goto_vm(game.vm_event)
- }
+ if (cards[game.vm_event].side === "C" && (is_auto_resolve(game.vm_event) || switch_events.includes(game.vm_event))) {
+ goto_vm(game.vm_event)
} else {
next_player()
game.state = 'vm_deutsche_marks'