From ba77770e3fc211023090c99fc2a9129ee8d32937 Mon Sep 17 00:00:00 2001
From: iainp5 <iain.pearce.ip@gmail.com>
Date: Mon, 16 Sep 2024 10:36:12 +0100
Subject: Fixes to Kremlin Coup

---
 rules.js | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/rules.js b/rules.js
index 6cea461..da16898 100644
--- a/rules.js
+++ b/rules.js
@@ -692,7 +692,7 @@ states.finish_add_infl = {
 
 states.finish_support_check_prep = {
 
-	inactive: 'do support checks',
+	inactive: 'do support checks.',
 	prompt () {
 		if (game.available_ops === 0) {
 			view.prompt = 'Support checks: done.'
@@ -900,7 +900,7 @@ states.do_support_check = {
 	inactive: 'do support checks.',
 	prompt () {
 		console.log('in do_support_check')
-		view.prompt = `Target: ${spaces[game.selected_space].name_unique}. Roll a die.`
+		view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die.`
 		gen_action('roll')
 	},
 	roll() {
@@ -4100,7 +4100,7 @@ function vm_breakaway_baltic_republics() {
 	check_vp()
 	game.playable_cards[109].playable = 1
 	game.playable_cards[14].playable = 0
-	if (game.pieces[56].demCtrl === 0) {game.valid_spaces.push(56)}
+	if (game.pieces[56].demCtrl === 0 && game.persistent_events['systematization'] !== 56) {game.valid_spaces.push(56)}
 	if (game.pieces[70].demCtrl === 0) {game.valid_spaces.push(70)}
 	vm_next()
 }
@@ -4424,7 +4424,7 @@ function vm_kremlin_coup() {
 	check_vp()
 
 	elite_spaces.forEach(space => {
-        if (revolutions[spaces[space].country]) {
+        if (game.revolutions[spaces[space].country]) {
             game.valid_spaces.push(space);
     	}
 	})
@@ -5119,7 +5119,7 @@ states.vm_remove_all_infl = {
 }
 
 states.vm_support_check_prep = {
-	inactive: 'do support check',
+	inactive: 'do support checks.',
 	prompt () {
 		console.log('in states.vm_support_check_prep, game.vm_available_ops: ', game.vm_available_ops)
 		if (game.vm_available_ops === 0) {
@@ -5272,6 +5272,9 @@ states.vm_brought_in_for_questioning = {
 		}
 	},
 	done() {
+		if (game.vm_event = 0) {
+			log('No cards to discard')
+		}
 		vm_return()
 	}
 }
@@ -6301,24 +6304,30 @@ states.vm_social_democratic_platform_adopted = {
 	},
 	east_germany() {
 		game.vm_active_country = 'East_Germany'
+		log(`Selected ${game.vm_active_country}`)
 		vm_next()
 	},
 	poland() { 
 		game.vm_active_country = 'Poland'
+		log(`Selected ${game.vm_active_country}`)
 		vm_next()},
 	czechoslovakia() { 
 		game.vm_active_country = 'Czechoslovakia'
+		log(`Selected ${game.vm_active_country}`)
 		vm_next()},
 	hungary() { 
 		game.vm_active_country = 'Hungary'
+		log(`Selected ${game.vm_active_country}`)
 		vm_next()
 	},
 	romania() { 
 		game.vm_active_country = 'Romania'
+		log(`Selected ${game.vm_active_country}`)
 		vm_next()
 	},
 	bulgaria () { 
 		game.vm_active_country = 'Bulgaria'
+		log(`Selected ${game.vm_active_country}`)
 		vm_next()}
 }
 
@@ -7166,7 +7175,7 @@ CODE[33] = [ // Sajudis*
 CODE[34] = [ // Fidesz*
 	[ vm_valid_spaces, 47 ],
 	[ vm_prompt, 'the Hungary students space' ],
-	[ vm_add_x_infl, 6 ],
+	[ vm_add_x_infl, 5 ],
 	[ vm_permanently_remove ],
 	[ vm_return ],
 ]
-- 
cgit v1.2.3