diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-19 23:19:19 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-19 23:19:19 +0100 |
commit | 5394f290e52cf7a92e10bd354ac61ea340130280 (patch) | |
tree | 249c6ef309bff58ba92ecc4bc1c81c29242a0c70 /rules.js | |
parent | eac6d08d56c686b18fe813f72791ebedd3ca5ed9 (diff) | |
download | 1989-dawn-of-freedom-5394f290e52cf7a92e10bd354ac61ea340130280.tar.gz |
Fix for Deutsche Marks with no valid cards
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -5732,10 +5732,15 @@ states.vm_play_event_from_discard = { states.vm_deutsche_marks_prep = {
inactive: 'choose a card.',
prompt() {
- view.prompt = 'Deutsche Marks: choose a card to give.'
- for (let card of game.valid_cards) {
- gen_action_card(card)
- }
+ if (game.valid_cards.length === 0) {
+ view.prompt = 'Deutsche Marks: no cards to give.'
+ gen_action('pass')
+ } else {
+ view.prompt = 'Deutsche Marks: choose a card to give.'
+ for (let card of game.valid_cards) {
+ gen_action_card(card)
+ }
+ }
},
card(card) {
log(`Gave C${cards[card].number}`)
|