diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-15 08:37:51 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-15 08:37:51 +0100 |
commit | bb272b0887a5e4b4e8a7380d02e441874c48ff24 (patch) | |
tree | f939ae6c0b3659425379eecd5011ace0db304be1 /rules.js | |
parent | a7af708bc617267d3498e273a4f30f0b6ac04106 (diff) | |
download | 1989-dawn-of-freedom-bb272b0887a5e4b4e8a7380d02e441874c48ff24.tar.gz |
Tidying up End Action Round
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -863,6 +863,7 @@ states.tiananmen_square_attempt_success = { done () {
push_undo()
if (game.vm_event > 200) {
+ console.log('going to tst award, game.return_state', game.return_state)
goto_vm(game.vm_event)
} else {
game.state = 'tiananmen_square_attempt_done'
@@ -4371,7 +4372,7 @@ function pop_vm_prompt() { function vm_return() {
- console.log('in vm_return, game.vm_infl_to_do', game.vm_infl_to_do)
+ console.log('in vm_return, game.vm_infl_to_do', game.vm_infl_to_do, 'return state', game.return_state)
//Remove temporary vm variables
delete game.support_check_modifier
@@ -4385,14 +4386,15 @@ function vm_return() { }
//Check if end event state is needed
- if (game.is_pwr_struggle || game.state === 'vm_tst_6') {
+ if (game.is_pwr_struggle || game.state === 'vm_tst_6' || game.return_state === 'tiananmen_square_attempt_done') {
vm_end_event()
} else {
if (!game.vm_infl_to_do) {
/*if ((game.active === DEM && game.round_player !==DEM) || (game.active === COM && game.round_player !== COM)) {
game.state = 'vm_end_event'
} else {*/
- game.state = 'vm_end_event'
+ game.state = 'vm_end_event'
+
//}
} else {
console.log('vm_infl_to_do true')
@@ -5914,6 +5916,7 @@ function discarded_card() { // =================== TIANANMEN SQUARE TRACK FUNCTIONS ====================
function vm_tst_3() {
+ console.log('function vm_tst_3, game.return_state', game.return_state)
log_gap('Tiananmen Square Track award')
game.state = 'vm_tst_3_prep'
}
@@ -6219,8 +6222,11 @@ states.vm_remove_x_infl = { },
infl(space) {
vm_do_remove_x_infl(space)
+ if (game.vm_event === 68) {
+ vm_next()
+ }
/*game.vm_event_done = true
- vm_next()*/
+ vm_next()*/
},
done () {
game.vm_event_done = true
@@ -8284,6 +8290,7 @@ states.vm_workers_revolt_finish = { states.vm_tst_3_prep = {
inactive: 'resolve Tiananmen Square Track award.',
prompt() {
+ console.log('tst award prep, game.return_state', game.return_state)
view.prompt = 'Tiananmen Square Track award: draw 3 cards.'
gen_action('draw')
},
@@ -8305,8 +8312,9 @@ states.vm_tst_3_prep = { states.vm_tst_3 = {
inactive: 'resolve Tiananmen Square Track bonus.',
prompt() {
+ console.log('tst award, game.return_state', game.return_state)
if (game.temp < 2) {
- view.prompt = `Discard 2 of the drawn cards`
+ view.prompt = `Discard 2 of the drawn cards.`
for (let card of game.valid_cards) {
gen_action_card(card)
}
|