summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-09-20 18:28:19 +0100
committeriainp5 <iain.pearce.ip@gmail.com>2024-09-20 18:28:19 +0100
commit7f7b59dc2fb2e02d547b94a20beac021efe17de8 (patch)
treeffb7856173d4b2bb3078489ba1a7bf3c4d8a96f9 /rules.js
parentbb8be11ebb65300d2ab9dd233794932ce4d1cb27 (diff)
download1989-dawn-of-freedom-7f7b59dc2fb2e02d547b94a20beac021efe17de8.tar.gz
Fix NYE Party
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js18
1 files changed, 5 insertions, 13 deletions
diff --git a/rules.js b/rules.js
index 510ef0f..1909f77 100644
--- a/rules.js
+++ b/rules.js
@@ -1593,7 +1593,7 @@ states.finish_scoring ={
done() {
console.log('game.return_state', game.return_state)
log('Power Struggle resolved') /*At this point log card dicarded or permanently removed? */
- if (game.return_state === 'new_years_eve_party') {
+ if (game.persistent_events['new_years_eve_party'] === 2) {
game.state = 'new_years_eve_party'
return
}
@@ -1631,8 +1631,9 @@ states.end_turn_4_5_4 = {
log('Communist player has a held scoring card')
goto_game_over(DEM, `${DEM} won by held scoring card!`)
}
- else if (game.persistent_events['new_years_eve_party']) {
+ else if (game.persistent_events['new_years_eve_party'] === 1) {
log_h1(`New Year's Eve Party`)
+ game.persistent_events['new_years_eve_party'] = 2
game.state = 'new_years_eve_party'
}
else if(game.turn === 10) {
@@ -1828,42 +1829,36 @@ states.new_years_eve_party = {
east_germany() {
push_undo()
log('Chose to score East Germany')
- game.return_state = 'new_years_eve_party'
game.vm_event = 42
goto_vm(42)
},
poland() {
push_undo()
log('Chose to score Poland')
- game.return_state = 'new_years_eve_party'
game.vm_event = 22
goto_vm(22)
},
czechoslovakia() {
push_undo()
log('Chose to score Czechoslovakia')
- game.return_state = 'new_years_eve_party'
game.vm_event = 55
goto_vm(55)
},
hungary() {
push_undo()
log('Chose to score Hungary')
- game.return_state = 'new_years_eve_party'
game.vm_event = 23
goto_vm(23)
},
romania() {
push_undo()
log('Chose to score Romania')
- game.return_state = 'new_years_eve_party'
game.vm_event = 95
goto_vm(95)
},
bulgaria () {
push_undo()
log('Chose to score Bulgaria')
- game.return_state = 'new_years_eve_party'
game.vm_event = 43
goto_vm(43)
},
@@ -2932,10 +2927,7 @@ function end_round() {
}
game.state = 'honecker'
return
- } /*else if (game.persistent_events['new_years_eve_party']) {
- game.state = 'new_years_eve_party'
- return
- } */
+ }
else if (game.dem_tst_position >= 6 && game.com_tst_position <= 5) {
log_h2('Tiananmen Square Track Award')
if (game.active !== DEM) {
@@ -6461,7 +6453,7 @@ states.vm_new_years_eve_party = {
},
end() {
push_undo()
- game.persistent_events['new_years_eve_party'] = true
+ game.persistent_events['new_years_eve_party'] = 1
log('Chooses to end the game. There will be no final scoring')
let power = Object.values(game.revolutions).filter(value => value === false).length
if (power > 3) {