summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-01-22 12:15:17 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:39 +0100
commitfda1496817bf63aa000eca7f6a1075b421f8de71 (patch)
treed7efb659821aba97f28849b09e693b588bbec29b /play.js
parent7dce4c82c1a79dee8a77be0c1d5eab4735be48eb (diff)
downloadnevsky-fda1496817bf63aa000eca7f6a1075b421f8de71.tar.gz
Fix display of relief sally siegeworks.
Diffstat (limited to 'play.js')
-rw-r--r--play.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/play.js b/play.js
index f229369..8d84c35 100644
--- a/play.js
+++ b/play.js
@@ -41,6 +41,7 @@ const EVENT_TEUTONIC_FIELD_ORGAN = T10
const AOW_TEUTONIC_TREBUCHETS = T14
const RG2 = 10
+const SA2 = 7
const MAP_DPI = 75
@@ -862,7 +863,7 @@ function on_blur_way_tip(way) {
ui.ways[way].classList.remove("tip")
}
-function on_click_way(way) {
+function on_click_way_tip(way) {
ui.ways[way].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" })
}
@@ -1587,7 +1588,7 @@ function update_battle() {
if (view.battle.sally)
def_prot = count_siege_markers(view.battle.where)
- if (view.battle.array[RG2] >= 0)
+ else if (view.battle.array[SA2] >= 0)
sally_prot = count_siege_markers(view.battle.where)
let att_ui, def_ui