summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-11-19 18:25:39 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:37 +0100
commit16dde60a53bff582d7790d27ca327fcced2283c1 (patch)
tree3a106f6bfc397ed05436ab82932e0002d4f317b7 /play.js
parent62c88c0090471d1442002078c5d1a2372dddbc72 (diff)
downloadnevsky-16dde60a53bff582d7790d27ca327fcced2283c1.tar.gz
Show events.
Diffstat (limited to 'play.js')
-rw-r--r--play.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/play.js b/play.js
index a986c9a..486611b 100644
--- a/play.js
+++ b/play.js
@@ -174,7 +174,9 @@ function count_vp2() {
}
function is_card_in_use(c) {
- if (view.capabilities.includes(c))
+ if (set_has(view.events, c))
+ return true
+ if (set_has(view.capabilities, c))
return true
if (view.lords.cards.includes(c))
return true
@@ -281,6 +283,7 @@ const ui = {
plan_action_cards: [],
arts_of_war_dialog: document.getElementById("arts_of_war"),
arts_of_war_list: document.getElementById("arts_of_war_list"),
+ events: document.getElementById("events"),
p1_capabilities: document.getElementById("p1_capabilities"),
p2_capabilities: document.getElementById("p2_capabilities"),
command: document.getElementById("command"),
@@ -723,6 +726,10 @@ function update_arts_of_war() {
}
}
+ ui.events.replaceChildren()
+ for (let c of view.events)
+ ui.events.appendChild(ui.arts_of_war[c])
+
ui.p1_capabilities.replaceChildren()
for_each_teutonic_arts_of_war(c => {
if (view.capabilities.includes(c))