From 71e67158a9833bb85c41abff755b4c02bbda3dd1 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Sat, 28 Sep 2024 12:35:15 +0100 Subject: Updates Kremlin Coup --- rules.js | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 6b26936..0726b03 100644 --- a/rules.js +++ b/rules.js @@ -3322,12 +3322,14 @@ function new_turn() { if (game.persistent_events['frg_embassies']) { game.persistent_events['frg_embassies'] = false log(`C74 no longer in effect`) + discard_from_table(74) //permanently_remove(74) } if (game.persistent_events['genscher']) { game.persistent_events['genscher'] = false log(`C63 no longer in effect`) + discard_from_table(63) //permanently_remove(63) } @@ -5504,6 +5506,14 @@ function vm_support_falters() { game.state = 'vm_support_falters' } +function vm_kremlin_coup_elite() { + elite_spaces.forEach(space => { + if (spaces[space].country === game.vm_active_country && !check_com_control(space)) { + game.valid_spaces.push(space); + } + }) + game.state = 'vm_kremlin_coup_take_control' +} /* ================== VM STATES ============================== */ @@ -6599,7 +6609,49 @@ states.vm_kremlin_coup_choose_country = { } } } - } + }, + east_germany() { + push_undo() + game.vm_active_country = 'East_Germany' + game.temp = game.temp.filter(country => country !== game.vm_active_country) + log(`Chose ${country_name(game.vm_active_country)}`) + vm_kremlin_coup_elite() + }, + poland() { + push_undo() + game.vm_active_country = 'Poland' + log(`Chose ${country_name(game.vm_active_country)}`) + game.temp = game.temp.filter(country => country !== game.vm_active_country) + vm_kremlin_coup_elite() + }, + czechoslovakia() { + push_undo() + game.vm_active_country = 'Czechoslovakia' + log(`Chose ${country_name(game.vm_active_country)}`) + game.temp = game.temp.filter(country => country !== game.vm_active_country) + vm_kremlin_coup_elite() + }, + hungary() { + push_undo() + game.vm_active_country = 'Hungary' + log(`Chose ${country_name(game.vm_active_country)}`) + game.temp = game.temp.filter(country => country !== game.vm_active_country) + vm_kremlin_coup_elite() + }, + romania() { + push_undo() + game.vm_active_country = 'Romania' + log(`Chose ${country_name(game.vm_active_country)}`) + game.temp = game.temp.filter(country => country !== game.vm_active_country) + vm_kremlin_coup_elite() + }, + bulgaria () { + push_undo() + game.vm_active_country = 'Bulgaria' + log(`Chose ${country_name(game.vm_active_country)}`) + game.temp = game.temp.filter(country => country !== game.vm_active_country) + vm_kremlin_coup_elite() + }, } states.vm_kremlin_coup_take_control = { @@ -6608,10 +6660,10 @@ states.vm_kremlin_coup_take_control = { }, prompt() { if (game.valid_spaces.length === 0){ - view.prompt = 'No spaces remaining. Kremlin Coup: done.' + view.prompt = 'Kremlin Coup. Elite space controlled: done.' gen_action('done') } else { - view.prompt = `Kremlin Coup: Take control of Elite spaces in countries where the Communist retains power.` + view.prompt = `Kremlin Coup: Take control of the Elite spaces in ${country_name(game.vm_active_country)}.` for (let space_id of game.valid_spaces) { gen_action_infl(spaces[space_id].name_unique); } -- cgit v1.2.3