diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-26 12:21:13 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-26 12:21:13 +0100 |
commit | 264161f150688577c757835dafbd78645106172c (patch) | |
tree | a60eecdaff91a284bd255c65db1cd32d16638260 /rules.js | |
parent | 1bfe93eea7faffbe59af0b5c2c0f6aa6889527e4 (diff) | |
download | 1989-dawn-of-freedom-264161f150688577c757835dafbd78645106172c.tar.gz |
Remove null space
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 245 |
1 files changed, 130 insertions, 115 deletions
@@ -269,13 +269,18 @@ exports.view = function(state, player) { // === ACTIONS =========== function gen_action(action, argument) { +//console.log('gen_action called with ', action, ' and ', argument) if (argument === undefined) { + //console.log('argument undefined') view.actions[action] = 1 } else { - if (!(action in view.actions)) + if (!(action in view.actions)) { + //console.log('push argument') view.actions[action] = [] + } view.actions[action].push(argument) } + //console.log('view.actions: ', view.actions, 'view.actions[action]: ', view.actions[action]) } function gen_action_space(space){ @@ -2621,7 +2626,7 @@ function valid_spaces_setup() { game.valid_spaces = [] let valid_spaces_set = new Set(); //console.log('in vs setup, state', game.state) - for (let i =1 ; i <= 75 ; i++) { + for (let i =0 ; i <= 74 ; i++) { space = spaces[i] if (game.state === 'com_init') { @@ -2646,7 +2651,7 @@ function valid_spaces_sc() { let valid_spaces_set = new Set(); //console.log('valid spaces sc, persistent events', game.persistent_events) - for (let i = 1 ; i <= 75; i++) { + for (let i = 0 ; i <= 74; i++) { space = spaces[i] if (game.active === DEM) { @@ -2658,13 +2663,13 @@ function valid_spaces_sc() { infl = game.demInfl[i] if (infl !== 0 ) { // Check Solidarity Legalised - if (game.persistent_events.includes(2) && space.space_id === 14) {continue} + if (game.persistent_events.includes(2) && space.space_id === 13) {continue} // Check Civic Forum - if (game.persistent_events.includes(90) && space.space_id === 30) {continue} + if (game.persistent_events.includes(90) && space.space_id === 29) {continue} // Check We Are the People - if (game.persistent_events.includes(48) && space.space_id === 9) {continue} + if (game.persistent_events.includes(48) && space.space_id === 8) {continue} //Check for Foreign Currency Debt Burden if (game.persistent_events.includes(49) && space.country === game.foreign_currency_debt_burden) {continue} { @@ -2689,7 +2694,7 @@ function valid_spaces_sc() { function valid_spaces_support_loss() { let valid_spaces_set = new Set(); - for (let i = 1; i < game.demInfl.length; i++) { + for (let i = 0; i < game.demInfl.length; i++) { //console.log('spaces.length', game.demInfl.length, 'i', i) space = spaces[i] if (game.active === DEM) { @@ -2746,7 +2751,7 @@ function valid_spaces_infl() { let valid_spaces_set = new Set(); // Iterate over all spaces to find the ones with the player's influence - for (let i = 1; i < game.demInfl.length; i++) { + for (let i = 0; i < game.demInfl.length; i++) { //piece = game.pieces[i] space = spaces[i] @@ -3034,7 +3039,7 @@ function check_presence(country) { let com_leaders = {1: false, 4: false, 5: false, 6: false, 7: false}; - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] if (space.country === country) { @@ -3549,7 +3554,7 @@ function finish_the_wall() { if (check_vp()) { return } - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] if (space.country === 'East_Germany' && game.comInfl[i] > 0){ game.valid_spaces.push(space.space_id) @@ -3623,7 +3628,7 @@ function end_round() { return [...new Set(duplicates)]; } - //console.log('game.strategy_deck', game.strategy_deck, 'game.strategy_discard', game.strategy_discard, 'game.strategy_removed', game.strategy_removed, 'game.table_cards', game.table_cards, 'game.communist_hand', game.communist_hand, 'game.democrat_hand', game.democrat_hand) + console.log('game.strategy_deck', game.strategy_deck, 'game.strategy_discard', game.strategy_discard, 'game.strategy_removed', game.strategy_removed, 'game.table_cards', game.table_cards, 'game.communist_hand', game.communist_hand, 'game.democrat_hand', game.democrat_hand) if (check_duplicates(card_check)) { console.log('card check', card_check) @@ -4629,13 +4634,21 @@ function vm_opp_hand_false() { } function vm_valid_spaces() { - let space_1 = vm_operand(1) - let space_2 = vm_operand(2) - let space_3 = vm_operand(3) - let space_4 = vm_operand(4) - let space_5 = vm_operand(5) - let space_6 = vm_operand(6) - game.valid_spaces = [space_1, space_2, space_3, space_4, space_5, space_6] + let space_1 + let space_2 + let space_3 + let space_4 + let space_5 + let space_6 + + if (vm_operand(1)) { space_1 = spaces.find(space => space.ascii_name === vm_operand(1)).space_id} + if (vm_operand(2)) { space_2 = spaces.find(space => space.ascii_name === vm_operand(2)).space_id} + if (vm_operand(3)) { space_3 = spaces.find(space => space.ascii_name === vm_operand(3)).space_id} + if (vm_operand(4)) { space_4 = spaces.find(space => space.ascii_name === vm_operand(4)).space_id} + if (vm_operand(5)) { space_5 = spaces.find(space => space.ascii_name === vm_operand(5)).space_id} + if (vm_operand(6)) { space_6 = spaces.find(space => space.ascii_name === vm_operand(6)).space_id} + + game.valid_spaces = [space_1, space_2, space_3, space_4, space_5, space_6] game.valid_spaces = game.valid_spaces.filter( n => n ) // Check for Systematization - may not use this space @@ -4646,7 +4659,7 @@ function vm_valid_spaces() { function vm_valid_spaces_opponent () { let valid_spaces = [] - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] if (game.active === DEM) { @@ -4668,7 +4681,7 @@ function vm_valid_spaces_opponent () { function vm_valid_spaces_socio () { let valid_spaces = [] - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] if (space.socio === vm_operand(1)) { @@ -4686,7 +4699,7 @@ function vm_valid_spaces_socio () { function vm_valid_spaces_opponent_socio () { let valid_spaces = [] - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] if (game.active === DEM) { @@ -4772,13 +4785,13 @@ function vm_valid_spaces_country_sc () { } else { if (space.country === country && game.demInfl[space.space_id] >0) { //Check Solidarity Legalised - if (game.persistent_events.includes(2) && space.space_id === 14) {continue} + if (game.persistent_events.includes(2) && space.space_id === 13) {continue} //Check Civic Forum - if (game.persistent_events.includes(90) && space.space_id === 30) {continue} + if (game.persistent_events.includes(90) && space.space_id === 29) {continue} //Check We are the People - if (game.persistent_events.includes(48) && space.space_id === 9) {continue} + if (game.persistent_events.includes(48) && space.space_id === 8) {continue} valid_spaces.push(space.space_id); //Check Foreign Currency Debt Burden @@ -4834,7 +4847,7 @@ function vm_valid_spaces_region_opp() { function vm_valid_spaces_solidarity_legalised() { let valid_spaces = [] - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] let uncontrolled = (!check_control(i) && !check_opp_control(i)) if ((space.country === 'Poland' && uncontrolled && space.socio === 3) || (space.country === 'Poland' && uncontrolled && space.socio === 4)) { @@ -5319,8 +5332,8 @@ function vm_breakaway_baltic_republics() { } game.playable_cards.push(109) game.playable_cards = game.playable_cards.filter(n => n !== 14) - if (!check_dem_control(56) && game.systematization !== 56) {game.valid_spaces.push(56)} - if (!check_dem_control(70)) {game.valid_spaces.push(70)} + if (!check_dem_control(55) && game.systematization !== 55) {game.valid_spaces.push(55)} + if (!check_dem_control(69)) {game.valid_spaces.push(69)} vm_next() } @@ -5346,13 +5359,19 @@ function vm_bulgarian_turks_expelled(){ function vm_ceausescu() { let adj_cluj = false - if (game.demInfl[50] > 0 ) {adj_cluj = true} - if (game.demInfl[54] > 0 ) {adj_cluj = true} - if (game.demInfl[58] > 0 ) {adj_cluj = true} - if (game.demInfl[61] > 0 ) {adj_cluj = true} + let Timisoara = spaces.find(space => space.ascii_name === "Timisoara").space_id + let Babes = spaces.find(space => space.ascii_name === "Babes-Bolyai University").space_id + let Church = spaces.find(space => space.ascii_name === "Orthodox Church, Romania").space_id + let Bucuresti = spaces.find(space => space.ascii_name === "Bucuresti").space_id + - if (adj_cluj && game.comInfl[61]>0) { - game.valid_spaces = [61] + if (game.demInfl[Timisoara] > 0 ) {adj_cluj = true} + if (game.demInfl[Babes] > 0 ) {adj_cluj = true} + if (game.demInfl[Church] > 0 ) {adj_cluj = true} + if (game.demInfl[Bucuresti] > 0 ) {adj_cluj = true} + + if (adj_cluj && game.comInfl[Bucuresti]>0) { + game.valid_spaces = [60] game.vm_available_ops = 1 //next_player() game.remove_opponent_infl = false @@ -5372,7 +5391,7 @@ function vm_civic_forum() { return } game.persistent_events.push(90) - if (check_dem_control(31)) { + if (check_dem_control(30)) { vm_next() } else { permanently_remove(90) @@ -5451,20 +5470,20 @@ function vm_eliminate(space_id) { //console.log('adjacency before: Iasi', game.pieces[53].adjacent, 'Ploesti:', game.pieces[59].adjacent, 'Bucharesti:', game.pieces[61].adjacent) // Eliminate the democrat influence and move the communist influence to Bucuresti - if (space_id === 61) { + if (space_id === 60) { game.demInfl[space_id] = 0 game.comInfl[space_id] = 0 } else { game.demInfl[space_id] = 0 - game.comInfl[61] += game.comInfl[space_id] + game.comInfl[60] += game.comInfl[space_id] if (game.comInfl[space_id] > 0 ) { - log(`${pluralize(game.comInfl[space_id],'Communist SP')} relocated to %61`) + log(`${pluralize(game.comInfl[space_id],'Communist SP')} relocated to %60`) } game.comInfl[space_id] = 0 } //Update control in the eliminated space and in Bucuresti check_control_change(space_id) - check_control_change(61) + check_control_change(60) } @@ -5509,8 +5528,8 @@ function vm_foreign_currency_debt_burden() { } function vm_foreign_television() { - for (let i = 1 ; i < spaces.length; i++) { - if (i === 12) {continue} /*Does not apply to Dresden*/ + for (let i = 0 ; i < spaces.length; i++) { + if (i === 11) {continue} /*Does not apply to Dresden*/ if (game.comInfl[i] > 0 ) { game.valid_spaces.push(i) } @@ -5560,7 +5579,7 @@ function vm_goodbye_lenin() { } function vm_government_resigns() { - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] if (space.socio === 1 && game.comInfl[i] > 0 && !check_control(i)) { game.valid_spaces.push(i) @@ -5643,7 +5662,7 @@ function vm_kiss_of_death() { } function vm_klaus_and_komarek() { - if (game.comInfl[29] > 0 ) {game.valid_spaces = [29]} + if (game.comInfl[28] > 0 ) {game.valid_spaces = [28]} vm_next() } @@ -5694,7 +5713,7 @@ function vm_legacy_of_martial_law() { } function vm_legacy_of_1968() { - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] if ((!check_com_control(i) && space.country === 'Czechoslovakia')) { game.valid_spaces.push(space.space_id); @@ -5730,8 +5749,8 @@ function vm_modrow() { } function vm_nagy_reburied(){ - if (game.comInfl[43] > 0) { - game.valid_spaces.push(43) + if (game.comInfl[42] > 0) { + game.valid_spaces.push(42) } vm_next() } @@ -5756,8 +5775,8 @@ function vm_nomenklatura() { } function vm_normalisation() { - if (game.demInfl[27] >0) {game.valid_spaces.push(27)} - if (game.demInfl[29] > 0) {game.valid_spaces.push(29)} + if (game.demInfl[26] >0) {game.valid_spaces.push(26)} + if (game.demInfl[28] > 0) {game.valid_spaces.push(28)} game.remove_opponent_infl = true vm_next() } @@ -5840,7 +5859,7 @@ function vm_prudence() { function vm_public_against_violence() { game.valid_spaces = [] - if (game.comInfl[34] > 0 ) {game.valid_spaces.push(34)} + if (game.comInfl[33] > 0 ) {game.valid_spaces.push(33)} vm_next() } @@ -5867,11 +5886,11 @@ function vm_roundtable_talks() { } function vm_sajudis_check() { - if (!check_dem_control(56)) { - game.valid_spaces.push(56) + if (!check_dem_control(55)) { + game.valid_spaces.push(55) } - if (!check_dem_control(70)) { - game.valid_spaces.push(70) + if (!check_dem_control(69)) { + game.valid_spaces.push(69) } vm_next() } @@ -5960,8 +5979,8 @@ function vm_tear_gas () { function vm_the_baltic_way() { game.playable_cards.push(84) game.stability++ - if (!check_dem_control(56) && game.systematization !== 56) {game.valid_spaces.push(56)} - if (!check_dem_control(70) && game.systematization !== 70) {game.valid_spaces.push(70)} + if (!check_dem_control(55) && game.systematization !== 55) {game.valid_spaces.push(55)} + if (!check_dem_control(69) ) {game.valid_spaces.push(69)} log('+3 VP') game.vp += 3 if (check_vp()) { @@ -5982,8 +6001,8 @@ function vm_the_crowd_turns_against_ceausescu() { } function vm_the_monday_demonstrations() { - if (!check_dem_control(6)) {game.valid_spaces.push(6)} - if (!check_dem_control(9)) {game.valid_spaces.push(9)} + if (!check_dem_control(5)) {game.valid_spaces.push(5)} + if (!check_dem_control(8)) {game.valid_spaces.push(8)} vm_next() } @@ -6000,7 +6019,7 @@ function vm_the_third_way() { function vm_the_tyrant_is_gone() { game.valid_spaces = [] - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] if (game.demInfl[i] === 0 && space.country === 'Romania') { if (space.space_id === game.systematization) {continue} @@ -6046,12 +6065,12 @@ function vm_warsaw_pact_summit() { } function vm_we_are_the_people() { - if (game.demInfl[6] > 0) {game.valid_spaces = [6]} - game.persistent_events.push(48) + if (game.demInfl[5] > 0) {game.valid_spaces = [5]} + game.persistent_events.push(48) if (!game.vm_influence_added) { game.vm_influence_added = {}; } - game.vm_influence_added[6] = 0 + game.vm_influence_added[5] = 0 game.vm_available_ops = 4 game.state = 'vm_we_are_the_people_remove' } @@ -6871,39 +6890,39 @@ states.vm_central_committee_reshuffle = { if (!game.revolutions[5]) {gen_action('romania')} } }, - east_germany() { + east_germany() { /*Updated for zero index spaces*/ push_undo() game.vm_active_country = "East_Germany" log(`Chose ${country_name(game.vm_active_country)}`) - game.valid_spaces = [1,2,3,4,5,6,7,8,9,10,11,12] + game.valid_spaces = [0,1,2,3,4,5,6,7,8,9,10,11] vm_next() }, poland() { push_undo() game.vm_active_country = "Poland" log(`Chose ${country_name(game.vm_active_country)}`) - game.valid_spaces = [13,14,15,16,17,18,19,20,21,22,23,24,25,26] + game.valid_spaces = [12,13,14,15,16,17,18,19,20,21,22,23,24,25] vm_next() }, czechoslovakia() { push_undo() game.vm_active_country = "Czechoslovakia" log(`Chose ${country_name(game.vm_active_country)}`) - game.valid_spaces = [27,28,29,30,31,32,33,34,35,36,37] + game.valid_spaces = [26,27,28,29,30,31,32,33,34,35,36] vm_next() }, hungary() { push_undo() game.vm_active_country = "Hungary" log(`Chose ${country_name(game.vm_active_country)}`) - game.valid_spaces = [38,39,40,41,42,43,44,45,46,47,48,49] + game.valid_spaces = [37,38,39,40,41,42,43,44,45,46,47,48] vm_next() }, romania() { push_undo() game.vm_active_country = "Romania" log(`Chose ${country_name(game.vm_active_country)}`) - game.valid_spaces = [50,51,52,53,54,55,56,57,58,59,60,61,62,63] + game.valid_spaces = [49,50,51,52,53,54,55,56,57,58,59,60,61,62] game.valid_spaces = game.valid_spaces.filter(space => space !== game.systematization) vm_next() }, @@ -6911,7 +6930,7 @@ states.vm_central_committee_reshuffle = { push_undo() game.vm_active_country = "Bulgaria" log(`Chose ${country_name(game.vm_active_country)}`) - game.valid_spaces = [64,65,66,67,68,69,70,71,72,73,74,75] + game.valid_spaces = [63,64,65,66,67,68,69,70,71,72,73,74] vm_next() }, pass() { @@ -7310,10 +7329,6 @@ states.vm_goodbye_lenin_ops = { influence(){ push_undo() game.vm_available_ops = get_card_ops(this_card()) - /*if (game.persistent_events.includes(50)) { - log(`+1 from C50`) - game.vm_available_ops++ - }*/ valid_spaces_infl() // If ABHR - Set AHBR tracker to true @@ -7644,22 +7659,22 @@ states.vm_kremlin_coup_take_control = { space(space) { push_undo() vm_take_control(space) - if (game.vm_active_country === 'East_Germany') {game.selected_space = 3 } - if (game.vm_active_country === 'Poland') {game.selected_space = 17} - if (game.vm_active_country === 'Czechoslovakia') {game.selected_space = 29} - if (game.vm_active_country === 'Hungary') {game.selected_space = 45} - if (game.vm_active_country === 'Romania') {game.selected_space = 61} - if (game.vm_active_country === 'Bulgaria') {game.selected_space = 68} + if (game.vm_active_country === 'East_Germany') {game.selected_space = 2 } + if (game.vm_active_country === 'Poland') {game.selected_space = 16} + if (game.vm_active_country === 'Czechoslovakia') {game.selected_space = 28} + if (game.vm_active_country === 'Hungary') {game.selected_space = 44} + if (game.vm_active_country === 'Romania') {game.selected_space = 60} + if (game.vm_active_country === 'Bulgaria') {game.selected_space = 67} game.state = 'vm_kremlin_coup_sc_prep' }, done() { push_undo() - if (game.vm_active_country === 'East_Germany') {game.selected_space = 3 } - if (game.vm_active_country === 'Poland') {game.selected_space = 17} - if (game.vm_active_country === 'Czechoslovakia') {game.selected_space = 29} - if (game.vm_active_country === 'Hungary') {game.selected_space = 45} - if (game.vm_active_country === 'Romania') {game.selected_space = 61} - if (game.vm_active_country === 'Bulgaria') {game.selected_space = 68} + if (game.vm_active_country === 'East_Germany') {game.selected_space = 2 } + if (game.vm_active_country === 'Poland') {game.selected_space = 16} + if (game.vm_active_country === 'Czechoslovakia') {game.selected_space = 28} + if (game.vm_active_country === 'Hungary') {game.selected_space = 44} + if (game.vm_active_country === 'Romania') {game.selected_space = 60} + if (game.vm_active_country === 'Bulgaria') {game.selected_space = 67} game.state = 'vm_kremlin_coup_sc_prep' } } @@ -7801,12 +7816,12 @@ states.vm_malta_summit = { if (check_vp()) { return } - if (game.comInfl[12] > 0 ) {game.valid_spaces.push(12)} - if (game.comInfl[15] > 0 ) {game.valid_spaces.push(15)} - if (game.comInfl[27] > 0 ) {game.valid_spaces.push(27)} - if (game.comInfl[43] > 0 ) {game.valid_spaces.push(43)} - if (game.comInfl[51] > 0 ) {game.valid_spaces.push(51)} - if (game.comInfl[69] > 0 ) {game.valid_spaces.push(69)} + if (game.comInfl[11] > 0 ) {game.valid_spaces.push(11)} + if (game.comInfl[14] > 0 ) {game.valid_spaces.push(14)} + if (game.comInfl[26] > 0 ) {game.valid_spaces.push(26)} + if (game.comInfl[42] > 0 ) {game.valid_spaces.push(42)} + if (game.comInfl[50] > 0 ) {game.valid_spaces.push(50)} + if (game.comInfl[68] > 0 ) {game.valid_spaces.push(68)} //game.vm_available_ops = 5 game.remove_opponent_infl = true vm_next() @@ -7928,7 +7943,7 @@ states.vm_nomenklatura = { remove() { push_undo() game.valid_spaces = [] - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] if (space.socio === 1 && game.demInfl[i] > 0) { @@ -8457,7 +8472,7 @@ states.vm_the_wall_must_go = { if (check_vp()) { return } - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] if (space.country === 'East_Germany' && game.comInfl[i] > 0){ game.valid_spaces.push(space.space_id) @@ -8491,7 +8506,7 @@ states.vm_warsaw_pact_summit = { }, influence(){ push_undo() - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] if (game.demInfl[i] === 0) { game.valid_spaces.push(space.space_id); @@ -8504,7 +8519,7 @@ states.vm_warsaw_pact_summit = { }, support_check(){ push_undo() - for (let i = 1; i < spaces.length; i++) { + for (let i = 0; i < spaces.length; i++) { let space = spaces[i] if (game.demInfl[i] > 0 && (space.socio === 5 || space.socio === 6)) { game.valid_spaces.push(space.space_id) @@ -8521,7 +8536,7 @@ states.vm_we_are_the_people_remove = { return `resolve ${clean_name(cards[game.played_card].name)}.` }, prompt() { - if (game.demInfl[6] === 0 && game.vm_available_ops > 0) { + if (game.demInfl[5] === 0 && game.vm_available_ops > 0) { view.prompt = '"We are the People!": no SPs to remove.' gen_action('done') } else if (game.vm_available_ops > 0 ) { @@ -8543,11 +8558,11 @@ states.vm_we_are_the_people_remove = { pop_summary() log_br() } - if (!game.vm_influence_added[6]) { + if (!game.vm_influence_added[5]) { log('No SPs removed') vm_next() } else { - game.valid_spaces = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + game.valid_spaces = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] game.state = 'vm_we_are_the_people_add' } } @@ -8563,15 +8578,15 @@ states.vm_we_are_the_people_add = { return }*/ - view.prompt = `"We are the People!": you must add the ${pluralize(game.vm_influence_added[6],'SP')} to spaces in Germany.` + view.prompt = `"We are the People!": you must add the ${pluralize(game.vm_influence_added[5],'SP')} to spaces in Germany.` for (let space_id of game.valid_spaces) { gen_action_space(space_id); } }, space(space) { vm_do_add_infl_free(space) - game.vm_influence_added[6]-- - if (game.vm_influence_added[6] === 0 ) { + game.vm_influence_added[5]-- + if (game.vm_influence_added[5] === 0 ) { game.valid_spaces = [] if (game.summary.length > 0) { pop_summary() @@ -9011,7 +9026,6 @@ states.vm_support_falters = { /* =================== EVENTS ================================ */ // #region GENERATED EVENT CODE - const CODE = [] CODE[1] = [ // Legacy of Martial Law* @@ -9047,7 +9061,7 @@ CODE[3] = [ // Walesa CODE[4] = [ // Michnik [ vm_permanently_remove ], - [ vm_valid_spaces, 26 ], + [ vm_valid_spaces, 'Polish Writers' ], [ vm_prompt, 'the Polish Intellectuals space' ], [ vm_add_x_infl, 3 ], [ vm_return ], @@ -9150,7 +9164,7 @@ CODE[18] = [ // Poszgay Defends the Revolution CODE[19] = [ // Papal vist [ vm_permanently_remove ], - [ vm_valid_spaces, 20, 35, 38 ], + [ vm_valid_spaces, 'Catholic Church, Poland', 'Catholic Church, Czechoslovakia', 'Catholic Church, Hungary' ], [ vm_prompt, 'any Catholic Church space' ], [ vm_add_x_infl, 3 ], [ vm_return ], @@ -9179,7 +9193,7 @@ CODE[23] = [ // Power Struggle - Hungary CODE[24] = [ // St Nicolas Church [ vm_permanently_remove ], - [ vm_valid_spaces, 6 ], + [ vm_valid_spaces, 'Lutheran Church' ], [ vm_prompt, 'the Lutheran Church' ], [ vm_take_control_prep, 1 ], [ vm_st_nicholas_church ], @@ -9218,7 +9232,7 @@ CODE[28] = [ // Factory Party Cells CODE[29] = [ // Jan Palach Week* [ vm_permanently_remove ], - [ vm_valid_spaces, 30 ], + [ vm_valid_spaces, 'Charles University' ], [ vm_prompt, 'the Charles University space' ], [ vm_add_x_infl, 6 ], [ vm_return ], @@ -9230,7 +9244,7 @@ CODE[30] = [ // Tear Gas ] CODE[31] = [ // Intelligentsia - [ vm_valid_spaces, 4, 26, 31, 46, 55, 73 ], + [ vm_valid_spaces_socio, 5 ], [ vm_prompt, 'Intellectual spaces, no more than 2 per space' ], [ vm_add_limited_infl, 4, 2 ], [ vm_return ], @@ -9255,7 +9269,7 @@ CODE[33] = [ // Sajudis* CODE[34] = [ // Fidesz* [ vm_permanently_remove ], - [ vm_valid_spaces, 47 ], + [ vm_valid_spaces, 'Eotvos Lorand University' ], [ vm_prompt, 'the Hungary students space' ], [ vm_add_x_infl, 5 ], [ vm_return ], @@ -9295,7 +9309,7 @@ CODE[38] = [ // July Concept CODE[39] = [ // Eco-Glasnost* [ vm_permanently_remove ], - [ vm_valid_spaces, 66 ], + [ vm_valid_spaces, 'Ruse' ], [ vm_prompt, 'Ruse' ], [ vm_add_x_infl, 4 ], [ vm_eco_glasnost ], @@ -9516,7 +9530,7 @@ CODE[68] = [ // Klaus and Komarek* [ vm_klaus_and_komarek ], [ vm_prompt, 'Prague' ], [ vm_remove_x_opp_infl, 2 ], - [ vm_valid_spaces, 29 ], + [ vm_valid_spaces, 'Praha' ], [ vm_add_x_infl, 2 ], [ vm_return ], ] @@ -9546,7 +9560,7 @@ CODE[72] = [ // Peasant Parties Revolt CODE[73] = [ // Laszlo Tokes* [ vm_permanently_remove ], - [ vm_valid_spaces, 50, 56 ], + [ vm_valid_spaces, 'Timisoara', 'Harghita/Covasna' ], [ vm_prompt, 'in Timisoara and Harghita/Covasna' ], [ vm_add_limited_infl, 2, 1 ], [ vm_laszlo_tokes ], @@ -9579,7 +9593,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_country_socio_2, 3, 4 ], [ vm_support_check_modified, 2, 2 ], [ vm_endif ], [ vm_return ], @@ -9599,7 +9613,7 @@ CODE[78] = [ // Workers Revolt CODE[79] = [ // The Third Way* [ vm_permanently_remove ], [ vm_the_third_way ], - [ vm_valid_spaces, 4 ], + [ vm_valid_spaces, 'German Writers' ], [ vm_prompt, 'the East German Writers space' ], [ vm_add_x_infl, 3 ], [ vm_return ], @@ -9751,7 +9765,7 @@ CODE[96] = [ // The Chinese Solution* CODE[97] = [ // The Tyrant is Gone* [ vm_if, ()=>game.persistent_events.includes(54) ], - [ vm_valid_spaces, 51 ], + [ vm_valid_spaces, 'Cluj-Napoca' ], [ vm_prompt, 'the Romanian Elite Space' ], [ vm_remove_x_opp_infl, 4 ], [ vm_the_tyrant_is_gone ], @@ -9788,7 +9802,7 @@ CODE[100] = [ // Stand Fast* CODE[101] = [ // Elena* [ vm_permanently_remove ], [ vm_if, ()=>!game.the_tyrant_is_gone ], - [ vm_valid_spaces, 51 ], + [ vm_valid_spaces, 'Cluj-Napoca' ], [ vm_prompt, 'the Romania Elite Space' ], [ vm_add_x_infl, 2 ], [ vm_elena ], @@ -9818,10 +9832,10 @@ CODE[104] = [ // New Year's Eve Party* CODE[105] = [ // Public Against Violence* [ vm_permanently_remove ], - [ vm_valid_spaces, 36 ], + [ vm_valid_spaces, 'Kosice' ], [ vm_prompt, 'Kosice' ], [ vm_add_x_infl, 2 ], - [ vm_valid_spaces, 37 ], + [ vm_valid_spaces, 'Presov' ], [ vm_prompt, 'Presov' ], [ vm_add_x_infl, 2 ], [ vm_public_against_violence ], @@ -9915,3 +9929,4 @@ CODE[351] = [ // Support Falters [ vm_return ], ] // #endregion + |