summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-10-05 20:18:37 +0100
committeriainp5 <iain.pearce.ip@gmail.com>2024-10-05 20:18:37 +0100
commit8dbc52cfa6c0571b408825dc6b81e75e554b0607 (patch)
tree63f902581ed0d6e550f983687028cb652fd9461e /rules.js
parentc1a35792226f62cf9ca896eea386d9038a482ec2 (diff)
download1989-dawn-of-freedom-8dbc52cfa6c0571b408825dc6b81e75e554b0607.tar.gz
Fix Support Falters with no cards
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 597064a..8ebfe79 100644
--- a/rules.js
+++ b/rules.js
@@ -8326,7 +8326,10 @@ states.vm_support_surges = {
states.vm_support_falters = {
inactive: 'discard cards.',
prompt() {
- if (game.vm_available_ops > 0) {
+ if ((game.active === DEM && game.dem_pwr_hand.length === 0) || (game.active === COM && game.com_pwr_hand.length === 0)) {
+ view.prompt = 'Support Falters: no remaining cards to discard.'
+ gen_action('pass')
+ } else if (game.vm_available_ops > 0) {
view.prompt = 'Support Falters: discard a card.'
gen_action('discard')
} else {
@@ -8340,6 +8343,11 @@ states.vm_support_falters = {
else {discard_card(game.com_pwr_hand)}
game.vm_available_ops --
},
+ pass() {
+ log_msg_gap('Takes initiative')
+ game.return = game.active
+ vm_next()
+ },
done() {
log_msg_gap('Takes initiative')
game.return = game.active