From 4d2ba72129012dba2493011c091e76057386fb12 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 6 May 2024 15:21:33 +0200 Subject: feed x3 --- play.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/play.js b/play.js index 53f1453..df44b43 100644 --- a/play.js +++ b/play.js @@ -1056,7 +1056,13 @@ function update_lord_mat(ix) { update_lord_troops(ui.troops[ix], view.pieces.forces, ix, false) update_lord_troops(ui.routed_troops[ix], view.pieces.routed, ix, true) - ui.lord_feed[ix].classList.toggle("hide", count_lord_all_forces(ix) <= 6) + let n = count_lord_all_forces(ix) + if (n < 6) + ui.lord_feed[ix].className = "hide" + else if (n < 12) + ui.lord_feed[ix].className = "marker small feed x2" + else + ui.lord_feed[ix].className = "marker small feed x3" if (get_lord_locale(LORD_HENRY_VI) === CAPTURE_OF_THE_KING + ix) ui.marker_area[ix].appendChild(ui.captured_king) @@ -1070,7 +1076,7 @@ function update_lord_mat(ix) { ui.routed_troops[ix].replaceChildren() ui.lord_moved1[ix].classList.add("hide") ui.lord_moved2[ix].classList.add("hide") - ui.lord_feed[ix].classList.add("hide") + ui.lord_feed[ix].className = "hide" if (get_lord_locale(LORD_HENRY_VI) === CAPTURE_OF_THE_KING + ix) ui.marker_area[ix].appendChild(ui.captured_king) -- cgit v1.2.3