spawn-profiles.ts
Purpose
Boss pressure-add profile library. A spawn profile is the timeline of pressure adds that runs alongside a boss encounter — what / how many / when / where / how often. Data only; the runtime lives in engine/enemies/boss-spawn-profile.ts. The active profile id is held on game.bossSpawnProfile; game.bossEncounterTime advances the encounter clock. See spec §3.4.
Exports
| Symbol | Kind | Notes |
|---|---|---|
SpawnPosition | type alias | Union of placement strategies. |
SpawnTrigger | discriminated union | time | recurring | phase. |
SpawnWaveDef | interface | One wave: trigger + enemy + count + position + optional affixes/abilities. |
SpawnProfileDef | interface | { id, waves[] }. |
SPAWN_PROFILES | Record<string, SpawnProfileDef> | The profile library, keyed by id. |
Types
SpawnPosition
'cardinal' | 'ring' | 'random' | 'edge_random' | 'opposite_player'.
SpawnTrigger
| Variant | Fields | Meaning |
|---|---|---|
time | at: number | Fires once at encounter time at. |
recurring | every: number, from?: number, until?: number | Fires every every seconds, starting at from (default 0), stopping at until if set. |
phase | index: number | Fires on the boss’s phase index crossing index. Phase 0 is the spawn body. |
SpawnWaveDef
trigger, enemyTypeId, count, position, optional affixIds, optional abilityIds.
SpawnProfileDef
id: string, waves: SpawnWaveDef[].
Profiles
| Id | Intent | Waves |
|---|---|---|
none | Empty timeline. No adds. | — |
light_pressure | Background harassment, small adds dribble in from arena edge. | recurring every 8s from 4s — 3× orb_common at edge_random. |
heavy_pressure | Constant gauntlet, mid adds keep arriving so player gets no clean boss window. | recurring every 12s from 2s — 5× gunner_common at cardinal. |
beacon_clearers | Anchor-clearing interrupters, fast melee that punish ignoring them. | recurring every 15s from 10s — 2× charger_common at opposite_player. |
storm | Burst panic, long quiet windows then a wall of mid adds drops. | recurring every 20s from 15s — 8× gunner_common at ring. |
crescendo | Phase-tied escalation, add count climbs as boss crosses HP thresholds. | time @0 — 2× gunner_common cardinal; phase 1 — 4× gunner_common ring; phase 2 — 6× gunner_common ring. |
Notes
crescendois the v1 user ofphasetriggers. Awakened Mech declares two HP thresholds (0.66, 0.33), producing phase indices 1 and 2 on the host (phase 0 is the spawn body), so wave triggers fire on indices 1 and 2.- All current profiles use a single enemy type per profile; mixing is supported by the schema but not exercised.
affixIdsandabilityIdsare optional pass-throughs to the spawned enemy; no profile in this file uses them yet.- Enemy ids referenced:
orb_common,gunner_common,charger_common.
EXTRACT-CANDIDATE
- Add a
spawn-profilesroll-up wiki page listing every profile with intent + cadence + enemy mix, aimed at boss authors choosing a pressure shape. - Document
SpawnPositionsemantics (cardinal vs ring vs edge_random vs opposite_player) in a shared placement-strategies page — geometry details currently only live in the runtime file. - Phase-index convention (phase 0 = spawn body; thresholds map to indices 1+) belongs in a boss-phases concept page; right now it’s only explained in a code comment on
crescendo. - An authoring guide “how to design a new spawn profile” — when to use
recurringvsphase, how to pickfrom/everyagainst typical encounter length, how to pair with boss HP thresholds.