summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-11-07 12:11:03 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-11-07 12:11:03 +0000
commit93789d5d423850b2123a8816f6ee32ccbbc67e6e (patch)
treeabaf955e90f6ff33b2678d8bc482356335c4cc64 /rules.js
parent1fa3808840dba64f5344795d5e8f730cc2ebfeb0 (diff)
download1989-dawn-of-freedom-93789d5d423850b2123a8816f6ee32ccbbc67e6e.tar.gz
Fix conditional auto_resolve
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/rules.js b/rules.js
index 4ff3c9b..c1a57d5 100644
--- a/rules.js
+++ b/rules.js
@@ -2999,17 +2999,17 @@ function is_auto_resolve(card) {
return true
}
} else if (card === C_SAJUDIS || card === C_THE_BALTIC_WAY) {
- if (!game.systematization === S_HARGHITA_COVASNA) {
- if (check_dem_control(S_RAZGRAD) && check_dem_control(S_HARGHITA_COVASNA)) {
- if (!game.state.startsWith('vm')) { log('Both Minorities spaces already controlled') }
- return true
- }
- } else if (check_dem_control(S_RAZGRAD)) {
- if (!game.state.startsWith('vm')) { log('Both Minorities spaces already controlled') }
+ if (game.systematization && game.systematization === S_HARGHITA_COVASNA ) {
+ if (check_dem_control(S_RAZGRAD)) {
+ if (!game.state.startsWith('vm')) { log('Minorities spaces already controlled') }
+ return true
+ }
+ } else if (check_dem_control(S_RAZGRAD) && check_dem_control(S_HARGHITA_COVASNA)) {
+ if (!game.state.startsWith('vm')) { log('Minorities spaces already controlled') }
return true
}
} else if (card === C_CEAUSESCU) {
- let dem_romania_infl = spaces.filter(space => space.country === 'Romania' && game.demInfl[space] > 0).length
+ let dem_romania_infl = spaces.filter(space => space.country === 'Romania' && game.demInfl[space.space_id] > 0).length
if (dem_romania_infl === 0) {
if (!game.state.startsWith('vm')) { log('No influence to remove') }
return true
@@ -3033,7 +3033,7 @@ function is_auto_resolve(card) {
}
}
else if (card === C_GOVERNMENT_RESIGNS) {
- let uncontrolled_elites = spaces.filter( s => game.comInfl[s] > 0 && !check_control(s)).length
+ let uncontrolled_elites = spaces.filter( space => game.comInfl[space.space_id] > 0 && !check_control(space.space_id)).length
if (uncontrolled_elites === 0) {
if (!game.state.startsWith('vm')) { log('No uncontrolled Elite spaces') }
return true