From 5611ca2a4dfd32a74df71e73f721ebfd1633db0a Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 20 Apr 2024 00:17:10 +0200 Subject: Only show lords in play in planning window. --- play.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/play.js b/play.js index 1edad3f..c4760f8 100644 --- a/play.js +++ b/play.js @@ -1363,12 +1363,17 @@ function update_plan() { if (is_planning) { ui.plan_actions.classList.remove("hide") for (let lord = 0; lord < 28; ++lord) { - if (is_action("plan", lord)) { - ui.plan_action_cards[lord].classList.add("action") - ui.plan_action_cards[lord].classList.remove("disabled") + if (is_lord_in_game(lord)) { + ui.plan_action_cards[lord].classList.remove("hide") + if (is_action("plan", lord)) { + ui.plan_action_cards[lord].classList.add("action") + ui.plan_action_cards[lord].classList.remove("disabled") + } else { + ui.plan_action_cards[lord].classList.remove("action") + ui.plan_action_cards[lord].classList.add("disabled") + } } else { - ui.plan_action_cards[lord].classList.remove("action") - ui.plan_action_cards[lord].classList.add("disabled") + ui.plan_action_cards[lord].classList.add("hide") } } if (is_action("plan", -1)) { -- cgit v1.2.3