summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-12-14 19:55:39 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:38 +0100
commit172d787f9ef492b93dc051c53de52364c2561061 (patch)
tree1511ac3eea9ee849ff792d4c883eeabd1fc3b1cd /play.js
parent5b3e18ac67bd606395f53c096c78385d4584a039 (diff)
downloadnevsky-172d787f9ef492b93dc051c53de52364c2561061.tar.gz
Fix vassals.
Diffstat (limited to 'play.js')
-rw-r--r--play.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/play.js b/play.js
index 6a52ae1..045148e 100644
--- a/play.js
+++ b/play.js
@@ -17,6 +17,10 @@ const LORD_ANDREY = find_lord("Andrey")
const MAP_DPI = 75
+const VASSAL_UNAVAILABLE = 0
+const VASSAL_READY = 1
+const VASSAL_MUSTERED = 2
+
const NOWHERE = -1
const CALENDAR = 100
const LEGATE = 100
@@ -298,11 +302,11 @@ function has_global_capability(cap) {
}
function is_vassal_ready(vassal) {
- return view.lords.vassals[vassal] === 0
+ return view.lords.vassals[vassal] === VASSAL_READY
}
function is_vassal_mustered(vassal) {
- return view.lords.vassals[vassal] > 0
+ return view.lords.vassals[vassal] === VASSAL_MUSTERED
}
function for_each_teutonic_card(fn) {