summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-11 10:47:03 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-11 10:47:03 +0200
commit8fa6de20a81182952cdf0b149ab2adb8c08267b0 (patch)
tree5ef16740d76ad65c9344421c48f01cdb1dbfb41c
parent763dd8f797f1e9948b420a4453e768b47f21fc95 (diff)
downloadplantagenet-8fa6de20a81182952cdf0b149ab2adb8c08267b0.tar.gz
clamp influence to correct range in tides of war
-rw-r--r--rules.js2
-rw-r--r--rules.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index f90e388..da6d9e7 100644
--- a/rules.js
+++ b/rules.js
@@ -7850,7 +7850,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));
+ game.influence = Math.max(-45, Math.min(45, game.influence + lanc - york));
if (eligible_charity())
goto_we_done_deeds_of_charity();
else
diff --git a/rules.ts b/rules.ts
index ba9bda9..110a0f3 100644
--- a/rules.ts
+++ b/rules.ts
@@ -9206,7 +9206,7 @@ function goto_tides_of_war() {
log("Total: " + york)
log_br()
- game.influence = Math.max(0, Math.min(45, game.influence + lanc - york))
+ game.influence = Math.max(-45, Math.min(45, game.influence + lanc - york))
if (eligible_charity())
goto_we_done_deeds_of_charity()