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; }