diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-18 19:10:28 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-18 19:10:28 +0000 |
commit | 828b47de96c9ce53fe94d47bf4d9ad59998c3e89 (patch) | |
tree | 4007f3b9604c2310f8d1798bfff75084a18efcc5 /rules.js | |
parent | a5cad5916776ff66e7c7d224f6b2d966db8d888f (diff) | |
download | 1989-dawn-of-freedom-828b47de96c9ce53fe94d47bf4d9ad59998c3e89.tar.gz |
Add conditional autoresolves
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 |