From 2fdac12b7a6e9a454dda1ef6b1bd74e29ca6b32d Mon Sep 17 00:00:00 2001 From: iainp5 Date: Mon, 23 Sep 2024 09:27:34 +0100 Subject: Updates to event markers --- play.html | 2 +- play.js | 26 ++++++++++++++++++++------ rules.js | 8 +++++++- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/play.html b/play.html index b9a53b6..e938d88 100644 --- a/play.html +++ b/play.html @@ -111,7 +111,7 @@ - + diff --git a/play.js b/play.js index 1220b41..c3b1bf2 100644 --- a/play.js +++ b/play.js @@ -23,10 +23,21 @@ const countries= [ ] const aside_events = [ - "eco_glasnost", - "helsinki_final_act", + "honecker", "st_nicholas_church", - "we_are_the_people" + "helsinki_final_act", + "eco_glasnost", + "we_are_the_people", + "foreign_currency_debt_burden", + "li_peng", + "austria_hungary_border_reopened", + "grenztruppen", + "presidential_visit", + "securitate", + "laslzo_tokes", + "stand_fast", + "elena", + "new_years_eve_party" ] let aside_events_showing = false let show_discard = false @@ -503,7 +514,7 @@ for (let id in view.persistent_events) { } // CHECK WHETHER ANY EVENT MARKERS ARE SHOWING IN THE ASIDE -/* + for (let id of aside_events) { if (view.persistent_events[id]) { aside_events_showing = true; @@ -511,8 +522,10 @@ for (let id of aside_events) { } if (aside_events_showing) { - document.getElementById('no_events').style.display = 'none' -}*/ + document.getElementById('events_panel').classList.remove("hide") +} else { + document.getElementById('events_panel').classList.add("hide") +} let systematization = document.getElementById('systematization') if (view.persistent_events['systematization'] > 0) { @@ -569,6 +582,7 @@ if (view.persistent_events['the_tyrant_is_gone'] > 0) { action_button("done", "Done") action_button("undo", "Undo") + console.log('view.persistent_events', view.persistent_events) } diff --git a/rules.js b/rules.js index ed69ff5..07644c2 100644 --- a/rules.js +++ b/rules.js @@ -83,7 +83,7 @@ exports.setup = function (seed, scenario, options) { discard: false, view_opp_hand: false, strategy_removed: [], - persistent_events: {austria_hungary_border_reopened: false, civic_forum: false, eco_glasnost: false, elena: false, foreign_currency_debt_burden: '', frg_embassies: false, general_strike: false, genscher: false, grenztruppen: false, helsinki_final_act: false, honecker: false, li_peng: false, ligachev: false, national_salvation_front: false, perestroika: false, presidential_visit: false, prudence: '', roundtable_talks: false, securitate: false, sinatra_doctrine: false, solidarity_legalised: false, stand_fast: '', stasi: false, st_nicholas_church: false, systematization: 0, tear_gas: false, the_crowd_turns_against_ceausescu: false, the_tyrant_is_gone: 0, the_wall: false, the_wall_must_go: false, we_are_the_people: false, yakovlev: false}, + persistent_events: {austria_hungary_border_reopened: false, civic_forum: false, eco_glasnost: false, elena: false, foreign_currency_debt_burden: '', frg_embassies: false, general_strike: false, genscher: false, grenztruppen: false, helsinki_final_act: false, honecker: false, laszlo_tokes: false, li_peng: false, ligachev: false, national_salvation_front: false, perestroika: false, presidential_visit: false, prudence: '', roundtable_talks: false, securitate: false, sinatra_doctrine: false, solidarity_legalised: false, stand_fast: '', stasi: false, st_nicholas_church: false, systematization: 0, tear_gas: false, the_crowd_turns_against_ceausescu: false, the_tyrant_is_gone: 0, the_wall: false, the_wall_must_go: false, we_are_the_people: false, yakovlev: false}, power_struggle_deck: [], power_struggle_discard: [], dem_hand_limit: 8, @@ -4789,6 +4789,7 @@ function vm_kremlin_coup() { } function vm_laszlo_tokes() { + game.persistent_events['laszlo_tokes'] = true game.playable_cards[107].playable = 1 game.state = 'vm_laszlo_tokes' } @@ -4822,6 +4823,11 @@ function vm_malta_summit() { game.state = 'vm_malta_summit' } +function vm_massacre_in_timisoara() { + game.persistent_events['laszlo_tokes'] = false + vm_next() +} + function vm_modrow() { game.playable_cards[15].playable = 0 game.state = 'vm_modrow' -- cgit v1.2.3