summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-01-06 13:40:00 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:38 +0100
commit91fb32ae4dab552c39b561465659e739a7d5e9de (patch)
treeaff08c48886bb9c707555782b255a8df0920d57f
parent325587fce5ee7b41191d6b0ddfa2fd2afac1ed4f (diff)
downloadnevsky-91fb32ae4dab552c39b561465659e739a7d5e9de.tar.gz
Fix lift siege typo.
-rw-r--r--play.js6
-rw-r--r--rules.js3
2 files changed, 6 insertions, 3 deletions
diff --git a/play.js b/play.js
index 64fa4cb..b4b8fb0 100644
--- a/play.js
+++ b/play.js
@@ -194,7 +194,11 @@ function pack4_get(word, n) {
}
function is_lord_besieged(lord) {
- return pack1_get(view.pieces.besieged, lord)
+ let besieged = pack1_get(view.pieces.besieged, lord)
+ // show sallying lords as not besieged
+ if (view.battle && view.battle.reserves.includes(lord))
+ return false
+ return besieged
}
function is_lord_moved(lord) {
diff --git a/rules.js b/rules.js
index 0bb1e29..c7d49bb 100644
--- a/rules.js
+++ b/rules.js
@@ -1,7 +1,6 @@
"use strict"
// TODO: Strike hit overflow
-// TODO: Ambush - battle
// TODO: Ransom - sack
// TODO: Ransom - battle
@@ -4406,7 +4405,7 @@ function toggle_legate_selected() {
function release_besieged_lords(loc) {
for (let lord = 0; lord < lord_count; ++lord)
- if (get_lord_locale(loc) === loc && is_lord_besieged(lord))
+ if (get_lord_locale(lord) === loc && is_lord_besieged(lord))
set_lord_besieged(lord, 0)
}