diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-25 18:06:55 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-25 18:06:55 +0000 |
commit | 6dc084dd1388be83b5621bc88fad798df56398bf (patch) | |
tree | 4ab37e559c90e7a27bcd18dc6432140479c55466 /rules.js | |
parent | a0f20efd1c094e78cc3a1f9663fff08d659634bc (diff) | |
download | 1989-dawn-of-freedom-6dc084dd1388be83b5621bc88fad798df56398bf.tar.gz |
Tidy up We Are the People code
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -3289,6 +3289,13 @@ function finish_the_wall() { } } +function finish_we_are_the_people() { + game.valid_spaces = [...S_EAST_GERMANY] + game.vm_max_infl = 2 + game.vm_available_ops = game.vm_influence_added[S_LUTHERAN_CHURCH] + game.state = 'vm_we_are_the_people_add' +} + // =========== MOVING THROUGH TURNS ============ function end_round() { @@ -7571,10 +7578,7 @@ states.vm_we_are_the_people_remove = { space(space) { remove_infl(space, 'vm_available_ops') if (game.vm_influence_added[S_LUTHERAN_CHURCH] === 4) { - game.valid_spaces = [...S_EAST_GERMANY] - game.vm_max_infl = 2 - game.vm_available_ops = 4 - game.state = 'vm_we_are_the_people_add' + finish_we_are_the_people() } }, done() { @@ -7584,10 +7588,7 @@ states.vm_we_are_the_people_remove = { log('No SPs removed') vm_next() } else { - game.valid_spaces = [...S_EAST_GERMANY] - game.vm_max_infl = 2 - game.vm_available_ops = game.vm_influence_added[S_LUTHERAN_CHURCH] - game.state = 'vm_we_are_the_people_add' + finish_we_are_the_people() } } } |