From 898061b8c5324f3f974c9e086c96ff8a7db58357 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Mon, 16 Sep 2024 17:13:33 +0100 Subject: Updates to log --- events.txt | 1 + rules.js | 27 ++++++++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/events.txt b/events.txt index 928fb8e..dbcbb12 100644 --- a/events.txt +++ b/events.txt @@ -682,6 +682,7 @@ permanently_remove CARD 92 - Betrayal # Choose any Orthodox Church space. Replace all Democratic SPs with Communist SPs. +prompt 'choose any Orthodox Church space. Replace all Democratic SPs with Communist SPs' betrayal permanently_remove diff --git a/rules.js b/rules.js index 4274acf..9c73551 100644 --- a/rules.js +++ b/rules.js @@ -1810,6 +1810,7 @@ states.stasi_end_round = { if (available_cards.length === 0) { view.prompt = 'Stasi: no cards remaining.' gen_action('pass') + return } view.prompt = 'Stasi: you must select your next card to play.' @@ -1827,6 +1828,7 @@ states.stasi_end_round = { game.stasi_card = card }, pass() { + log('Stasi: Democrat has no remaining cards') game.stasi_card = 0 game.round_player = COM game.round ++ @@ -1834,6 +1836,7 @@ states.stasi_end_round = { next_player() game.valid_spaces = [] if (game.persistent_events['general_strike']) { + log_h3('C5') game.state = 'general_strike' } else { game.state = 'choose_card' @@ -1846,6 +1849,7 @@ states.stasi_end_round = { next_player() game.valid_spaces = [] if (game.persistent_events['general_strike']) { + log_h3('C5') game.state = 'general_strike' } else { game.state = 'choose_card' @@ -2731,6 +2735,7 @@ function end_round() { } console.log('game.dem_tst_position ', game.dem_tst_position , 'game.com_tst_position ', game.com_tst_position ) + // Check if last round and if so resolve end turn events if (game.round_player === DEM && game.round === 7) { if(game.persistent_events['honecker']) { @@ -2808,15 +2813,16 @@ function end_round() { if (game.active !== COM) { next_player() } + log_h3('C5') return } else { game.state = 'choose_card' game.round_player = COM game.round ++ + log_h2(`Action Round ${game.round}`) if (game.active !== COM) { next_player() } - log_h2(`Action Round ${game.round}`) } } //game.state = 'choose_card' Does this do anything any more? @@ -5323,7 +5329,7 @@ states.vm_brought_in_for_questioning = { gen_action('done') } else if (game.democrat_hand.length === 0) { view.prompt = 'Brought in for Questioning. No cards to discard.' - gen_action('done') + gen_action('pass') } else { view.prompt = 'Brought in for Questioning: you must discard a random card.' gen_action('discard') @@ -5340,10 +5346,11 @@ states.vm_brought_in_for_questioning = { goto_vm(game.vm_event) } }, + pass() { + log('No cards to discard') + vm_return() + }, done() { - if (game.vm_event = 0) { - log('No cards to discard') - } vm_return() } } @@ -7061,12 +7068,13 @@ states.vm_support_falters = { } /* =================== EVENTS ================================ */ + // #region GENERATED EVENT CODE const CODE = [] CODE[1] = [ // Legacy of Martial Law* [ vm_valid_spaces_country_opp, 'Poland' ], - [ vm_prompt, 'Replace 1 Democratic SP in Poland with a Communist SP' ], + [ vm_prompt, 'replace 1 Democratic SP in Poland with a Communist SP' ], [ vm_legacy_of_martial_law ], [ vm_valid_spaces_country_sc, 'Poland' ], [ vm_prompt, 'make a Support Check in Poland' ], @@ -7503,7 +7511,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, 'Make 5 Support Checks in East Germany' ], + [ vm_prompt, 'make 5 Support Checks in East Germany' ], [ vm_support_check, 5 ], [ vm_permanently_remove ], [ vm_return ], @@ -7541,7 +7549,7 @@ CODE[66] = [ // New Forum ] CODE[67] = [ // Reformer Rehabilitated* - [ vm_prompt, 'Chose any non-scoring card in the discard pile. Event takes place immediately'], + [ vm_prompt, 'Chose any non-scoring card in the discard pile. Event takes place immediately' ], [ vm_reformer_rehabilitated ], [ vm_return ], ] @@ -7588,7 +7596,7 @@ CODE[73] = [ // Laszlo Tokes* [ vm_prompt, ' in Romania' ], [ vm_add_infl ], [ vm_else ], - [ vm_prompt, 'Make 2 Support Checks in Romania' ], + [ vm_prompt, 'make 2 Support Checks in Romania' ], [ vm_support_check, 2 ], [ vm_endif ], [ vm_permanently_remove ], @@ -7902,6 +7910,7 @@ CODE[110] = [ // Malta Summit* + // ============= TIANANMEN SQUARE TRACK AWARDS ==================== CODE[203] = [//Tiananmen Square space 3 award [vm_tst_3], -- cgit v1.2.3