diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-05-06 15:21:33 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-05-06 15:21:33 +0200 |
commit | 4d2ba72129012dba2493011c091e76057386fb12 (patch) | |
tree | c9ed776675c82a78fa72598485767cec3d2aaebf /play.js | |
parent | 4b96a1e54cf62c339f448c4c01ab0df3228df5f6 (diff) | |
download | plantagenet-4d2ba72129012dba2493011c091e76057386fb12.tar.gz |
feed x3
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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) |