summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-02-26 12:53:01 +0100
committerTor Andersson <tor@ccxvii.net>2023-05-03 18:48:15 +0200
commit9486ef27037835a6e31eac843b04219eda4c919c (patch)
treed9d8b0321ff644da439be88154ee42e537775a81 /play.js
parentbbb9a7bd3686f5a16e661a2a3e8e8c94f8e2bfe2 (diff)
downloadandean-abyss-9486ef27037835a6e31eac843b04219eda4c919c.tar.gz
Combined roles.
Diffstat (limited to 'play.js')
-rw-r--r--play.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/play.js b/play.js
index a870869..b13418c 100644
--- a/play.js
+++ b/play.js
@@ -7,6 +7,10 @@ const FARC = 1
const AUC = 2
const CARTELS = 3
+const GOVT_AUC = 4
+const FARC_CARTELS = 5
+const AUC_CARTELS = 6
+
// Pieces
const BASE = 0
const GUERRILLA = 1
@@ -49,6 +53,9 @@ let ui = {
document.getElementById("role_FARC"),
document.getElementById("role_AUC"),
document.getElementById("role_Cartels"),
+ document.getElementById("role_Government_+_AUC"),
+ document.getElementById("role_FARC_+_Cartels"),
+ document.getElementById("role_AUC_+_Cartels"),
],
spaces: [],
control: [],
@@ -616,10 +623,21 @@ function on_update() {
ui.header.classList.toggle("cartels", view.current === CARTELS)
ui.header.classList.toggle("farc", view.current === FARC)
+ ui.player[GOVT].classList.toggle("hide", view.scenario < 3)
+ ui.player[AUC].classList.toggle("hide", view.scenario < 4)
+ ui.player[CARTELS].classList.toggle("hide", view.scenario < 4)
+ ui.player[FARC].classList.toggle("hide", view.scenario < 3)
+ ui.player[GOVT_AUC].classList.toggle("hide", view.scenario !== 2)
+ ui.player[FARC_CARTELS].classList.toggle("hide", view.scenario !== 2)
+ ui.player[AUC_CARTELS].classList.toggle("hide", view.scenario !== 3)
+
ui.player[GOVT].classList.toggle("active", view.current === GOVT)
ui.player[AUC].classList.toggle("active", view.current === AUC)
ui.player[CARTELS].classList.toggle("active", view.current === CARTELS)
ui.player[FARC].classList.toggle("active", view.current === FARC)
+ ui.player[GOVT_AUC].classList.toggle("active", view.current === GOVT || view.current === AUC)
+ ui.player[FARC_CARTELS].classList.toggle("active", view.current === FARC || view.current === CARTELS)
+ ui.player[AUC_CARTELS].classList.toggle("active", view.current === AUC || view.current === CARTELS)
ui.tokens.president.style.left = [ 0, "254px", "337px", "420px" ][view.president]