summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-09 22:31:11 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-09 22:31:11 +0200
commitd21be0f5a699cbe0f754b753178d49d43c4b03c6 (patch)
tree4f9650494d57bc69b790872cf08ebeeb712767d1
parent422c7760adfee46d3a6c3be9dba7347a5ab0e12e (diff)
downloadplantagenet-d21be0f5a699cbe0f754b753178d49d43c4b03c6.tar.gz
Tides of War apply net total before clamping.
-rw-r--r--rules.js3
-rw-r--r--rules.ts4
2 files changed, 3 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index cf060b2..b66c003 100644
--- a/rules.js
+++ b/rules.js
@@ -7821,7 +7821,6 @@ function goto_tides_of_war() {
}
if (set_has(INFLUENCE_TURNS, current_turn()))
lanc += tow_influence(all_lancaster_lords);
- increase_lancaster_influence(lanc);
log("Total: " + lanc);
log_h3("York");
york += tow_presence("Lord in North", all_york_lords, is_lord_in_north);
@@ -7846,8 +7845,8 @@ function goto_tides_of_war() {
york += tow(1, "C" + AOW_YORK_FIRST_SON);
if (set_has(INFLUENCE_TURNS, current_turn()))
york += tow_influence(all_york_lords);
- increase_york_influence(york);
log("Total: " + york);
+ game.influence = Math.max(0, 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 7ea5168..27ef448 100644
--- a/rules.ts
+++ b/rules.ts
@@ -9168,7 +9168,6 @@ function goto_tides_of_war() {
if (set_has(INFLUENCE_TURNS, current_turn()))
lanc += tow_influence(all_lancaster_lords)
- increase_lancaster_influence(lanc)
log("Total: " + lanc)
log_h3("York")
@@ -9201,9 +9200,10 @@ function goto_tides_of_war() {
if (set_has(INFLUENCE_TURNS, current_turn()))
york += tow_influence(all_york_lords)
- increase_york_influence(york)
log("Total: " + york)
+ game.influence = Math.max(0, Math.min(45, game.influence + lanc - york))
+
if (eligible_charity())
goto_we_done_deeds_of_charity()
else