summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-20 00:17:10 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-20 00:17:10 +0200
commit5611ca2a4dfd32a74df71e73f721ebfd1633db0a (patch)
treee3087ddf1e32693f1a8fd7b72eb01d5f3cea818b
parent1080f804ea5f8fcb5fca4e4b9026185677de1b7a (diff)
downloadplantagenet-5611ca2a4dfd32a74df71e73f721ebfd1633db0a.tar.gz
Only show lords in play in planning window.
-rw-r--r--play.js15
1 files 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)) {