diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-03 13:46:21 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-03 13:46:21 +0100 |
commit | b65978f5a15459031a4bdec3aa16c4e39b2520a2 (patch) | |
tree | ea3d2aa6db791358111dfc504329b6601424f11b | |
parent | 975fbbacd6bb3b6f70c5657e6d624cc33d0730c5 (diff) | |
download | 1989-dawn-of-freedom-b65978f5a15459031a4bdec3aa16c4e39b2520a2.tar.gz |
Added separate state for Common European Home
-rw-r--r-- | events.txt | 1 | ||||
-rw-r--r-- | rules.js | 59 |
2 files changed, 59 insertions, 1 deletions
@@ -543,6 +543,7 @@ permanently_remove CARD 74 - FRG Embassies # +1 for Democratic Support Checks in Eastern Europe the rest of this turn. frg_embassies +permanently_remove CARD 75 - Exit Visas* @@ -4867,7 +4867,7 @@ function vm_army_backs_revolution() { /*if (game.persistent_events['securitate']) {
permanently_remove(70)
}*/
- delete game.persistent_events['securitate']
+ game.persistent_events['securitate']
game.playable_cards = game.playable_cards.filter(n => n !== 70)
/*if (game.table_cards.includes(70)) {
permanently_remove(70)
@@ -6103,6 +6103,62 @@ states.vm_support_check_prep = { }
}
+states.vm_ceh_support_check_prep = {
+ inactive: 'do support checks.',
+ prompt () {
+ if (game.available_ops === 0) {
+ view.prompt = 'Support checks: done.'
+ gen_action('done')
+ //return
+ }
+ if (game.available_ops > 0) {
+ view.prompt = `Select a space. ${pluralize(game.available_ops, 'support check')} remaining.`
+
+ for (let space_id of game.valid_spaces) {
+ gen_action_sc(spaces[space_id].name_unique)
+ }
+ }
+ },
+ sc(space) {
+ push_undo()
+ game.selected_space = find_space_index(space)
+
+ //Then check Austria-Hungary Border Reopened normally
+ //console.log('game.austria_hungary_border_reopened_checked', game.austria_hungary_border_reopened_checked)
+ if (game.vm_available_ops > 1) {
+ console.log('in ahb check, country, ', spaces[game.selected_space].country, 'ahb', game.persistent_events['austria_hungary_border_reopened'])
+ if (spaces[game.selected_space].country === 'East_Germany' && game.persistent_events['austria_hungary_border_reopened'] && game.active === DEM) {
+ game.state = 'vm_austria_hungary_border_reopened_check'
+ return
+ }
+ //game.state = 'do_support_check'
+ } /*else { */
+ game.state = 'vm_ceh_do_support_check'
+ },
+ done () {
+ vm_next ()
+ }
+}
+
+
+states.vm_ceh_do_support_check = {
+ inactive: 'do support checks.',
+ prompt () {
+ view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die.`
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ do_sc(spaces[game.selected_space].name_unique)
+ game.vm_available_ops--
+ if (game.vm_available_ops === 0) {
+ game.valid_spaces = []
+ }
+ game.state = 'vm_ceh_support_check_prep'
+ return
+ }
+}
+
states.vm_austria_hungary_border_reopened_check = {
inactive: 'decide Austria-Hungary Border Reopened',
prompt() {
@@ -8635,6 +8691,7 @@ CODE[73] = [ // Laszlo Tokes* CODE[74] = [ // FRG Embassies
[ vm_frg_embassies ],
+ [ vm_permanently_remove ],
[ vm_return ],
]
|