summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-04-29 13:50:45 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-03 10:28:30 +0200
commit0492e7ce8e27684c5331acb09ca35833bd556c01 (patch)
tree6364dccaed99b78b61602c1f741f28c2afeb624d /play.js
parent856e4296d5de43130aef823db7a9510c6c8dea71 (diff)
downloadwilderness-war-0492e7ce8e27684c5331acb09ca35833bd556c01.tar.gz
Tweak stacking of highlights when mixing unit stacks and spaces.
Mainly affects restoring Indians that are already at home.
Diffstat (limited to 'play.js')
-rw-r--r--play.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/play.js b/play.js
index 538e69d..45904b3 100644
--- a/play.js
+++ b/play.js
@@ -1065,7 +1065,13 @@ const MAXX = 2550 - 15
function layout_stack(stack, x, y, dx) {
let dim = style_dims[style]
- let z = (stack === focus) ? 101 : 1
+ let z = 1
+ if (stack === focus)
+ z = 201
+ else
+ for (let [p, elt] of stack)
+ if (is_action_piece(p))
+ z = 201
let n = stack.length
if (n > 32) n = Math.ceil(n / 4)