summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-03-09 20:27:00 +0100
committerTor Andersson <tor@ccxvii.net>2023-05-03 18:48:15 +0200
commit4ebde57849b41524721377b7e24078d448ad3736 (patch)
treeaca73152e13dd2c2a39a8b5d80608ec05ff158b5 /play.js
parent152da57135e508527a0bd24ce56347af84be0f94 (diff)
downloadandean-abyss-4ebde57849b41524721377b7e24078d448ad3736.tar.gz
Zap unused foreign countries. Darien & Sucumbios reminder tokens.
Diffstat (limited to 'play.js')
-rw-r--r--play.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/play.js b/play.js
index 00ac551..99cc0ef 100644
--- a/play.js
+++ b/play.js
@@ -63,6 +63,9 @@ const MOM_MISIL_ANTIAEREO = 27
const MOM_SENADO_CAMARA = 42
const MOM_MEXICAN_TRAFFICKERS = 67
+const EVT_SUCUMBIOS = 33
+const EVT_DARIEN = 71
+
const senado_class_list = [
"token reminder hide",
"token reminder senado_farc",
@@ -125,6 +128,8 @@ let ui = {
president: document.getElementById("token_el_presidente"),
propaganda: document.getElementById("token_prop_card"),
senado: document.getElementById("rem_senado"),
+ darien: document.getElementById("rem_darien"),
+ sucumbios: document.getElementById("rem_sucumbios"),
},
pieces: [],
resources: [
@@ -284,6 +289,9 @@ function init_ui() {
register_card_tip(ui.momentum[c], c)
for (let c of capability_events)
register_card_tip(ui.capabilities[c], c)
+ register_card_tip(ui.tokens.senado, MOM_SENADO_CAMARA)
+ register_card_tip(ui.tokens.darien, EVT_DARIEN)
+ register_card_tip(ui.tokens.sucumbios, EVT_SUCUMBIOS)
for (let i = 0; i < data.spaces.length; ++i) {
let id = data.spaces[i].id
@@ -727,6 +735,9 @@ function on_update() {
ui.tokens.president.style.left = [ 0, "254px", "337px", "420px" ][view.president]
ui.tokens.senado.classList = senado_class_list[view.senado]
+ ui.tokens.darien.classList.toggle("hide", !set_has(view.capabilities, EVT_DARIEN))
+ ui.tokens.sucumbios.classList.toggle("hide", !set_has(view.capabilities, EVT_SUCUMBIOS))
+
for (let cap of capability_events) {
let shaded = set_has(view.capabilities, -cap)
let unshaded = set_has(view.capabilities, cap)