summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2025-04-19 11:52:08 +0100
committeriainp5 <iain.pearce.ip@gmail.com>2025-04-19 11:52:08 +0100
commita578ed25a36a16207c2eb01fc095b78888723ba9 (patch)
treead968c1ebb6773a58690ae569bb554ef2c1a11f7
parent6d21a960fcb9ede066545135a93e95363dc19c9b (diff)
download1989-dawn-of-freedom-master.tar.gz
Fix events with coups under Foreign Currency Debt BurdenHEADmaster
-rw-r--r--events.txt2
-rw-r--r--rules.js26
2 files changed, 24 insertions, 4 deletions
diff --git a/events.txt b/events.txt
index cedcd6c..546120d 100644
--- a/events.txt
+++ b/events.txt
@@ -593,7 +593,7 @@ prompt ' spaces with no Democratic SPs'
add_infl_free 4
else
prompt 'Select a Student or Intellectual space'
-valid_spaces_country_socio_2 3 4
+vm_valid_spaces_socio_2_sc SOCIO_STUDENT SOCIO_INTELLECTUALS
support_check_modified 2 2
endif
diff --git a/rules.js b/rules.js
index d1f2984..bb0cbcb 100644
--- a/rules.js
+++ b/rules.js
@@ -4657,6 +4657,13 @@ function vm_valid_spaces_socio() {
vm_next()
}
+function vm_valid_spaces_socio_2_sc() {
+ let socios = [vm_operand(1), vm_operand(2)]
+ valid_spaces_sc()
+ game.valid_spaces = game.valid_spaces.filter(s => socios.includes(spaces[s].socio))
+ vm_next()
+}
+
function vm_valid_spaces_opponent_socio() {
let valid_spaces = []
for (let i = 0; i < spaces.length; i++) {
@@ -7310,14 +7317,27 @@ states.vm_kremlin_coup_take_control = {
states.vm_kremlin_coup_sc_prep = {
prompt() {
- view.prompt = `Kremlin Coup! Conduct a Support Check in ${country_name(game.vm_active_country)}'s Bureaucratic space.`
- gen_action_space(game.selected_space)
+ if (game.foreign_currency_debt_burden === game.vm_active_country) {
+ view.prompt = `Kremlin Coup! May not Support Check in ${country_name(game.vm_active_country)} due to Foreign Currency Debt Burden.`
+ gen_action('done')
+ } else {
+ view.prompt = `Kremlin Coup! Conduct a Support Check in ${country_name(game.vm_active_country)}'s Bureaucratic space.`
+ gen_action_space(game.selected_space)
+ }
},
space(_space) {
push_undo()
log('Support check:')
game.state = 'vm_kremlin_coup_sc'
},
+ done() {
+ push_undo()
+ if (game.temp.length > 0) {
+ game.state = 'vm_kremlin_coup_choose_country'
+ } else {
+ vm_next()
+ }
+ }
}
states.vm_kremlin_coup_sc = {
@@ -9106,7 +9126,7 @@ CODE[76] = [ // Warsaw Pact Summit
[ vm_add_infl_free, 4 ],
[ vm_else ],
[ vm_prompt, 'Select a Student or Intellectual space' ],
- [ vm_valid_spaces_country_socio_2, 3, 4 ],
+ [ vm_valid_spaces_socio_2_sc, SOCIO_STUDENT, SOCIO_INTELLECTUAL ],
[ vm_support_check_modified, 2, 2 ],
[ vm_endif ],
[ vm_return ],