From df2bb36aae12a2782ded70966061e8a80b1f4afc Mon Sep 17 00:00:00 2001 From: Evan Date: Thu, 6 Mar 2025 16:14:13 -0800 Subject: [PATCH] cap warship cost at 1 million --- src/core/configuration/DefaultConfig.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index f64628d29..20ffc0300 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -145,8 +145,11 @@ export class DefaultConfig implements Config { cost: (p: Player) => p.type() == PlayerType.Human && this.infiniteGold() ? 0 - : (p.unitsIncludingConstruction(UnitType.Warship).length + 1) * - 250_000, + : Math.min( + 1_000_000, + (p.unitsIncludingConstruction(UnitType.Warship).length + 1) * + 250_000, + ), territoryBound: false, maxHealth: 1000, };