summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-11-18 19:10:28 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-11-18 19:10:28 +0000
commit828b47de96c9ce53fe94d47bf4d9ad59998c3e89 (patch)
tree4007f3b9604c2310f8d1798bfff75084a18efcc5 /rules.js
parenta5cad5916776ff66e7c7d224f6b2d966db8d888f (diff)
download1989-dawn-of-freedom-828b47de96c9ce53fe94d47bf4d9ad59998c3e89.tar.gz
Add conditional autoresolves
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index ac40f5b..d3c4dd6 100644
--- a/rules.js
+++ b/rules.js
@@ -3087,6 +3087,18 @@ function is_auto_resolve(card) {
if (!game.state.startsWith('vm')) { logi('Democrat has no cards to set aside') }
return true
}
+ } else if (card === C_SPITZEL) {
+ let dem_germany_infl = spaces.filter(space => space.country === 'East_Germany' && game.demInfl[space.space_id] > 0).length
+ if (dem_germany_infl === 0) {
+ if (!game.state.startsWith('vm')) { logi('No influence to remove') }
+ return true
+ }
+ } else if (card === C_MY_FIRST_BANANA) {
+ let com_germany_infl = spaces.filter(space => space.country === 'East_Germany' && game.comInfl[space.space_id] > 0).length
+ if (com_germany_infl === 0) {
+ if (!game.state.startsWith('vm')) { logi('No influence to remove') }
+ return true
+ }
}
else {
return false