summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-09-24 19:22:19 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-01 16:11:22 +0200
commit82442689adb66ad3f46a52283bff097eb30ec2a9 (patch)
treee09dcfd5b5d04b1ccf3d0759bba8d3d387bc8a07 /play.js
parent146f8991515a38afeaf3187bac2f53ff3b624a7c (diff)
downloadwaterloo-campaign-1815-82442689adb66ad3f46a52283bff097eb30ec2a9.tar.gz
Allow entering reinforcements from both 1017 and 1018.
Diffstat (limited to 'play.js')
-rw-r--r--play.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/play.js b/play.js
index 72d34b3..5736494 100644
--- a/play.js
+++ b/play.js
@@ -72,6 +72,7 @@ const TURN_DX = 70
const REINF_OFFSET = {
1015: [ hex_dx/2, hex_dy * 3/4 ],
+ 1017: [ hex_dx/2, hex_dy * 3/4 ],
1018: [ -hex_dx/2, hex_dy * 3/4 ],
1020: [ -hex_dx/2, hex_dy * 3/4 ],
3000: [ -hex_dx/2, 0 ],
@@ -333,6 +334,8 @@ function on_update() {
let x, y
if (hex === REINFORCEMENTS) {
hex = find_reinforcement_hex(id)
+ if (typeof hex !== "number")
+ hex = hex[0]
s = find_reinforcement_z(id)
z = 4 - s
x = ui.hex_x[hex] + s * 24