summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/play.js b/play.js
index aeea368..356e5a0 100644
--- a/play.js
+++ b/play.js
@@ -67,6 +67,7 @@ const ui = {
bonuses: [],
tokens_on_front: {},
glory: [],
+ initiative_token: undefined,
medallions: [],
spaces: [],
standees: [],
@@ -239,6 +240,8 @@ function on_init() {
e.setAttribute('data-card-id', '' + data.cards[c].id);
register_action(e, 'card', c);
}
+ let e = (ui.initiative_token = document.createElement('div'));
+ e.className = 'initiative_token';
data.fronts.forEach((front) => {
ui.tokens_on_front[front.id] = {};
FACTIONS.forEach((faction_id) => {
@@ -312,6 +315,8 @@ function on_update() {
ui.roles[f].medallions.appendChild(ui.medallions[m]);
}
}
+ ui.roles[view.initiative].medallions.appendChild(ui.initiative_token);
+ ui.initiative_token.setAttribute('data-year', view.year);
for (let faction_id of FACTIONS) {
ui.tableaus[faction_id].replaceChildren();
for (let c of view.tableaus[faction_id]) {