summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/play.js b/play.js
index f240f08..7814414 100644
--- a/play.js
+++ b/play.js
@@ -972,6 +972,11 @@ function layout_stack(id, list, region, in_capital, dx, dy, z = 1) {
stack_count[region] += 1
}
+ if (in_capital === 2) {
+ x += 36
+ y += 18
+ }
+
for (let i = list.length - 1; i >= 0; --i) {
let item = list[i]
item.style.left = x + "px"
@@ -1283,10 +1288,13 @@ function on_update() {
else
layout_battle_stack(view.combat.attacker < 0, [ ui.militia[region] ], region, true)
} else {
+ let inside = 1
+ if (is_action("capital", region))
+ inside = 2
if (has_militia_castra(region))
- layout_stack(-1, [ ui.mcastra[region], ui.militia[region] ], region, true, 16, 16)
+ layout_stack(-1, [ ui.mcastra[region], ui.militia[region] ], region, inside, 16, 16)
else
- layout_stack(-1, [ ui.militia[region] ], region, true, 16, 16)
+ layout_stack(-1, [ ui.militia[region] ], region, inside, 16, 16)
}
}
}
@@ -1357,7 +1365,7 @@ function on_update() {
if (is_battle_stack(region, "general", pi * 6 + ai))
layout_battle_stack(pi * 6 + ai === view.combat.attacker, stack, region)
else
- layout_stack(pi * 6 + ai, stack, region, inside, 16, 16)
+ layout_stack(pi * 6 + ai, stack, region, inside ? 1 : 0, 16, 16)
} else {
avail_stack.push(e)
}