From 828b47de96c9ce53fe94d47bf4d9ad59998c3e89 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Mon, 18 Nov 2024 19:10:28 +0000 Subject: Add conditional autoresolves --- rules.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'rules.js') 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 -- cgit v1.2.3