summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js63
1 files changed, 57 insertions, 6 deletions
diff --git a/rules.js b/rules.js
index 915bbea..120c536 100644
--- a/rules.js
+++ b/rules.js
@@ -2998,9 +2998,11 @@ function select_card(card){
function is_auto_resolve(card) {
let ceausecu_events = [10, 41, 101, 107]
-
- if (card === C_THE_TYRANT_IS_GONE) {
- if (!game.persistent_events.includes(C_THE_CROWD_TURNS_AGAINST_CEAUSESCU)) {
+ if (auto_resolve_events.includes(card)) {
+ return true
+ }
+ else if (card === C_THE_TYRANT_IS_GONE) {
+ if (game.persistent_events.includes(C_THE_CROWD_TURNS_AGAINST_CEAUSESCU)) {
return true
}
}
@@ -3009,10 +3011,58 @@ function is_auto_resolve(card) {
}
else if (card === C_KOHL_PROPOSES_REUNIFICATION && !game.persistent_events.includes(C_THE_WALL_MUST_GO)) {
return true
+ }
+ if (card === C_BROUGHT_IN_FOR_QUESTIONING || card === C_DEUTSCHE_MARKS) {
+ if (game.democrat_hand.length === 0) { return true }
+ }
+ else if (card === C_DISSIDENT_ARRESTED) {
+ let dem_intellectual_infl = spaces.filter(space => space.socio === 5 && game.demInfl[space] > 0).length
+ if (dem_intellectual_infl === 0) {
+ log('No influence to remove')
+ return true
+ }
+ } else if (card === C_SAJUDIS || card === C_THE_BALTIC_WAY) {
+ if (!game.systematization === S_HARGHITA_COVASNA) {
+ if (dem_control(S_RAZGRAD) && dem_control(S_HARGHITA_COVASNA)) {
+ log('Both Minorities spaces already controlled')
+ return true
+ }
+ } else if (dem_control(S_RAZGRAD)) {
+ log('Both 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
+ if (dem_romania_infl === 0) {
+ log('No influence to remove')
+ return true
+ }
+ }
+ else if (card === C_WE_ARE_THE_PEOPLE) {
+ if (game.demInfl[S_LUTHERAN_CHURCH] === 0) {
+ log('No influence to remove')
+ return true
+ }
+ }
+ else if (card === C_BETRAYAL) {
+ if (!game.systematization === S_ORTHODOX_CHURCH_ROMANIA) {
+ if (game.demInfl[S_ORTHODOX_CHURCH_BULGARIA] === 0) {
+ log('No influence to remove')
+ return true
+ }
+ } else if (game.demInfl[S_ORTHODOX_CHURCH_BULGARIA] === 0 && game.demInfl[S_ORTHODOX_CHURCH_ROMANIA] === 0) {
+ log('No influence to remove')
+ return true
+ }
+ }
+ else if (card === C_GOVERNMENT_RESIGNS) {
+ let uncontrolled_elites = spaces.filter( s => game.comInfl[s] > 0 && !check_control(s)).length
+ if (uncontrolled_elites === 0) {
+ log('No uncontrolled Elite spaces')
+ return true
+ }
}
- else if (auto_resolve_events.includes(card)) {
- return true
- } else {
+ else {
return false
}
}
@@ -4670,6 +4720,7 @@ function vm_eliminate(space_id) { // Eliminate the democrat influence and move t
}
}
+
function get_adjusted_adjacency(space_id) {
let adjacent_spaces = spaces[space_id].adjacent;
if (adjacent_spaces.includes(game.systematization)) {