summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js59
1 files changed, 58 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 8584074..4613822 100644
--- a/rules.js
+++ b/rules.js
@@ -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 ],
]