summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js40
1 files changed, 16 insertions, 24 deletions
diff --git a/rules.js b/rules.js
index 061d615..9234402 100644
--- a/rules.js
+++ b/rules.js
@@ -1496,19 +1496,7 @@ states.vp_roll = {
push_undo()
log_h2('Scoring')
score_country(game.pwr_struggle_in)
-
- //Check if The Tyrant is Gone occurs
- if (game.persistent_events.includes(C_THE_TYRANT_IS_GONE) && game.pwr_struggle_in === 'Romania' && game.persistent_events.includes(THE_CROWD_TURNS_AGAINST_CEAUSESCU_OCCURRED)) {
- game.persistent_events = game.persistent_events.filter (c => c !== C_THE_CROWD_TURNS_AGAINST_CEAUSESCU)
- game.persistent_events = game.persistent_events.filter (c => c !== THE_CROWD_TURNS_AGAINST_CEAUSESCU_OCCURRED)
- game.return_state = 'finish_scoring'
- if (game.active !== DEM) {
- next_player()
- }
- game.state = 'the_tyrant_is_gone'
- } else {
- game.state = 'finish_scoring'
- }
+ resolve_tyrant()
},
}
@@ -1538,17 +1526,7 @@ states.choose_power = {
scoring () {
push_undo()
score_country(game.pwr_struggle_in)
-
- //Check if The Tyrant is Gone occurs
- if (game.persistent_events.includes(C_THE_TYRANT_IS_GONE) && game.pwr_struggle_in === 'Romania' && game.persistent_events.includes(THE_CROWD_TURNS_AGAINST_CEAUSESCU_OCCURRED)) {
- game.return_state = 'finish_scoring'
- if (game.active !== DEM) {
- next_player()
- }
- game.state = 'the_tyrant_is_gone'
- } else {
- game.state = 'finish_scoring'
- }
+ resolve_tyrant()
}
}
@@ -1569,6 +1547,7 @@ states.the_tyrant_is_gone ={
}
log_h3(`C${C_THE_TYRANT_IS_GONE}`)
game.vm_event = C_THE_TYRANT_IS_GONE
+ console.log('ceausescu occurred', game.persistent_events.includes(THE_CROWD_TURNS_AGAINST_CEAUSESCU_OCCURRED))
goto_vm(game.vm_event)
}
}
@@ -3775,6 +3754,18 @@ function check_tyrant() {
}
}
+function resolve_tyrant() {
+ if (game.persistent_events.includes(C_THE_TYRANT_IS_GONE) && game.pwr_struggle_in === 'Romania' && game.persistent_events.includes(THE_CROWD_TURNS_AGAINST_CEAUSESCU_OCCURRED)) {
+ game.return_state = 'finish_scoring'
+ if (game.active !== DEM) {
+ next_player()
+ }
+ game.state = 'the_tyrant_is_gone'
+ } else {
+ game.state = 'finish_scoring'
+ }
+}
+
function check_systematization() { /* Check for Systematization - may not use this space */
if (game.systematization > 0) {
game.valid_spaces = game.valid_spaces.filter(n => n !== game.systematization)
@@ -5337,6 +5328,7 @@ function vm_the_third_way() {
}
function vm_the_tyrant_is_gone() {
+ permanently_remove(C_THE_CROWD_TURNS_AGAINST_CEAUSESCU)
game.persistent_events.push(THE_TYRANT_IS_GONE_OCCURRED)
game.valid_spaces = []
for (let i = 0; i < spaces.length; i++) {