From afdb04ae5d072c52a86d40fd013f105e8ee85329 Mon Sep 17 00:00:00 2001 From: FloPinguin <25036848+FloPinguin@users.noreply.github.com> Date: Tue, 17 Mar 2026 23:56:52 +0100 Subject: [PATCH] =?UTF-8?q?Increase=20spawn=20immunity=20from=2030s=20to?= =?UTF-8?q?=2045s=20for=205M=20starting=20gold=20maps=20=F0=9F=9B=A1?= =?UTF-8?q?=EF=B8=8F=20(#3457)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description: Increases the spawn immunity duration from 30s to 45s for maps with 5M starting gold. The previous 30s was too short - 45s gives players 15s longer than it takes to build a SAM, allowing them to establish basic defenses before becoming vulnerable. ## 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/configuration/DefaultConfig.ts | 7 ++++++- src/server/MapPlaylist.ts | 7 ++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index c77e886ac..85d3b661f 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -136,6 +136,9 @@ export abstract class DefaultServerConfig implements ServerConfig { } } +/** SAM launcher construction duration in ticks (non-instant-build). */ +export const SAM_CONSTRUCTION_TICKS = 30 * 10; + export class DefaultConfig implements Config { private pastelTheme: PastelTheme = new PastelTheme(); private pastelThemeDark: PastelThemeDark = new PastelThemeDark(); @@ -430,7 +433,9 @@ export class DefaultConfig implements Config { Math.min(3_000_000, (numUnits + 1) * 1_500_000), UnitType.SAMLauncher, ), - constructionDuration: this.instantBuild() ? 0 : 30 * 10, + constructionDuration: this.instantBuild() + ? 0 + : SAM_CONSTRUCTION_TICKS, upgradable: true, }; break; diff --git a/src/server/MapPlaylist.ts b/src/server/MapPlaylist.ts index 3959fe68a..5dd7dbaa7 100644 --- a/src/server/MapPlaylist.ts +++ b/src/server/MapPlaylist.ts @@ -1,3 +1,4 @@ +import { SAM_CONSTRUCTION_TICKS } from "../core/configuration/DefaultConfig"; import { Difficulty, Duos, @@ -606,8 +607,8 @@ export class MapPlaylist { /** * Centralised spawn-immunity duration logic. * - HumansVsNations: always 5s (nations can't benefit from longer PVP immunity) - * - 25M starting gold: 2:30 (extra time to compensate for high gold) - * - 5M starting gold: 30s + * - 25M starting gold: 2:30min (extra time to compensate for high gold) + * - 5M starting gold: SAM build time + 15s (enough to build a SAM) * - Default: 5s */ private getSpawnImmunityDuration( @@ -617,7 +618,7 @@ export class MapPlaylist { if (playerTeams === HumansVsNations) return 5 * 10; if (startingGold !== undefined && startingGold >= 25_000_000) return 150 * 10; - if (startingGold) return 30 * 10; + if (startingGold) return SAM_CONSTRUCTION_TICKS + 15 * 10; return 5 * 10; }