From e4cf9f359261b1fc2ce24c6f2d668d5700650548 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Sun, 6 Oct 2024 09:35:57 +0100 Subject: Consistent use of valid_spaces_country_opp --- rules.js | 52 ++++++++++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index fa7c869..b9f1610 100644 --- a/rules.js +++ b/rules.js @@ -2533,26 +2533,19 @@ function valid_spaces_sc() { infl = game.demInfl[i] //if (infl !== 0 ) { // Check Solidarity Legalised - if (game.persistent_events.includes(2)) { - if (space.space_id === 14) {continue} - } + if (game.persistent_events.includes(2) && space.space_id === 14) {continue} + // Check Civic Forum - if (game.persistent_events.includes(90)) { - if (space.space_id === 30) {continue} - } + if (game.persistent_events.includes(90) && space.space_id === 30) {continue} + // Check We Are the People - if (game.persistent_events.includes(48)) { - if (space.space_id === 9) {continue} - } - valid_spaces_set.add(space.space_id); + if (game.persistent_events.includes(48) && space.space_id === 9) {continue} //Check for Foreign Currency Debt Burden - if (game.persistent_events.includes(49)) { - for (let n of valid_spaces_set) { - if (spaces[n].country === game.foreign_currency_debt_burden) { - valid_spaces_set.delete(n); - } - } + if (game.persistent_events.includes(49) && space.country === game.foreign_currency_debt_burden) {continue} { + + valid_spaces_set.add(space.space_id); + } //} } @@ -4474,15 +4467,18 @@ function vm_valid_spaces_country_sc () { //Check We are the People if (game.persistent_events.includes(48) && space.space_id === 9) {continue} valid_spaces.push(space.space_id); + + //Check Foreign Currency Debt Burden + if (game.persistent_events.includes(49) && space.country === game.foreign_currency_debt_burden) {continue} } } } game.valid_spaces = valid_spaces //Check for Foreign Currency Debt Burden - if (game.persistent_events.includes(49) && game.active === DEM) { + /*if (game.persistent_events.includes(49) && game.active === COM) { game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country !== game.foreign_currency_debt_burden) - } + }*/ vm_next() } @@ -8647,7 +8643,7 @@ CODE[40] = [ // Hungarian Democratic Forum CODE[41] = [ // Ceausescu* [ vm_if, ()=>!game.the_tyrant_is_gone ], - [ vm_valid_spaces_country_sc, 'Romania' ], + [ vm_valid_spaces_country_opp, 'Romania' ], [ vm_prompt, ' from Romania' ], [ vm_remove_opp_infl, 3 ], [ vm_valid_spaces_country_sc, 'Romania' ], @@ -8672,7 +8668,7 @@ CODE[43] = [ // Power Struggle - Bulgaria CODE[44] = [ // Inflationary Currency [ vm_inflationary_currency ], - [ vm_valid_spaces_country_sc ], + [ vm_valid_spaces_country_opp ], [ vm_prompt, ()=>` from ${country_name(game.vm_active_country)}` ], [ vm_remove_opp_infl, 2 ], [ vm_inflationary_currency_discard ], @@ -8953,7 +8949,7 @@ CODE[81] = [ // The Baltic Way* ] CODE[82] = [ // Spitzel* - [ vm_valid_spaces_country_sc, 'East_Germany' ], + [ vm_valid_spaces_country_opp, 'East_Germany' ], [ vm_prompt, ' from East Germany' ], [ vm_remove_opp_infl, 2 ], [ vm_permanently_remove ], @@ -9055,7 +9051,7 @@ CODE[93] = [ // Shock Therapy* ] CODE[94] = [ // Union of Democratic Forces* - [ vm_valid_spaces_country_sc, 'Bulgaria' ], + [ vm_valid_spaces_country_opp, 'Bulgaria' ], [ vm_prompt, ' from Bulgaria' ], [ vm_remove_opp_infl, 4 ], [ vm_valid_spaces_country_sc, 'Bulgaria' ], @@ -9080,7 +9076,7 @@ CODE[96] = [ // The Chinese Solution* ] CODE[97] = [ // The Tyrant is Gone* - [ vm_if, ()=>game.persistent_events.includes(54) ], + [ vm_if, ()=>game.persistent_events['the_crowd_turns_against_ceausescu'] ], [ vm_valid_spaces, 51 ], [ vm_prompt, 'the Romanian Elite Space' ], [ vm_remove_x_opp_infl, 4 ], @@ -9093,7 +9089,7 @@ CODE[97] = [ // The Tyrant is Gone* ] CODE[98] = [ // Politburo Intrigue* - [ vm_valid_spaces_country_sc, 'Bulgaria' ], + [ vm_valid_spaces_country_opp, 'Bulgaria' ], [ vm_prompt, ' from Bulgaria' ], [ vm_remove_limited_opp_infl, 3, 2 ], [ vm_valid_spaces_country_sc, 'Bulgaria' ], @@ -9201,14 +9197,6 @@ CODE[110] = [ // Malta Summit* // #endregion - - - - - - - - // ============= TIANANMEN SQUARE TRACK AWARDS ==================== CODE[203] = [//Tiananmen Square space 3 award [vm_tst_3], -- cgit v1.2.3