From ad7c30e44c09417da58448659da2ef73917214fe Mon Sep 17 00:00:00 2001 From: FloPinguin <25036848+FloPinguin@users.noreply.github.com> Date: Thu, 1 Jan 2026 22:31:54 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20nation=20warship=20edge-case=20issue=20?= =?UTF-8?q?=E2=9B=B4=EF=B8=8F=20(#2760)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description: On the world map, if two teams of nations are fighting each other (left side vs. right side), there is a possibility that an extreme warship battle involving nearly 200 warships could occur. This PR helps resolve that edge-case issue a bit. Screenshot 2025-12-31 155924 ## Please complete the following: - [X] I have added screenshots for all UI updates - [X] I process any text displayed to the user through translateText() and I've added it to the en.json file - [X] I have added relevant tests to the test directory - [X] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: FloPinguin --- src/core/execution/nation/NationWarshipBehavior.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/execution/nation/NationWarshipBehavior.ts b/src/core/execution/nation/NationWarshipBehavior.ts index ef7425ffb..98e82912e 100644 --- a/src/core/execution/nation/NationWarshipBehavior.ts +++ b/src/core/execution/nation/NationWarshipBehavior.ts @@ -75,6 +75,11 @@ export class NationWarshipBehavior { } private maybeRetaliateWithWarship(tile: TileRef, enemy: Player): void { + // Don't send too many warships + if (this.player.units(UnitType.Warship).length >= 10) { + return; + } + const { difficulty } = this.game.config().gameConfig(); // In Easy never retaliate. In Medium retaliate with 15% chance. Hard with 50%, Impossible with 80%. if (