diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 38 |
1 files changed, 24 insertions, 14 deletions
@@ -7319,21 +7319,27 @@ states.vm_inflationary_currency = { return `resolve ${clean_name(cards[game.played_card].name)}.`
},
prompt() {
- view.prompt = 'Inflationary Currency: choose a country where your opponent has power.'
- if (game.active === DEM) {
- if (!game.revolutions[0]) {gen_action('poland')}
- if (!game.revolutions[1]) {gen_action('hungary')}
- if (!game.revolutions[2]) {gen_action('east_germany')}
- if (!game.revolutions[3]) {gen_action('bulgaria')}
- if (!game.revolutions[4]) {gen_action('czechoslovakia')}
- if (!game.revolutions[5]) {gen_action('romania')}
+ console.log('game.revolutions', game.revolutions, 'length', game.revolutions.length)
+ if (game.revolutions.every(n => n === false)) {
+ view.prompt = 'Inflationary Currency: no countries to choose.'
+ gen_action('pass')
} else {
- if (game.revolutions[0]) {gen_action('poland')}
- if (game.revolutions[1]) {gen_action('hungary')}
- if (game.revolutions[2]) {gen_action('east_germany')}
- if (game.revolutions[3]) {gen_action('bulgaria')}
- if (game.revolutions[4]) {gen_action('czechoslovakia')}
- if (game.revolutions[5]) {gen_action('romania')}
+ view.prompt = 'Inflationary Currency: choose a country where your opponent has power.'
+ if (game.active === DEM) {
+ if (!game.revolutions[0]) {gen_action('poland')}
+ if (!game.revolutions[1]) {gen_action('hungary')}
+ if (!game.revolutions[2]) {gen_action('east_germany')}
+ if (!game.revolutions[3]) {gen_action('bulgaria')}
+ if (!game.revolutions[4]) {gen_action('czechoslovakia')}
+ if (!game.revolutions[5]) {gen_action('romania')}
+ } else {
+ if (game.revolutions[0]) {gen_action('poland')}
+ if (game.revolutions[1]) {gen_action('hungary')}
+ if (game.revolutions[2]) {gen_action('east_germany')}
+ if (game.revolutions[3]) {gen_action('bulgaria')}
+ if (game.revolutions[4]) {gen_action('czechoslovakia')}
+ if (game.revolutions[5]) {gen_action('romania')}
+ }
}
},
east_germany() {
@@ -7372,6 +7378,10 @@ states.vm_inflationary_currency = { log(`Chose ${country_name(game.vm_active_country)}`)
vm_next()
},
+ pass() {
+ log('Passed')
+ vm_return()
+ }
}
states.vm_inflationary_currency_discard = {
|