summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-07 17:41:04 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commit09077aaec083f2328e314a02110645fad24f5b7f (patch)
tree6d268fc470dc1b2600b4a4179ecf8d4dffcff627
parentdaa3adcb497a290f20fc1373d6b08be11d0fc403 (diff)
downloadplantagenet-09077aaec083f2328e314a02110645fad24f5b7f.tar.gz
don't require explicit game.active argument to is_favour_friendly
-rw-r--r--rules.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index eda2573..fef274c 100644
--- a/rules.js
+++ b/rules.js
@@ -1502,8 +1502,8 @@ function is_harlech(loc) {
return data.locales[loc].type === "harlech"
}
-function is_favour_friendly(loc, side) {
- if (side == YORK)
+function is_favour_friendly(loc) {
+ if (game.active == YORK)
return has_favoury_marker(loc)
else
return has_favourl_marker(loc)
@@ -1594,7 +1594,7 @@ function is_friendly_locale(loc) {
if (loc !== NOWHERE && loc < CALENDAR) {
if (has_enemy_lord(loc))
return false
- if (is_favour_friendly(loc, game.active)) {
+ if (is_favour_friendly(loc)) {
//to add friendly favour marker later
return true
}
@@ -2725,7 +2725,7 @@ states.levy_muster_lord = {
// Muster Ready Vassal Forces
if (is_friendly_locale(get_lord_locale(game.who))) {
- for (let vassal = first_vassal; vassal < last_vassal; vassal++)
+ for (let vassal = first_vassal; vassal <= last_vassal; vassal++)
if (is_vassal_ready(vassal) && is_favour_friendly(data.vassals[vassal].seat))
gen_action_vassal(vassal)
}