diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-10 19:23:25 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-10 19:23:25 +0100 |
commit | 066774320d4f15cc049d65c9bb82e8564777e20b (patch) | |
tree | 782cf59fa97e3350aae52b6ad4be56648c104642 /rules.js | |
parent | 31714d22537211bdf4fe2c909c7bb574f557ac10 (diff) | |
download | 1989-dawn-of-freedom-066774320d4f15cc049d65c9bb82e8564777e20b.tar.gz |
Tweak view when infl in double figures
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 = {
|