summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/play.js b/play.js
index e89ca36..7db4efb 100644
--- a/play.js
+++ b/play.js
@@ -934,6 +934,11 @@ function on_update() {
}
for (let region = 0; region < 12; ++region) {
+ if (has_militia_castra(region))
+ show(ui.mcastra[region])
+ else
+ hide(ui.mcastra[region])
+
if (has_militia(region)) {
let lone_militia = true
for (let pi = 0; pi < player_count; ++pi) {
@@ -945,14 +950,10 @@ function on_update() {
}
}
if (lone_militia) {
- let mcastra = has_militia_castra(region)
- if (mcastra) {
- show(ui.mcastra[region])
+ if (has_militia_castra(region))
layout_stack(-1, [ ui.mcastra[region], ui.militia[region] ], region, true, 16, 16)
- } else {
- hide(ui.mcastra[region])
+ else
layout_stack(-1, [ ui.militia[region] ], region, true, 16, 16)
- }
}
}
@@ -992,6 +993,9 @@ function on_update() {
hide(ui.castra[pi][ai])
}
+ if (has_militia_castra(region) && inside)
+ stack.push(ui.mcastra[region])
+
stack.push(e)
for (let i = 0; i < 33; ++i) {