summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-29 22:37:40 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-29 22:37:40 +0200
commit1a3eebb3a2ba30f427f0a8e73cee75deef00ee70 (patch)
treea7f7c7e3eb8c75588b4fa968c9cd3cdd2145c30c
parentfe6cade2c58184be8a9bd6eac6146ca74520fede (diff)
downloadplantagenet-1a3eebb3a2ba30f427f0a8e73cee75deef00ee70.tar.gz
reverse the polarity!
-rw-r--r--play.js1
-rw-r--r--rules.ts10
2 files changed, 5 insertions, 6 deletions
diff --git a/play.js b/play.js
index c94a11c..87e0a18 100644
--- a/play.js
+++ b/play.js
@@ -1335,6 +1335,7 @@ function update_vassals() {
if (ui.vassal_map[v]) {
ui.vassal_map[v].classList.remove("hide")
ui.vassal_map[v].classList.toggle("action", is_action("vassal", v))
+ ui.vassal_map[v].classList.toggle("selected", v === view.vassal)
}
} else {
// on calendar (+ maybe on lord mat)
diff --git a/rules.ts b/rules.ts
index 217e535..ddc1624 100644
--- a/rules.ts
+++ b/rules.ts
@@ -2033,9 +2033,9 @@ function vassal_ic_rating(lord: Lord, spend: number) {
// Note: use of game.vassal
if (game.active === LANCASTER)
- rating += data.vassals[game.vassal].influence
- else
rating -= data.vassals[game.vassal].influence
+ else
+ rating += data.vassals[game.vassal].influence
return rating
}
@@ -2666,6 +2666,8 @@ states.pay_vassals = {
// === 3.2.4 DISBAND ===
function clear_lord(lord: Lord) {
+ for_each_vassal_with_lord(lord, disband_vassal)
+
discard_lord_capability_n(lord, 0)
discard_lord_capability_n(lord, 1)
@@ -2679,10 +2681,6 @@ function clear_lord(lord: Lord) {
set_lord_moved(lord, 0)
- for_each_vassal_with_lord(lord, v => {
- disband_vassal(v)
- })
-
check_capture_of_the_king()
}