summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-11 00:33:18 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-11 00:33:18 +0200
commit763dd8f797f1e9948b420a4453e768b47f21fc95 (patch)
tree3bdfdb60c85c4ba35764920c49fa4b54a5ab6cbe /rules.ts
parent9768c57475a5e6734bd2fe4743e529a23c6df579 (diff)
downloadplantagenet-763dd8f797f1e9948b420a4453e768b47f21fc95.tar.gz
always log IP relative to commanding lord/active player
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/rules.ts b/rules.ts
index 8b2397d..ba9bda9 100644
--- a/rules.ts
+++ b/rules.ts
@@ -1966,6 +1966,9 @@ function log_favour(loc) {
}
function log_ip(n) {
+ // +ve ip is lancastrian
+ if ((game.command === NOBODY && game.active === YORK) || is_york_lord(game.command))
+ n = -n
if (n < 0)
log(".ip " + n)
else if (n > 0)
@@ -1980,12 +1983,12 @@ function reduce_influence(amt: number) {
}
function reduce_york_influence(amt: number) {
- log_ip(-amt)
+ log_ip(amt)
game.influence = Math.max(-45, Math.min(45, game.influence + amt))
}
function increase_york_influence(amt: number) {
- log_ip(amt)
+ log_ip(-amt)
game.influence = Math.max(-45, Math.min(45, game.influence - amt))
}
@@ -9201,6 +9204,7 @@ function goto_tides_of_war() {
york += tow_influence(all_york_lords)
log("Total: " + york)
+ log_br()
game.influence = Math.max(0, Math.min(45, game.influence + lanc - york))