Skip to content

Commit 938eb02

Browse files
committed
Fix: Limit the number of warships sent for retaliation to prevent excessive deployment
1 parent 9d5f167 commit 938eb02

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/core/execution/nation/NationWarshipBehavior.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ export class NationWarshipBehavior {
7575
}
7676

7777
private maybeRetaliateWithWarship(tile: TileRef, enemy: Player): void {
78+
// Don't send too many warships
79+
if (this.player.units(UnitType.Warship).length >= 10) {
80+
return;
81+
}
82+
7883
const { difficulty } = this.game.config().gameConfig();
7984
// In Easy never retaliate. In Medium retaliate with 15% chance. Hard with 50%, Impossible with 80%.
8085
if (

0 commit comments

Comments
 (0)