summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-11-17 11:38:52 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-11-17 11:38:52 +0000
commitc86eb75d757a0c30e54544e19aea3fc8260cb49d (patch)
tree0919feb32355d5e012d74ea2d472fce1fc3f595d
parent22b3f9cdf2a8f96e4de70775001093de3cd8debc (diff)
download1989-dawn-of-freedom-c86eb75d757a0c30e54544e19aea3fc8260cb49d.tar.gz
Add Dash for the West to conditional auto_resolve
-rw-r--r--events.txt2
-rw-r--r--rules.js8
2 files changed, 10 insertions, 0 deletions
diff --git a/events.txt b/events.txt
index a216941..879fcac 100644
--- a/events.txt
+++ b/events.txt
@@ -259,8 +259,10 @@ heal_our_bleeding_wounds
CARD 36 - Dash for the West*
# Roll a die. If the die roll exceeds the number of Communist controlled spaces in Germany, +1 VP and select any Blue Event with asterisk(*) from the discard pile. The event occurs immediately.
permanently_remove
+if !is_auto_resolve(C_DASH_FOR_THE_WEST)
prompt 'Dash for the West: select any Democratic event with an asterix(*) from the discard pile. Event occurs immediately'
dash_for_the_west
+endif
CARD 37 - Nagy Reburied*
diff --git a/rules.js b/rules.js
index 8dc33a0..d46a814 100644
--- a/rules.js
+++ b/rules.js
@@ -223,6 +223,7 @@ const numberless_cards = [1, 2, 3, 4, 5, 6, 37, 38, 39, 40, 41, 42, 43, 44, 45,
const auto_resolve_events = [5, 8, 9, 13, 17, 25, 26, 30, 35, 50, 53, 54, 58, 59, 62, 63, 65, 70, 72, 74, 86, 99, 102, 108]
const switch_events = [6, 20, 71]
const one_turn_events = [ 8, 13, 25, 50, 63, 74, 49, 58, 59, 100, 101 ]
+const dem_asterisks = [2, 3, 4, 5, 19, 24, 26, 29, 33, 34, 36, 39, 40, 45, 46, 48, 49, 50, 54, 56, 58, 60, 61, 62, 63, 64, 65, 66, 68, 71, 72, 73, 74, 75, 77, 81, 84, 86, 87, 89, 90, 91, 93, 94, 97, 103, 105, 108, 110]
const PC_TACTIC_FAILS = 52
const PC_SUPPORT_FALTERS = 49
@@ -3076,6 +3077,11 @@ function is_auto_resolve(card) {
if (!game.state.startsWith('vm')) { logi('No SPs to remove') }
return true
}
+ } else if (card === C_DASH_FOR_THE_WEST) {
+ if (!game.strategy_discard.includes(dem_asterisks)) {
+ if (!game.state.startsWith('vm')) { logi('No Democratic Events with an asterisk in the discard') }
+ return true
+ }
}
else {
return false
@@ -8170,8 +8176,10 @@ CODE[35] = [ // Heal our Bleeding Wounds*
CODE[36] = [ // Dash for the West*
[ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_DASH_FOR_THE_WEST) ],
[ vm_prompt, 'Dash for the West: select any Democratic event with an asterix(*) from the discard pile. Event occurs immediately' ],
[ vm_dash_for_the_west ],
+ [ vm_endif ],
[ vm_return ],
]