From 87678b7969d48f8a4ded348fa2e4da7bd509b10e Mon Sep 17 00:00:00 2001 From: evanpelle Date: Wed, 16 Jul 2025 20:24:01 -0700 Subject: [PATCH] Increase trade ship spawn rate (#1455) ## Description: During play testing not enough trade ships were spawning in the mid-late game. This increases their spawn rate and max number of ships. ## 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 - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: evan --- src/core/configuration/DefaultConfig.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index 558280880..77f739bf4 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -356,17 +356,14 @@ export class DefaultConfig implements Config { // Chance to spawn a trade ship in one second, tradeShipSpawnRate(numTradeShips: number): number { - if (numTradeShips <= 20) { + if (numTradeShips < 20) { return 5; } - if (numTradeShips > this.tradeShipCap()) { - return 1_000_000; + if (numTradeShips <= 150) { + const additional = numTradeShips - 20; + return Math.pow(additional, 0.8) + 5; } - return numTradeShips - 15; - } - - tradeShipCap(): number { - return 100; + return 1_000_000; } unitInfo(type: UnitType): UnitInfo {