diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-05 20:26:19 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-05 20:26:19 +0000 |
commit | 24ef860ef52551fba2970bde282d1e33762b6bc7 (patch) | |
tree | f5b8ab0412437999e1b7b4b14b8943a6fde6d0a3 /rules.js | |
parent | 94ea6010ea04167ed2764839bff9e8e511a0d9c1 (diff) | |
download | 1989-dawn-of-freedom-24ef860ef52551fba2970bde282d1e33762b6bc7.tar.gz |
Fix game_over state after Support Check
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 30 |
1 files changed, 14 insertions, 16 deletions
@@ -906,6 +906,7 @@ states.support_check_prep = { } } } + game.state = 'do_support_check' }, end_round() { @@ -940,8 +941,12 @@ states.do_support_check = { if (game.available_ops === 0) { game.valid_spaces = [] } + if (check_vp()) { + return + } else { game.state = 'support_check_prep' return + } } } @@ -2105,17 +2110,6 @@ function do_sc(space) { clear_undo() log_gap(`Support check: %${space}`) - //Check Helsinki Final Act - - if (game.active === COM && game.persistent_events.includes(26) && (spaces[space].socio === 5 || spaces[space].socio === 6) ) { - log('+1 VP from C26') - game.vp ++ - if (check_vp()) { - game.state = 'game.over' - return - } - } - // Continue with Support Check Logic let roll = roll_d6() @@ -2248,12 +2242,14 @@ function do_sc(space) { } else { log_msg_gap('Change influence: 0 SP') } + //Check VP awards + if (game.active === COM && game.persistent_events.includes(C_HELSINKI_FINAL_ACT) && (spaces[space].socio === 5 || spaces[space].socio === 6) ) { + log('+1 VP from C26') + game.vp ++ + } if (game.active === COM && game.persistent_events.includes(C_ECO_GLASNOST) && spaces[space].space_id === S_RUSE) { log_msg_gap('+1 VP from C39') game.vp++ - if (check_vp()) { - return - } } // If Austria-Hungary Border Reopened used, all future support checks must be in East Germany @@ -5884,12 +5880,14 @@ states.vm_do_support_check = { clear_undo() do_sc(game.selected_space) game.vm_available_ops-- - if (game.vm_available_ops === 0) { + if (check_vp()) { + return + } else if (game.vm_available_ops === 0) { game.valid_spaces = [] vm_next() return } else { - game.state = 'vm_support_check_prep' + game.state = 'support_check_prep' return } } |