From 006862724ac445655198d0f355dbf5537b86eada Mon Sep 17 00:00:00 2001 From: iainp5 Date: Sat, 28 Sep 2024 11:46:31 +0100 Subject: Updates to Kremlin Coup --- rules.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/rules.js b/rules.js index 3c6ad2a..3c10004 100644 --- a/rules.js +++ b/rules.js @@ -5040,6 +5040,15 @@ function vm_kremlin_coup() { return } + //countries = ['Poland', 'Hungary', 'East_Germany', 'Bulgaria', 'Czechoslovakia', 'Romania'] + //revolutions: {'East_Germany': false, 'Poland': false, 'Czechoslovakia': false, 'Hungary': false, 'Romania': false, 'Bulgaria': false} + game.temp = [] + countries.forEach(country => { + if (!game.revolutions[country]) { + game.temp.push(country) + } + }) + console.log('game.temp', game.temp) elite_spaces.forEach(space => { if (!game.revolutions[spaces[space].country] && !check_com_control(space)) { game.valid_spaces.push(space); @@ -6575,6 +6584,24 @@ states.vm_kiss_of_death_finish = { } } +states.vm_kremlin_coup_choose_country = { + get inactive() { + return `resolve ${cards[this_card()].name}.` + }, + prompt() { + if (game.temp.length > 0) { + view.prompt = 'Select a country where the Communist retains power.' + for (let country of countries) { + console.log(`checking`, country) + if (game.temp.includes(country)) { + console.log('country in game.temp') + gen_action(`${country}`) + } + } + } + } +} + states.vm_kremlin_coup_take_control = { get inactive() { return `resolve ${cards[game.played_card].name}.` -- cgit v1.2.3