summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data.js4
-rw-r--r--events.txt69
-rw-r--r--rules.js323
3 files changed, 261 insertions, 135 deletions
diff --git a/data.js b/data.js
index 0ec9d22..4187349 100644
--- a/data.js
+++ b/data.js
@@ -48,7 +48,7 @@ const spaces = [
{name: 'Hungarian Writers', name_unique: 'Hungarian Writers', space_id: 46, socio: 5, stability: 2, battleground: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 348, y: 1040, h: 65, w: 105}, demInfl: 0, comInfl: 0, demCtrl: 0, comCtrl: 0, adjacent: [47, , , , ]},
{name: 'Eotvos Lorand University', name_unique: 'Eotvos Lorand University', space_id: 47, socio: 6, stability: 1, battleground: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 512, y: 1034, h: 65, w: 105}, demInfl: 0, comInfl: 0, demCtrl: 0, comCtrl: 0, adjacent: [46, 45, , , ]},
{name: 'Szeged', name_unique: 'Szeged', space_id: 48, socio: 3, stability: 4, battleground: 1, country: 'Hungary', region: 'Eastern Europe', box: {x: 632, y: 1073, h: 65, w: 105}, demInfl: 1, comInfl: 0, demCtrl: 0, comCtrl: 0, adjacent: [45, 49, 50, , ]},
- {name: 'Pecs', name_unique: 'Pecs', space_id: 49, socio: 3, stability: 4, battleground: 1, country: 'Hungary', region: 'Eastern Europe', box: {x: 486, y: 1105, h: 65, w: 105}, demInfl: 0, comInfl: 0, demCtrl: 0, comCtrl: 0, adjacent: [48, , , , ]},
+ {name: 'Pecs', name_unique: 'Pecs', space_id: 49, socio: 3, stability: 4, battleground: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 486, y: 1105, h: 65, w: 105}, demInfl: 0, comInfl: 0, demCtrl: 0, comCtrl: 0, adjacent: [48, , , , ]},
{name: 'Timisoara', name_unique: 'Timisoara', space_id: 50, socio: 4, stability: 3, battleground: 1, country: 'Romania', region: 'Balkans', box: {x: 597, y: 1204, h: 65, w: 105}, demInfl: 0, comInfl: 0, demCtrl: 0, comCtrl: 0, adjacent: [48, 51, 60, , ]},
{name: 'Cluj-Napoca', name_unique: 'Cluj-Napoca', space_id: 51, socio: 1, stability: 4, battleground: 1, country: 'Romania', region: 'Balkans', box: {x: 756, y: 1125, h: 65, w: 105}, demInfl: 0, comInfl: 2, demCtrl: 0, comCtrl: 0, adjacent: [50, 54, 58, 61, ]},
{name: 'Targu Mures', name_unique: 'Targu Mures', space_id: 52, socio: 3, stability: 4, battleground: 0, country: 'Romania', region: 'Balkans', box: {x: 915, y: 1136, h: 65, w: 105}, demInfl: 0, comInfl: 0, demCtrl: 0, comCtrl: 0, adjacent: [53, 56, , , ]},
@@ -166,7 +166,7 @@ const cards = [
{number: 83, period: 3, side: 'C', name: 'Modrow*', ops: 2, remove: 1, playable: 1, red: false},
{number: 84, period: 3, side: 'D', name: 'Breakaway Baltic Republics*', ops: 4, remove: 1, playable: 0, red: true},
{number: 85, period: 3, side: 'N', name: 'Tank Column/Tank Man*', ops: 2, remove: 1, playable: 1, red: false},
- {number: 86, period: 3, side: 'D', name: '\"The Wall Must Go!*\"', ops: 3, remove: 0, playable: 1, red: false},
+ {number: 86, period: 3, side: 'D', name: '\"The Wall Must Go!\"*', ops: 3, remove: 0, playable: 1, red: false},
{number: 87, period: 3, side: 'D', name: 'Kohl Proposes Reunification*', ops: 3, remove: 1, playable: 1, red: false},
{number: 88, period: 3, side: 'C', name: 'Adamec*', ops: 2, remove: 1, playable: 1, red: false},
{number: 89, period: 3, side: 'D', name: 'Domino Theory*', ops: 3, remove: 1, playable: 1, red: false},
diff --git a/events.txt b/events.txt
index b57b96e..f76cb99 100644
--- a/events.txt
+++ b/events.txt
@@ -4,7 +4,7 @@ CARD 1 - Legacy of Martial Law*
valid_spaces_country_opp 'Poland'
legacy_of_martial_law
valid_spaces_country_sc 'Poland'
-prompt ' in Poland'
+prompt 'Make a Support Check in Poland'
support_check 1
permanently_remove
@@ -13,7 +13,7 @@ CARD 2 - Solidarity Legalised*
# Place a Democratic SP in every uncontrolled Worker and Farmer space in Poland. Allows play of Walesa.
solidarity_legalised
valid_spaces_solidarity_legalised
-prompt 'every uncontrolled Worker and Farmer space in Poland'
+prompt 'to every uncontrolled Worker and Farmer space in Poland'
add_limited_infl 9 1
permanently_remove
@@ -24,7 +24,7 @@ valid_spaces_country 'Poland'
prompt 'any space(s) in Poland'
add_infl_free 4
valid_spaces_country_sc 'Poland'
-prompt ' in Poland'
+prompt 'Make Support Checks in Poland'
support_check 2
permanently_remove
@@ -67,7 +67,7 @@ permanently_remove
CARD 10 - Cult of Personality
# Place 4 Communist SPs in Worker or Farmer spaces in Romania, no more than 2 per space.
-valid_spaces_country_socio_2 'Romania' 3 4
+valid_spaces_country_socio_2 'Romania', 3, 4
prompt 'in Worker or Farmer spaces in Romania, no more than 2 per space'
add_limited_infl 4 2
permanently_remove
@@ -83,8 +83,8 @@ remove_x_opp_infl 2
CARD 12 - Apparatchicks
# Place 3 Communist SPs in any Bureaucratic space(s).
valid_spaces_socio 2
-prompt 'any Bureaucratic space(s)'
-add_infl 3
+prompt ' to any Bureaucratic space(s)'
+add_infl_free 3
permanently_remove
@@ -99,6 +99,7 @@ CARD 14 - Gorbachev Charms the West
valid_spaces_opponent
remove_opp_infl 2
valid_spaces_sc
+prompt 'Make a Support Check'
support_check 1
@@ -115,7 +116,7 @@ permanently_remove
CARD 17 - Roundtable talks
-# Place in front of the Democratic Player. In the next Power Struggle - he draw 2 random Power Struggle - cards from the Communist player. Then place this card in the discard pile.
+# Place in front of the Democratic Player. In the next Power Struggle - he draws 2 random Power Struggle - cards from the Communist player. Then place this card in the discard pile.
roundtable_talks
@@ -130,7 +131,7 @@ permanently_remove
CARD 19 - Papal vist
# Place 3 SPs in any Catholic Church space.
valid_spaces 20 35 38
-prompt 'in any Catholic Church space'
+prompt 'any Catholic Church space'
add_x_infl 3
permanently_remove
@@ -182,7 +183,7 @@ prompt ' from a Worker space'
remove_opp_infl 1
valid_spaces_opponent_socio 4
active_country
-prompt ' Worker space in the same country'
+prompt 'Make a support check in a Worker space in the same country'
support_check 1
@@ -239,7 +240,7 @@ permanently_remove
CARD 35 - Heal our Bleeding Wounds*
-# Increase USSR Stability by 1. If played in Early Year, -3 VPs. If played in Mid Year, -1 VP. If played in Late Year, +3 VPs.
+# If played in Early Year, -3 VPs. If played in Mid Year, -1 VP. If played in Late Year, +3 VPs.
heal_our_bleeding_wounds
permanently_remove
@@ -283,7 +284,7 @@ valid_spaces_country 'Hungary'
prompt 'Hungary'
add_infl_free 3
valid_spaces_country_sc 'Hungary'
-prompt ' in Hungary'
+prompt 'Make a Support Check in Hungary'
support_check 1
permanently_remove
@@ -294,7 +295,7 @@ valid_spaces_country_sc 'Romania'
prompt ' from Romania'
remove_opp_infl 3
valid_spaces_country_sc 'Romania'
-prompt ' in Romania'
+prompt 'Make a support check in Romania'
support_check 1
ceausescu
permanently_remove
@@ -314,10 +315,12 @@ CARD 44 - Inflationary Currency
# Target any Country where your opponent has Power. Place 2 SPs and make 1 Support Check in the Country using the Ops value of this card. Your opponent may cancel the Support Check by discarding a 3 Ops value card.
inflationary_currency
valid_spaces_country_sc
+prompt ()=>` from ${country_name(game.vm_active_country)}`
remove_opp_infl 2
inflationary_currency_discard
if discarded_card()
valid_spaces_country_sc
+prompt `Make a Support Check in ${game.vm_active_country}`
support_check 1
endif
permanently_remove
@@ -433,7 +436,7 @@ the_monday_demonstrations
prompt 'the Lutheran Church Space and Leipzig'
take_control_prep 2
valid_spaces_country_sc 'East_Germany'
-prompt ' in East Germany'
+prompt 'Make 5 Support Checks in East Germany'
support_check 5
permanently_remove
@@ -512,10 +515,17 @@ CARD 73 - Laszlo Tokes*
valid_spaces 50 56
prompt 'in Timisoara and Harghita/Covasna'
add_limited_infl 2 1
+prompt ' in Romania'
laszlo_tokes
+add_infl
+permanently_remove
+return
+prompt 'Make 2 Support Checks in Romania'
+support_check 2
permanently_remove
+
CARD 74 - FRG Embassies
# +1 for Democratic Support Checks in Eastern Europe the rest of this turn.
frg_embassies
@@ -530,6 +540,14 @@ permanently_remove
CARD 76 - Warsaw Pact Summit
# The Warsaw Pact holds a summit in Bucharest. The Communist player chooses who dominates the summit, the hardliners or the reformers. The Communist may either make 2 Support Checks with a +2 drm against Student and intellectual spaces, or place 4 SPs in spaces with no influence that are not controlled by the Democratic player.
warsaw_pact_summit
+if game.phase === 3
+prompt ' spaces with no Democratic influence'
+add_infl_free 4
+else
+prompt 'Select a Student or Intellectual space'
+valid_spaces_country_socio_2 3, 4
+support_check_modified 2 2
+endif
permanently_remove
@@ -556,7 +574,7 @@ permanently_remove
CARD 80 - Nepotism*
# Roll a die. 1-2: Place 4 Communist SPs in Worker spaces in the Balkans. 3-4: add 3 SPs in Worker spaces in the Balkans. 5-6: add 1 SP to a Worker space in the Balkans.
nepotism
-valid_spaces_region_socio 'Balkans' 4
+valid_spaces_region_socio 'Balkans', 4
prompt 'Worker spaces in the Balkans'
add_infl_free
permanently_remove
@@ -593,7 +611,7 @@ breakaway_baltic_republics
prompt 'any Minorities space'
take_control_prep 1
valid_spaces_sc
-prompt ' for a support check'
+prompt 'Select a space for a support check'
support_check 1
permanently_remove
@@ -639,7 +657,7 @@ prompt 'Czechoslovakia'
add_infl_free 4
civic_forum
valid_spaces_country_sc 'Czechoslovakia'
-prompt ' in Czechoslovakia'
+prompt 'Select a space in Czechoslovakia'
support_check 2
permanently_remove
@@ -650,7 +668,7 @@ valid_spaces_country_opp 'East_Germany'
prompt ' from East Germany'
remove_opp_infl 2
valid_spaces_country_sc 'East_Germany'
-prompt ' in East Germany'
+prompt 'Select a space in East Germany'
support_check 2
permanently_remove
@@ -665,6 +683,7 @@ CARD 93 - Shock Therapy*
# Target country must be one where the Communist has been toppled from power. Successful 3-6. -1 for every Communist Worker or Farmer space. +2 VPs and place 3 SPs in the country
shock_therapy
valid_spaces_country
+prompt `to ${game.vm_active_country}`
add_infl 3
permanently_remove
@@ -675,7 +694,7 @@ valid_spaces_country_sc 'Bulgaria'
prompt ' from Bulgaria'
remove_opp_infl 4
valid_spaces_country_sc 'Bulgaria'
-prompt ' in Bulgaria'
+prompt 'Make 2 Support Checks in Bulgaria'
support_check 2
permanently_remove
@@ -689,6 +708,7 @@ CARD 96 - The Chinese Solution*
# Can only take place if the Communist has reached the Protesters Massacred space on the Tiananmen Square track. The Communist may choose 1 country where he retains Power and conduct 5 Support Checks with a +3 modifier, but suffers a penalty of +3 VPs.
the_chinese_solution
valid_spaces_country_sc
+prompt `Make 5 Support Checks in ${game.vm_active_country}`
support_check_modified 5 3
permanently_remove
@@ -708,7 +728,7 @@ valid_spaces_country_sc 'Bulgaria'
prompt ' from Bulgaria'
remove_limited_opp_infl 3 2
valid_spaces_country_sc 'Bulgaria'
-prompt ' in Bulgaria'
+prompt 'Make a support check in Bulgaria'
support_check 1
permanently_remove
@@ -755,9 +775,11 @@ CARD 105 - Public Against Violence*
# Place 2 Democratic SPs each in Kosice and Presov. Make one Support Check in Bratislava using the Ops value of this card.
valid_spaces 36 37
prompt 'Kosice and Presov'
-add_limited_infl 4 2
+add_x_infl 2
+valid_spaces 36 37
+add_x_infl 2
public_against_violence
-prompt ': Bratislava'
+prompt 'Make a Support Check in Bratislava'
support_check_modified 1 2
permanently_remove
@@ -768,6 +790,7 @@ social_democratic_platform_adopted
valid_spaces_country
add_infl_free 2
valid_spaces_country_sc
+prompt `Make a Support Check in ${game.vm_active_country}`
support_check 1
permanently_remove
@@ -775,7 +798,7 @@ permanently_remove
CARD 107 - Massacre in Timisoara*
# Communist Player makes Support Checks in Romania using the Ops value of this card with +2 drm. Requires play of Lazslo Tokes.
valid_spaces_country_sc 'Romania'
-prompt ' in Romania'
+prompt 'Make Support Checks in Romania'
support_check_modified 2 2
permanently_remove
@@ -797,5 +820,7 @@ permanently_remove
CARD 110 - Malta Summit*
# Roll a die. The summit is successful 4-6. If successful, +3VPs and remove 5 Communist SPs from elite space(s). The Democrat receives a modifier based on the USSR Stability Track: +1 if Sajudis +2 if The Baltic Way +3 if Breakaway Baltic Republics Not playable for the event after Kremlin Coup.
malta_summit
+prompt ' from Elite spaces'
+remove_opp_infl 5
permanently_remove
diff --git a/rules.js b/rules.js
index d023f8d..e006e4b 100644
--- a/rules.js
+++ b/rules.js
@@ -414,16 +414,20 @@ states.choose_card = {
gen_action("done");
return;
} */
-
- view.prompt = 'Choose a card.'
- let available_cards
- if (game.active === DEM) {
- available_cards = game.democrat_hand
+ if ((game.active===DEM && game.democrat_hand.length === 0) || game.active === COM && game.communist_hand.length === 0) {
+ view.prompt = 'No cards remaining: you must pass.'
+ gen_action('pass')
} else {
- available_cards = game.communist_hand
- }
- for (let card of available_cards) {
- gen_action_card(card)
+ view.prompt = 'Choose a card.'
+ let available_cards
+ if (game.active === DEM) {
+ available_cards = game.democrat_hand
+ } else {
+ available_cards = game.communist_hand
+ }
+ for (let card of available_cards) {
+ gen_action_card(card)
+ }
}
},
card(card) {
@@ -463,13 +467,17 @@ states.choose_card = {
//Check Ligachev
if (game.active === DEM && game.persistent_events['ligachev'] && card !== 14) {
- log('-3 VP from Ligachev')
+ log('-3 VP from C99')
game.vp -= 3
check_vp()
game.persistent_events['ligachev'] = false
}
game.state = 'play_card'
},
+ pass() {
+ log('No cards remaining. Passed')
+ end_round()
+ }
/*done () {
game.state = 'play_card'
} */
@@ -607,7 +615,7 @@ states.resolve_opponent_event = {
gen_action('tst_7')
}
view.prompt = `${clean_name(cards[game.played_card].name)}: you must resolve the opponent event.`
- gen_action('event')
+ gen_action('opp_event')
} else {
view.prompt = 'Event resolved. End the action round.'
gen_action('done')
@@ -624,7 +632,7 @@ states.resolve_opponent_event = {
game.state = 'finish_support_check_prep'
valid_spaces_sc()
},
- event() {
+ opp_event() {
game.vm_event_to_do = false
game.return_state = 'resolve_opponent_event'
if (auto_resolve_events.includes(game.played_card) || switch_events.includes(game.played_card)) {
@@ -859,7 +867,7 @@ states.support_check_prep = {
if (spaces[game.selected_space].country === 'East_Germany' && game.persistent_events['austria_hungary_border_reopened'] && game.active === DEM) {
game.state = 'austria_hungary_border_reopened_check'
}
- game.state = 'do_support_check'
+ //game.state = 'do_support_check'
} else {
game.state = 'do_support_check'
}
@@ -1253,8 +1261,8 @@ states.power_struggle = {
log('Conceded')
log_h2('Aftermath')
log_h3('Support Loss')
- if ((game.played_power_card >= 25 && game.played_power_card <= 30) || game.played_power_card === 53) {game.rally_win = 2}
- if ((game.played_power_card >= 31 && game.played_power_card <= 36) || game.played_power_card === 54) {game.petition_win = 2}
+ //if ((game.played_power_card >= 25 && game.played_power_card <= 30) || game.played_power_card === 53) {game.rally_win = 2}
+ //if ((game.played_power_card >= 31 && game.played_power_card <= 36) || game.played_power_card === 54) {game.petition_win = 2}
game.phase = 0
game.state = 'support_loss'
},
@@ -1342,8 +1350,12 @@ states.support_loss ={
},
roll () {
let roll = Math.floor(Math.random() * 6) + 1
+ let rally_win = 0
+ let petition_win = 0
log(`Rolled a ${roll}`)
- roll = roll + game.raised_stakes + game.rally_win - game.petition_win
+ if ((game.played_power_card >= 25 && game.played_power_card <= 30) || game.played_power_card === 53) { rally_win = 2}
+ if ((game.played_power_card >= 31 && game.played_power_card <= 36) || game.played_power_card === 54) { petition_win = 2}
+ roll = roll + game.raised_stakes + rally_win - petition_win
// Roll modifiers
if (game.active === COM && game.persistent_events['yakovlev']) {
@@ -1358,10 +1370,10 @@ states.support_loss ={
if (game.raised_stakes !== 0) {
log(`+${game.raised_stakes} from Raising the Stakes`)
}
- if (game.rally_win !== 0) {
+ if (rally_win !== 0) {
log('+2 from winning on a P25')
}
- if (game.petition_win !== 0) {
+ if (petition_win !== 0) {
log('-2 from winning on a P31')
}
log(`Modified roll: ${roll}`)
@@ -1401,7 +1413,11 @@ states.vp_roll = {
roll () {
let roll = Math.floor(Math.random() * 6) + 1
log(`Rolled a ${roll}`)
- roll = roll + game.raised_stakes + game.rally_win - game.petition_win
+ let rally_win = 0
+ let petition_win = 0
+ if ((game.played_power_card >= 25 && game.played_power_card <= 30) || game.played_power_card === 53) {rally_win = 2}
+ if ((game.played_power_card >= 31 && game.played_power_card <= 36) || game.played_power_card === 54) {petition_win = 2}
+ roll = roll + game.raised_stakes + rally_win - petition_win
if (game.active === DEM && game.persistent_events['yakovlev']) {
log('+1 from Yakovlev Counsels Gorbachev')
roll ++
@@ -1412,10 +1428,10 @@ states.vp_roll = {
if (game.raised_stakes !== 0) {
log(`+${game.raised_stakes} from Raising the Stakes`)
}
- if (game.rally_win !== 0) {
+ if (rally_win !== 0) {
log('+2 from winning on a P25')
}
- if (game.petition_win !== 0) {
+ if (petition_win !== 0) {
log('-2 from winning on a P31')
}
log(`Modified roll: ${roll}`)
@@ -1635,7 +1651,7 @@ states.general_strike = {
gen_action_card(card)
}
} else if (game.phase === 1) {
- view.prompt = 'Discard a card: finished.'
+ view.prompt = 'General Strike: done.'
gen_action('done')
} else if (game.played_card > 0 ) {
view.prompt = 'Roll a die.'
@@ -1956,7 +1972,7 @@ function do_sc(space) {
// Check if in Tiananmen Square Track Award
else if (game.state === 'vm_tst_6_sc') {
- roll = 2
+ roll += 2
log('+2 from Tiananmen Square Track award')
}
else {
@@ -1985,10 +2001,10 @@ function do_sc(space) {
roll++
log('+1 from C74')
}
- if (game.warsaw_pact_summit) {
+ /*if (game.warsaw_pact_summit) {
roll += 2
log('+2 from C76')
- }
+ }*/
if (game.active === DEM && spaces[clicked_space].country === 'East_Germany' && game.persistent_events['grenztruppen']) {
roll--
log('-1 from C59')
@@ -2477,6 +2493,7 @@ function take_power(country) {
log(`Democrat takes power in ${game.pwr_struggle_in}`)
game.revolutions[country] = true
+ game.times_held[country] = 1
}
@@ -2581,8 +2598,8 @@ function end_round() {
console.log('in end')
return}
- //Check if the card has been removed or played to table. If not, discard.
- if (!game.strategy_removed.includes(game.played_card) && !game.table_cards.includes(game.played_card)) {
+ //Check if the card has been removed or played to table, and if a card has been not been played. If not, discard.
+ if (!game.strategy_removed.includes(game.played_card) && !game.table_cards.includes(game.played_card) && game.played_card > 0) {
game.strategy_discard.push(game.played_card)
}
@@ -2598,14 +2615,19 @@ function end_round() {
game.vm_active_country = ''
game.return_state = ''
game.discard = false
- game.warsaw_pact_summit = false
+ //game.warsaw_pact_summit = false
game.vm_influence_added = {}
game.return = ''
game.valid_cards = []
game.valid_spaces = []
// Check for duplicate card entries
- let card_check = [...game.strategy_deck, ...game.strategy_discard, ...game.strategy_removed, ...game.table_cards, ...game.communist_hand, ... game.democrat_hand];
+ let card_check
+ if (game.samizdat_card > 0) {
+ card_check = [...game.strategy_deck, ...game.strategy_discard, ...game.strategy_removed, ...game.table_cards, ...game.communist_hand, ... game.democrat_hand, game.samizdat_card];
+ } else {
+ card_check = [...game.strategy_deck, ...game.strategy_discard, ...game.strategy_removed, ...game.table_cards, ...game.communist_hand, ... game.democrat_hand];
+ }
function check_duplicates(array) {
return new Set(array).size !== array.length;
@@ -3021,6 +3043,7 @@ function reset_power() {
game.rally_win = 0
game.petition_win = 0
game.tactics_fails = ''
+ game.view_opp_hand = false
if (game.persistent_events['peasant_parties_revolt']){
permanently_remove(72)
@@ -3037,10 +3060,10 @@ function reset_power() {
game.table_cards = game.table_cards.filter(card => card !== 54)
game.persistent_events['the_crowd_turns_against_ceausescu'] = false
}
- if (game.pwr_struggle_in === 'Romania' && game.persistent_events['systematization']){
- permanently_remove(69)
- game.table_cards = game.table_cards.filter(card => card !== 69)
- game.persistent_events['systematization'] = false
+ if (game.pwr_struggle_in === 'Romania' && game.persistent_events['securitate']){
+ permanently_remove(70)
+ game.table_cards = game.table_cards.filter(card => card !== 70)
+ game.persistent_events['securitate'] = false
}
}
@@ -3084,6 +3107,10 @@ function clean_name(str) {
}
}
+function country_name(country) {
+ return country.replace(/_/g, ' ')
+}
+
// ======== LOG COMMANDS =============
function log(msg) {
@@ -3251,6 +3278,7 @@ function vm_log() {
}
function vm_if() {
+ console.log('vm_operand(1)', vm_operand(1))
if (!vm_operand(1)) {
let balance = 1
while (balance > 0) {
@@ -3282,6 +3310,38 @@ function vm_endif() {
vm_next()
}
+function vm_goto_step(step) {
+ console.log('vm_goto_step called, target:', step)
+
+ for (let i = 0; i < CODE[game.vm.fp].length; i++) {
+ if (CODE[game.vm.fp][i][0] === step) {
+ game.vm.ip = i;
+ vm_exec();
+ return;
+ }
+ }
+
+ console.log("ERROR: Target operation not found in the current procedure.");
+}
+
+
+function vm_goto(op, nop, dir, step) {
+ console.log('vm_inst(0)', vm_inst(0), op, nop)
+ console.log('vm_inst(0)', vm_inst(1), op, nop)
+ let balance = 1
+ while (balance > 0) {
+ game.vm.ip += dir
+ if (vm_inst(0) === op)
+ --balance
+ if (vm_inst(0) === nop)
+ ++balance
+ if (game.vm.ip < 0 || game.vm.ip > CODE[game.vm.fp].length)
+ throw "ERROR"
+ }
+ game.vm.ip += step
+ vm_exec()
+}
+
function event_prompt(str) {
console.log('event_prompt called with', str)
if (typeof str === "undefined")
@@ -3325,7 +3385,7 @@ function vm_return() {
} */
console.log('in vm_return, discard:', game.strategy_discard)
game.support_check_modifier = 0
- game.view_opp_hand = false
+ //game.view_opp_hand = false
console.log('in vm_return, game.vm_return:', game.vm_return, 'game.return_state:', game.return_state, 'game.vm_infl_to_do', game.vm_infl_to_do, 'game.vm_event_to_do', game.vm_event_to_do)
/*if (!game.vm_infl_to_do && !game.vm_event_to_do) {
if (game.round_player !== game.active) {
@@ -4564,8 +4624,8 @@ function vm_tear_gas () {
function vm_the_baltic_way() {
game.playable_cards[84].playable = 1
game.stability++
- if (game.pieces[56].demCtrl === 0) {game.valid_spaces.push(56)}
- if (game.pieces[70].demCtrl === 0) {game.valid_spaces.push(70)}
+ if (game.pieces[56].demCtrl === 0 && game.persistent_events['systematization'] !== 56) {game.valid_spaces.push(56)}
+ if (game.pieces[70].demCtrl === 0 && game.persistent_events['systematization'] !== 70) {game.valid_spaces.push(70)}
log('+3 VP')
game.vp += 3
check_vp()
@@ -4629,7 +4689,7 @@ function vm_the_wall_must_go() {
}
function vm_warsaw_pact_summit() {
- game.warsaw_pact_summit = true
+ game.warsaw_pact_summit = true /*What does this do? */
game.state = 'vm_warsaw_pact_summit'
}
@@ -4652,6 +4712,7 @@ function vm_workers_revolt() {
}
} else {
for (let space of spaces) {
+ if (!space) continue
let country = space.country
if (game.revolutions[`${country}`] && game.pieces[space.space_id].demInfl > 0 && space.socio === 4) {
game.valid_spaces.push(space.space_id);
@@ -4669,13 +4730,13 @@ function vm_yakovlev_counsels_gorbachev() {
}
function vm_permanently_remove () {
- // Check if the event is being played as the result of another card, e.g. Dash for the West
- if (game.vm_event !== 0) {
+ // Check if the event is being played as the result of another card, e.g. Dash for the West, is a card which should be removed, and which hasn't already been removed!
+ if (game.vm_event !== 0 && cards[game.vm_event].remove === 1 && !game.strategy_removed.includes(game.vm_event)) {
permanently_remove(game.vm_event)
}
- if (game.played_card !== 21) {
+ if (cards[game.played_card].remove ===1 && !game.strategy_removed.includes(game.played_card)) {
permanently_remove(game.played_card)
- } /*This means the card that called the event being played is also removed. Is there ever a time when this is a problem? Common European Home fix added */
+ } /*This means the card that called the event being played is also removed if relevant. Think this makes sense */
vm_next()
}
@@ -4764,7 +4825,7 @@ states.vm_add_infl = {
gen_action('done')
}
else if (game.vm_available_ops > 0 ) {
- view.prompt = `${clean_name(cards[this_card()].name)}: add ${game.vm_available_ops} influence to ${event_prompt()}.`
+ view.prompt = `${clean_name(cards[this_card()].name)}: add ${game.vm_available_ops} influence${event_prompt()}.`
for (let space_id of game.valid_spaces) {
/*const space = spaces.find(s => s && s.space_id === space_id);
@@ -4855,7 +4916,7 @@ states.vm_add_x_infl = {
states.vm_add_limited_infl = {
get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}: add influcence.`
+ return `resolve ${clean_name(cards[this_card()].name)}: add influence.`
},
prompt () {
if (game.vm_available_ops > 0 && game.valid_spaces.length > 0) {
@@ -5021,7 +5082,7 @@ states.vm_support_check_prep = {
gen_action('done')
} else {
if (game.vm_available_ops > 0) {
- view.prompt = `Select a space${event_prompt()}. ${pluralize(game.vm_available_ops, 'support check')} remaining.`
+ view.prompt = `${event_prompt()}. ${pluralize(game.vm_available_ops, 'support check')} remaining.`
}
for (let space_id of game.valid_spaces) {
if (!space_id) continue
@@ -5085,7 +5146,7 @@ states.vm_adamec = {
return `resolve ${cards[88].name}.`
},
prompt() {
- view.prompt = 'Roll a die.'
+ view.prompt = 'Adamec: roll a die.'
gen_action('roll')
},
roll() {
@@ -5123,14 +5184,14 @@ states.vm_brought_in_for_questioning = {
}
},
discard() {
- game.temp = discard_card(game.democrat_hand)
+ game.vm_event = discard_card(game.democrat_hand)
game.phase = 1
- if (cards[game.temp].side === 'C') {
+ if (cards[game.vm_event].side === 'C') {
game.return = game.active
- if (!auto_resolve_events.includes(game.temp)) {
+ if (!auto_resolve_events.includes(game.vm_event)) {
next_player()
}
- goto_vm(game.temp)
+ goto_vm(game.vm_event)
}
},
done() {
@@ -5177,16 +5238,16 @@ states.vm_common_european_home = {
return `resolve ${cards[game.played_card].name}.`
},
prompt() {
- if (game.temp === 0) {
+ if (game.vm_event === 0) {
view.prompt = `Common European Home: play an opponent's card, event does not occur.`
for (let card of game.valid_cards) {
gen_action_card(card)
}
} else {
- view.prompt = `Play ${cards[game.temp].name} for:`
+ view.prompt = `Play ${cards[game.vm_event].name} for:`
gen_action('influence')
gen_action('support_check')
- if (game.active === DEM && game.temp === 87 ) {
+ if (game.active === DEM && game.vm_event === 87 ) {
return /*Special condition if card is actually Kohl Proposes Reunification*/
}
if (game.active === DEM && game.dem_tst_attempted_this_turn === 0 || game.active === COM && game.com_tst_attempted_this_turn === 0) {
@@ -5198,11 +5259,11 @@ states.vm_common_european_home = {
log(`Played with C${cards[card].number}`)
game.valid_cards = []
discard(card)
- game.temp = card
+ game.vm_event = card
},
influence(){
push_undo()
- game.vm_available_ops = cards[game.temp].ops
+ game.vm_available_ops = cards[game.vm_event].ops
valid_spaces_infl()
game.state = 'vm_add_infl'
},
@@ -5436,7 +5497,7 @@ states.vm_foreign_currency_debt_burden = {
states.vm_goodbye_lenin = {
get inactive() {
- return `resolve ${cards[game.played_card].name}.`
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
},
prompt() {
if (game.valid_cards.length > 0 ) {
@@ -5463,10 +5524,10 @@ states.vm_goodbye_lenin = {
states.vm_goodbye_lenin_ops = {
get inactive() {
- return `resolve ${cards[game.played_card].name}.`
+ return `resolve ${clean_name(cards[this_card()].name)}.`
},
prompt() {
- view.prompt = `Play ${cards[game.played_card].name} for:`
+ view.prompt = `Play ${clean_name(cards[this_card()].name)} for:`
gen_action('influence')
gen_action('support_check')
if ((game.active === DEM && game.dem_tst_attempted_this_turn === 0 ) || (game.active === COM && game.com_tst_attempted_this_turn === 0 )) {
@@ -5475,7 +5536,7 @@ states.vm_goodbye_lenin_ops = {
},
influence(){
push_undo()
- game.vm_available_ops = cards[game.played_card].ops
+ game.vm_available_ops = cards[this_card()].ops
valid_spaces_infl()
game.state = 'vm_add_infl'
},
@@ -5724,14 +5785,18 @@ states.vm_laszlo_tokes = {
}
valid_spaces_infl()
game.valid_spaces = game.valid_spaces.filter(space_id => spaces[space_id].country === 'Romania')
- game.state = 'vm_add_infl'
+ vm_next()
+ //game.state = 'vm_add_infl'
},
support_check() {
push_undo()
game.vm_available_ops = 2
- game.state = 'vm_support_check_prep'
+ //game.state = 'vm_support_check_prep'
valid_spaces_sc()
game.valid_spaces = game.valid_spaces.filter(space_id => spaces[space_id].country === 'Romania')
+ vm_goto_step(vm_support_check)
+ //game.vm.ip = 7 /*Has to be a better way to do this! */
+ //vm_next()
}
}
@@ -5771,13 +5836,13 @@ states.vm_malta_summit = {
return `resolve ${cards[game.played_card].name}.`
},
prompt() {
- if (game.phase === 1) {
- view.prompt = 'Roll a die.'
+ /*if (game.phase === 1) {*/
+ view.prompt = 'Malta Summit: roll a die.'
gen_action('roll')
- } else {
+ /*} else {
view.prompt = 'Done.'
gen_action('done')
- }
+ }*/
},
roll() {
clear_undo()
@@ -5797,18 +5862,19 @@ states.vm_malta_summit = {
if (game.pieces[43].comInfl > 0 ) {game.valid_spaces.push(43)}
if (game.pieces[51].comInfl > 0 ) {game.valid_spaces.push(51)}
if (game.pieces[69].comInfl > 0 ) {game.valid_spaces.push(69)}
- game.vm_available_ops = 5
+ //game.vm_available_ops = 5
game.remove_opponent_infl = true
- game.state = 'vm_remove_infl'
+ vm_next()
}
else {
log('Summit failed')
- game.phase++
+ //game.phase++
+ vm_goto_step(vm_permanently_remove)
}
},
- done() {
+ /*done() {
vm_next()
- }
+ }*/
}
states.vm_modrow = {
@@ -5816,7 +5882,7 @@ states.vm_modrow = {
return `resolve ${cards[game.played_card].name}.`
},
prompt() {
- view.prompt = 'Roll a die.'
+ view.prompt = `Modrow: roll a die.`
gen_action('roll')
},
roll(){
@@ -5841,7 +5907,7 @@ states.vm_nepotism = {
},
prompt() {
//if (game.phase === 1 ) {
- view.prompt = 'Roll a die.'
+ view.prompt = 'Nepotism: roll a die.'
gen_action('roll')
/*} else {
view.prompt = 'Roll a die: done.'
@@ -5905,14 +5971,14 @@ states.vm_nomenklatura = {
return `resolve ${cards[game.played_card].name}.`
},
prompt() {
- view.prompt = 'Choose: remove Democratic influence from an elite space or add influence to an elite space.'
+ view.prompt = 'Nomenklatura: choose to remove all Democratic influence from Elite spaces or add 3 influence to any Elite space(s).'
gen_action('remove')
gen_action('add')
},
remove() {
push_undo()
game.valid_spaces = []
- for (let i = 0; i < game.pieces.length; i++) {
+ for (let i = 1; i < game.pieces.length; i++) {
let piece = game.pieces[i]
let space = spaces[i]
@@ -5920,7 +5986,8 @@ states.vm_nomenklatura = {
game.valid_spaces.push(piece.space_id)
}
}
- game.vm_available_ops = 1
+ game.vm_available_ops = game.valid_spaces.length
+ game.remove_opponent_infl = true
game.state = 'vm_nomenklatura_remove'
},
add() {
@@ -5946,7 +6013,7 @@ states.vm_nomenklatura_remove = {
view.prompt = 'Remove influence: done.'
gen_action('done')
} else {
- view.prompt = 'Remove all Democratic influence from an elite space.'
+ view.prompt = 'Nomenklatura: remove all Democratic influence from Elite spaces.'
for (let space_id of game.valid_spaces) {
/*const space = spaces.find(s => s && s.space_id === space_id); */
@@ -5955,7 +6022,11 @@ states.vm_nomenklatura_remove = {
}
},
infl(space) {
+ push_undo()
vm_do_remove_all_infl(space)
+ if (game.vm_available_ops === 0) {
+ vm_next()
+ }
},
done() {
vm_next()
@@ -5971,14 +6042,14 @@ states.vm_nomenklatura_add = {
view.prompt = 'Add influence: done.'
gen_action('done')
} else {
- view.prompt = `Add influence to elite spaces. ${game.vm_available_ops} influence remaining.`
+ view.prompt = `Nomenklatura: add 3 influence to any Elite space(s). ${game.vm_available_ops} influence remaining.`
for (let space_id of game.valid_spaces) {
gen_action_infl(spaces[space_id].name_unique);
}
}
},
infl(space) {
- vm_do_add_infl(space)
+ vm_do_add_infl_free(space)
},
done() {
vm_next()
@@ -6048,7 +6119,7 @@ states.vm_shock_therapy = {
view.prompt = 'Shock Therapy: done.'
gen_action('done')
} else {
- view.prompt = 'Roll a die.'
+ view.prompt = 'Shock Therapy: roll a die.'
gen_action('roll')
}
},
@@ -6070,10 +6141,10 @@ states.vm_shock_therapy = {
log(`-${game.temp} from Communist controlled Worker and Farmer spaces`)
log(`Modified roll: ${roll - game.temp}`)
if ((roll - game.temp) > 2) {
- log('Shock Therapy is successful. +3 VP')
+ log('C93 is successful. +3 VP')
vm_next()
} else {
- log('Shock Therapy is unsuccessful. Required 3 or more')
+ log('C93 is unsuccessful. Required 3 or more')
game.phase++
}
},
@@ -6228,14 +6299,14 @@ states.vm_the_tyrant_is_gone = {
states.vm_the_wall_must_go = {
get inactive() {
- return `resolve ${cards[game.played_card].name}.`
+ return `resolve ${clean_name(cards[this_card()].name)}.`
},
prompt() {
if (game.the_wall_must_go['dem_wins'] === 2 || game.the_wall_must_go['com_wins'] === 2) {
view.prompt = 'The Wall Must Go! Done.'
gen_action('done')
} else {
- view.prompt = ('The Wall Must Go! Roll a die:')
+ view.prompt = ('The Wall Must Go! Roll a die.')
gen_action('roll')
}
},
@@ -6276,11 +6347,11 @@ states.vm_the_wall_must_go = {
log(`Democrat: ${game.the_wall_must_go['dem_wins']}, Communist: ${game.the_wall_must_go['com_wins']}`)
}
if (game.the_wall_must_go['dem_wins'] === 2) {
- log('The Democrat wins The Wall Must Go!')
+ log('The Democrat wins C86')
return
}
if (game.the_wall_must_go['com_wins'] === 2) {
- log('The Communist wins The Wall Must Go!')
+ log('The Communist wins C86')
return
}
next_player()
@@ -6323,7 +6394,9 @@ states.vm_warsaw_pact_summit = {
}
}
game.vm_available_ops = 4
- game.state = 'vm_add_infl'
+ game.phase = 3
+ //game.state = 'vm_add_infl'
+ vm_next()
},
support_check(){
push_undo()
@@ -6335,7 +6408,9 @@ states.vm_warsaw_pact_summit = {
}
}
game.vm_available_ops = 2
- game.state = 'vm_support_check_prep'
+ //game.state = 'vm_support_check_prep'
+ console.log('game.phase',game.phase)
+ vm_next()
}
}
@@ -6363,6 +6438,7 @@ states.vm_we_are_the_people_remove = {
},
done() {
if (!game.vm_influence_added[6]) {
+ log('No influence removed')
vm_next()
} else {
game.valid_spaces = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
@@ -6402,7 +6478,7 @@ states.vm_workers_revolt = {
return `resolve ${cards[game.played_card].name}.`
},
prompt() {
- view.prompt = 'Select a target for the Workers Revolt.'
+ view.prompt = 'Workers Revolt: select a Worker Space in a country your opponent has power.'
for (let space_id of game.valid_spaces) {
/*const space = spaces.find(s => s && s.space_id === space_id);
if (space) {*/
@@ -6536,7 +6612,7 @@ states.vm_tst_6 = {
gen_action('done')
return
} else {
- view.prompt = 'Tiananmen Square Track award: you have a free 2 op support check.'
+ view.prompt = 'Tiananmen Square Track award: you have a free 2 Ops support check.'
for (let space_id of game.valid_spaces) {
if (space_id) {
gen_action_sc(spaces[space_id].name_unique);
@@ -6666,7 +6742,7 @@ states.vm_tst_8_ops = {
states.vm_support_surges = {
inactive: 'draw cards.',
prompt() {
- view.prompt = 'Draw 2 cards'
+ view.prompt = 'Support Surges: draw 2 cards.'
gen_action('draw')
},
draw() {
@@ -6686,10 +6762,10 @@ states.vm_support_falters = {
inactive: 'discard cards.',
prompt() {
if (game.vm_available_ops > 0) {
- view.prompt = 'Discard a card.'
+ view.prompt = 'Support Falters: discard a card.'
gen_action('discard')
} else {
- view.prompt = 'Discard cards: done.'
+ view.prompt = 'Support Flaters: done.'
gen_action('done')
}
},
@@ -6715,7 +6791,7 @@ CODE[1] = [ // Legacy of Martial Law*
[ vm_valid_spaces_country_opp, 'Poland' ],
[ vm_legacy_of_martial_law ],
[ vm_valid_spaces_country_sc, 'Poland' ],
- [ vm_prompt, ' in Poland' ],
+ [ vm_prompt, 'Make a Support Check in Poland' ],
[ vm_support_check, 1 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -6724,7 +6800,7 @@ CODE[1] = [ // Legacy of Martial Law*
CODE[2] = [ // Solidarity Legalised*
[ vm_solidarity_legalised ],
[ vm_valid_spaces_solidarity_legalised ],
- [ vm_prompt, 'every uncontrolled Worker and Farmer space in Poland' ],
+ [ vm_prompt, 'to every uncontrolled Worker and Farmer space in Poland' ],
[ vm_add_limited_infl, 9, 1 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -6735,7 +6811,7 @@ CODE[3] = [ // Walesa
[ vm_prompt, 'any space(s) in Poland' ],
[ vm_add_infl_free, 4 ],
[ vm_valid_spaces_country_sc, 'Poland' ],
- [ vm_prompt, ' in Poland' ],
+ [ vm_prompt, 'Make Support Checks in Poland' ],
[ vm_support_check, 2 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -6794,8 +6870,8 @@ CODE[11] = [ // Dissident arrested
CODE[12] = [ // Apparatchicks
[ vm_valid_spaces_socio, 2 ],
- [ vm_prompt, 'any Bureaucratic space(s)' ],
- [ vm_add_infl, 3 ],
+ [ vm_prompt, ' to any Bureaucratic space(s)' ],
+ [ vm_add_infl_free, 3 ],
[ vm_permanently_remove ],
[ vm_return ],
]
@@ -6810,6 +6886,7 @@ CODE[14] = [ // Gorbachev Charms the West
[ vm_valid_spaces_opponent ],
[ vm_remove_opp_infl, 2 ],
[ vm_valid_spaces_sc ],
+ [ vm_prompt, 'Make a Support Check' ],
[ vm_support_check, 1 ],
[ vm_return ],
]
@@ -6833,7 +6910,7 @@ CODE[17] = [ // Roundtable talks
CODE[18] = [ // Poszgay Defends the Revolution
[ vm_poszgay ],
- [ vm_prompt, 'spaces in Hungary not under Democratic control' ],
+ [ vm_prompt, 'to 4 spaces in Hungary not under Democratic control' ],
[ vm_add_limited_infl, 4, 1 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -6841,7 +6918,7 @@ CODE[18] = [ // Poszgay Defends the Revolution
CODE[19] = [ // Papal vist
[ vm_valid_spaces, 20, 35, 38 ],
- [ vm_prompt, 'in any Catholic Church space' ],
+ [ vm_prompt, 'any Catholic Church space' ],
[ vm_add_x_infl, 3 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -6893,7 +6970,7 @@ CODE[27] = [ // Consumerism
[ vm_remove_opp_infl, 1 ],
[ vm_valid_spaces_opponent_socio, 4 ],
[ vm_active_country ],
- [ vm_prompt, ' Worker space in the same country' ],
+ [ vm_prompt, 'Make a support check in a Worker space in the same country' ],
[ vm_support_check, 1 ],
[ vm_return ],
]
@@ -6994,7 +7071,7 @@ CODE[40] = [ // Hungarian Democratic Forum
[ vm_prompt, 'Hungary' ],
[ vm_add_infl_free, 3 ],
[ vm_valid_spaces_country_sc, 'Hungary' ],
- [ vm_prompt, ' in Hungary' ],
+ [ vm_prompt, 'Make a Support Check in Hungary' ],
[ vm_support_check, 1 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -7005,7 +7082,7 @@ CODE[41] = [ // Ceausescu*
[ vm_prompt, ' from Romania' ],
[ vm_remove_opp_infl, 3 ],
[ vm_valid_spaces_country_sc, 'Romania' ],
- [ vm_prompt, ' in Romania' ],
+ [ vm_prompt, 'Make a support check in Romania' ],
[ vm_support_check, 1 ],
[ vm_ceausescu ],
[ vm_permanently_remove ],
@@ -7025,10 +7102,12 @@ CODE[43] = [ // Power Struggle - Bulgaria
CODE[44] = [ // Inflationary Currency
[ vm_inflationary_currency ],
[ vm_valid_spaces_country_sc ],
+ [ vm_prompt, ()=>` from ${country_name(game.vm_active_country)}` ],
[ vm_remove_opp_infl, 2 ],
[ vm_inflationary_currency_discard ],
[ vm_if, ()=>discarded_card() ],
[ vm_valid_spaces_country_sc ],
+ [ vm_prompt, ()=>`Make a Support Check in ${game.vm_active_country}` ],
[ vm_support_check, 1 ],
[ vm_endif ],
[ vm_permanently_remove ],
@@ -7144,7 +7223,7 @@ CODE[61] = [ // The Monday Demonstrations*
[ vm_prompt, 'the Lutheran Church Space and Leipzig' ],
[ vm_take_control_prep, 2 ],
[ vm_valid_spaces_country_sc, 'East_Germany' ],
- [ vm_prompt, ' in East Germany' ],
+ [ vm_prompt, 'Make 5 Support Checks in East Germany' ],
[ vm_support_check, 5 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -7223,7 +7302,13 @@ CODE[73] = [ // Laszlo Tokes*
[ vm_valid_spaces, 50, 56 ],
[ vm_prompt, 'in Timisoara and Harghita/Covasna' ],
[ vm_add_limited_infl, 2, 1 ],
+ [ vm_prompt, ' in Romania' ],
[ vm_laszlo_tokes ],
+ [ vm_add_infl ],
+ [ vm_permanently_remove ],
+ [ vm_return ],
+ [ vm_prompt, 'Make 2 Support Checks in Romania' ],
+ [ vm_support_check, 2 ],
[ vm_permanently_remove ],
[ vm_return ],
]
@@ -7241,6 +7326,14 @@ CODE[75] = [ // Exit Visas*
CODE[76] = [ // Warsaw Pact Summit
[ vm_warsaw_pact_summit ],
+ [ vm_if, ()=>game.phase === 3 ],
+ [ vm_prompt, ' spaces with no Democratic influence' ],
+ [ vm_add_infl_free, 4 ],
+ [ vm_else ],
+ [ vm_prompt, 'Select a Student or Intellectual space' ],
+ [ vm_valid_spaces_country_socio_2, 3,, 4 ],
+ [ vm_support_check_modified, 2, 2 ],
+ [ vm_endif ],
[ vm_permanently_remove ],
[ vm_return ],
]
@@ -7304,7 +7397,7 @@ CODE[84] = [ // Breakaway Baltic Republics*
[ vm_prompt, 'any Minorities space' ],
[ vm_take_control_prep, 1 ],
[ vm_valid_spaces_sc ],
- [ vm_prompt, ' for a support check' ],
+ [ vm_prompt, 'Select a space for a support check' ],
[ vm_support_check, 1 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -7350,7 +7443,7 @@ CODE[90] = [ // Civic Forum*
[ vm_add_infl_free, 4 ],
[ vm_civic_forum ],
[ vm_valid_spaces_country_sc, 'Czechoslovakia' ],
- [ vm_prompt, ' in Czechoslovakia' ],
+ [ vm_prompt, 'Select a space in Czechoslovakia' ],
[ vm_support_check, 2 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -7361,7 +7454,7 @@ CODE[91] = [ // My First Banana*
[ vm_prompt, ' from East Germany' ],
[ vm_remove_opp_infl, 2 ],
[ vm_valid_spaces_country_sc, 'East_Germany' ],
- [ vm_prompt, ' in East Germany' ],
+ [ vm_prompt, 'Select a space in East Germany' ],
[ vm_support_check, 2 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -7376,6 +7469,7 @@ CODE[92] = [ // Betrayal
CODE[93] = [ // Shock Therapy*
[ vm_shock_therapy ],
[ vm_valid_spaces_country ],
+ [ vm_prompt, ()=>`to ${game.vm_active_country}` ],
[ vm_add_infl, 3 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -7386,7 +7480,7 @@ CODE[94] = [ // Union of Democratic Forces*
[ vm_prompt, ' from Bulgaria' ],
[ vm_remove_opp_infl, 4 ],
[ vm_valid_spaces_country_sc, 'Bulgaria' ],
- [ vm_prompt, ' in Bulgaria' ],
+ [ vm_prompt, 'Make 2 Support Checks in Bulgaria' ],
[ vm_support_check, 2 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -7400,6 +7494,7 @@ CODE[95] = [ // Power Struggle - Romania
CODE[96] = [ // The Chinese Solution*
[ vm_the_chinese_solution ],
[ vm_valid_spaces_country_sc ],
+ [ vm_prompt, ()=>`Make 5 Support Checks in ${game.vm_active_country}` ],
[ vm_support_check_modified, 5, 3 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -7419,7 +7514,7 @@ CODE[98] = [ // Politburo Intrigue*
[ vm_prompt, ' from Bulgaria' ],
[ vm_remove_limited_opp_infl, 3, 2 ],
[ vm_valid_spaces_country_sc, 'Bulgaria' ],
- [ vm_prompt, ' in Bulgaria' ],
+ [ vm_prompt, 'Make a support check in Bulgaria' ],
[ vm_support_check, 1 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -7466,9 +7561,11 @@ CODE[104] = [ // New Year's Eve Party*
CODE[105] = [ // Public Against Violence*
[ vm_valid_spaces, 36, 37 ],
[ vm_prompt, 'Kosice and Presov' ],
- [ vm_add_limited_infl, 4, 2 ],
+ [ vm_add_x_infl, 2 ],
+ [ vm_valid_spaces, 36, 37 ],
+ [ vm_add_x_infl, 2 ],
[ vm_public_against_violence ],
- [ vm_prompt, ': Bratislava' ],
+ [ vm_prompt, 'Make a Support Check in Bratislava' ],
[ vm_support_check_modified, 1, 2 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -7479,6 +7576,7 @@ CODE[106] = [ // Social Democratic Platform Adopted*
[ vm_valid_spaces_country ],
[ vm_add_infl_free, 2 ],
[ vm_valid_spaces_country_sc ],
+ [ vm_prompt, ()=>`Make a Support Check in ${game.vm_active_country}` ],
[ vm_support_check, 1 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -7486,7 +7584,7 @@ CODE[106] = [ // Social Democratic Platform Adopted*
CODE[107] = [ // Massacre in Timisoara*
[ vm_valid_spaces_country_sc, 'Romania' ],
- [ vm_prompt, ' in Romania' ],
+ [ vm_prompt, 'Make Support Checks in Romania' ],
[ vm_support_check_modified, 2, 2 ],
[ vm_permanently_remove ],
[ vm_return ],
@@ -7508,6 +7606,8 @@ CODE[109] = [ // Kremlin Coup*
CODE[110] = [ // Malta Summit*
[ vm_malta_summit ],
+ [ vm_prompt, ' from Elite spaces' ],
+ [ vm_remove_opp_infl, 5 ],
[ vm_permanently_remove ],
[ vm_return ],
]
@@ -7515,13 +7615,14 @@ CODE[110] = [ // Malta Summit*
+
// ============= TIANANMEN SQUARE TRACK AWARDS ====================
CODE[203] = [//Tiananmen Square space 3 award
[vm_tst_3],
[vm_return]
]
CODE[204] = [//Tiananmen Square space 4 award
- [vm_valid_spaces_sc],
+ [vm_valid_spaces_opponent],
[vm_tst_4],
[vm_return]
]