diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -2,9 +2,6 @@ /* global view, action_button, send_action */ -// TODO: pool for hero points to animate ? -// TODO: pool for faction markers to animate ? - const ui = { header: document.querySelector("header"), status: document.getElementById("status"), @@ -37,6 +34,7 @@ const ui = { document.getElementById("tokens_c"), document.getElementById("tokens_m"), ], + hero_point_pool: document.getElementById("hero_point_pool"), bag_of_glory: document.getElementById("bag_of_glory"), // spaces @@ -275,6 +273,13 @@ function on_init() { return on_init_once = true + let favicon = document.querySelector('link[rel="icon"]') + switch (params.role) { + case "Anarchist": favicon.href = "images/tokens150/player_anarchist.png"; break + case "Communist": favicon.href = "images/tokens150/player_communist.png"; break + case "Moderate": favicon.href = "images/tokens150/player_moderate.png"; break + } + ui.roles_list = document.getElementById("roles"), ui.roles = [ document.getElementById("role_Anarchist"), @@ -550,6 +555,9 @@ function on_update() { // eslint-disable-line no-unused-vars update_hero_points(ui.tokens[1], view.hero_points[1]) update_hero_points(ui.tokens[2], view.hero_points[2]) + ui.hero_point_pool.replaceChildren() + update_hero_points(ui.hero_point_pool, view.hero_points[3]) + update_front(ui.status_fronts[0], ui.str_fronts[0], ui.con_fronts[0], view.fronts[0], "a") update_front(ui.status_fronts[1], ui.str_fronts[1], ui.con_fronts[1], view.fronts[1], "m") update_front(ui.status_fronts[2], ui.str_fronts[2], ui.con_fronts[2], view.fronts[2], "n") @@ -577,8 +585,10 @@ function on_update() { // eslint-disable-line no-unused-vars action_button("Communist", "Communist") action_button("Moderate", "Moderate") + action_button("archives", "Archives") + action_button("volunteers", "Volunteers") + action_button("add_glory", "Add to Bag of Glory") - action_button("add_to_front", "+1 to a Front") action_button("draw_card", "Draw a Card") action_button("draw_cards", "Draw Cards") action_button("draw_glory", "Draw from Bag of Glory") @@ -586,7 +596,6 @@ function on_update() { // eslint-disable-line no-unused-vars action_button("lose_hp", "Lose Hero Points") action_button("play_to_tableau", "Action Points") action_button("play_for_event", "Event") - action_button("remove_blank_marker", "Remove Blank marker") action_button("use_momentum", "Momentum") action_button("use_ap", "Action Points") @@ -614,10 +623,12 @@ function on_focus_card_tip(x) { } function on_focus_medallion_tip(x) { + ui.status.textContent = data.medallions[x].name + ": " + data.medallions[x].tooltip ui.tooltip.className = "pink token medallion medallion_" + x } function on_blur_tip(x) { + ui.status.textContent = "" ui.tooltip.className = "hide" } |