summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--images/tokens150/player_fascist.pngbin0 -> 4239 bytes
-rw-r--r--images/tokens75/player_fascist.pngbin0 -> 1490 bytes
-rw-r--r--play.css6
-rw-r--r--play.html2
-rw-r--r--play.js38
-rw-r--r--tools/tokens300/player_fascist.pngbin0 -> 13545 bytes
6 files changed, 40 insertions, 6 deletions
diff --git a/images/tokens150/player_fascist.png b/images/tokens150/player_fascist.png
new file mode 100644
index 0000000..cfb8c0f
--- /dev/null
+++ b/images/tokens150/player_fascist.png
Binary files differ
diff --git a/images/tokens75/player_fascist.png b/images/tokens75/player_fascist.png
new file mode 100644
index 0000000..b507348
--- /dev/null
+++ b/images/tokens75/player_fascist.png
Binary files differ
diff --git a/play.css b/play.css
index 0146160..5ca4956 100644
--- a/play.css
+++ b/play.css
@@ -148,6 +148,10 @@ body header.fascist.your_turn { background-color: hsl(30, 35%, 65%); }
margin-bottom: -30px;
}
+.front_container div.player.fascist + div {
+ margin-left: 30px;
+}
+
.medallion_container {
position: absolute;
display: flex;
@@ -271,6 +275,7 @@ body header.fascist.your_turn { background-color: hsl(30, 35%, 65%); }
.player.anarchist { background-image: url(images/tokens75/player_anarchist.png); }
.player.communist { background-image: url(images/tokens75/player_communist.png); }
.player.moderate { background-image: url(images/tokens75/player_moderate.png); }
+.player.fascist { background-image: url(images/tokens75/player_fascist.png); }
.initiative { background-image: url("images/tokens75/initiative_cw.png"); }
.initiative.ccw { background-image: url("images/tokens75/initiative_ccw.png"); }
@@ -422,6 +427,7 @@ body header.fascist.your_turn { background-color: hsl(30, 35%, 65%); }
.player.anarchist { background-image: url(images/tokens150/player_anarchist.png); }
.player.communist { background-image: url(images/tokens150/player_communist.png); }
.player.moderate { background-image: url(images/tokens150/player_moderate.png); }
+.player.fascist { background-image: url(images/tokens150/player_fascist.png); }
.initiative { background-image: url("images/tokens150/initiative_cw.png"); }
.initiative.ccw { background-image: url("images/tokens150/initiative_ccw.png"); }
diff --git a/play.html b/play.html
index d7effa6..77addab 100644
--- a/play.html
+++ b/play.html
@@ -11,6 +11,8 @@
<link rel="stylesheet" href="/common/client.css">
<link rel="stylesheet" href="play.css">
<script defer src="/common/client.js"></script>
+<script>var exports = {}</script>
+<script defer src="data.js"></script>
<script defer src="play.js"></script>
</head>
<body>
diff --git a/play.js b/play.js
index b9ebde8..0415fff 100644
--- a/play.js
+++ b/play.js
@@ -37,6 +37,7 @@ const ui = {
tracks_x: [],
tracks: [],
fronts: [],
+ status_fronts: [],
con_fronts: [],
str_fronts: [],
@@ -221,6 +222,13 @@ function build_front(i, action_id, box_name) {
var [x, y, w, h] = boxes[box_name]
var e
+ e = ui.status_fronts[i] = document.createElement("div")
+ e.className = "hide"
+ e.style.position = "absolute"
+ e.style.top = Math.round(y + h / 2 - 140) + "px"
+ e.style.left = Math.round(x + w / 2 - 103) + "px"
+ ui.map_container.appendChild(e)
+
e = ui.con_fronts[i] = document.createElement("div")
e.className = "front_container"
e.style.top = y + 5 + "px"
@@ -356,10 +364,22 @@ const faction_class = {
"m": "moderate",
}
-function update_front(str_container, con_container, front) {
+function update_front(status_card, str_container, con_container, front, front_id) {
var i, n, e, cn
str_container.replaceChildren()
+ con_container.replaceChildren()
+
+ if (front.status === "Victory") {
+ status_card.className = "card card_111"
+ return
+ }
+ if (front.status === "Defeat") {
+ status_card.className = "card card_112"
+ return
+ }
+ status_card.className = "hide"
+
if (front.value < 0) {
n = -front.value
cn = "brown token front_minus"
@@ -373,7 +393,13 @@ function update_front(str_container, con_container, front) {
str_container.appendChild(e)
}
- con_container.replaceChildren()
+ var current_card = view.current_events[view.current_events.length-1]
+ if (current_card && data.cards[current_card].test.front === front_id) {
+ e = document.createElement("div")
+ e.className = "red token player fascist"
+ con_container.appendChild(e)
+ }
+
for (i of ["a", "c", "m"]) {
if (front.contributions.includes(i)) {
e = document.createElement("div")
@@ -501,10 +527,10 @@ function on_update() { // eslint-disable-line no-unused-vars
update_hero_points(ui.tokens.c, view.hero_points.c)
update_hero_points(ui.tokens.m, view.hero_points.m)
- update_front(ui.str_fronts[0], ui.con_fronts[0], view.fronts.a)
- update_front(ui.str_fronts[1], ui.con_fronts[1], view.fronts.m)
- update_front(ui.str_fronts[2], ui.con_fronts[2], view.fronts.n)
- update_front(ui.str_fronts[3], ui.con_fronts[3], view.fronts.s)
+ update_front(ui.status_fronts[0], ui.str_fronts[0], ui.con_fronts[0], view.fronts.a, "a")
+ update_front(ui.status_fronts[1], ui.str_fronts[1], ui.con_fronts[1], view.fronts.m, "m")
+ update_front(ui.status_fronts[2], ui.str_fronts[2], ui.con_fronts[2], view.fronts.n, "n")
+ update_front(ui.status_fronts[3], ui.str_fronts[3], ui.con_fronts[3], view.fronts.s, "s")
for (e of ui.raw_glory_container)
e.replaceChildren()
diff --git a/tools/tokens300/player_fascist.png b/tools/tokens300/player_fascist.png
new file mode 100644
index 0000000..71d9b17
--- /dev/null
+++ b/tools/tokens300/player_fascist.png
Binary files differ