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

SymbolKindNotes
SpawnPositiontype aliasUnion of placement strategies.
SpawnTriggerdiscriminated uniontime | recurring | phase.
SpawnWaveDefinterfaceOne wave: trigger + enemy + count + position + optional affixes/abilities.
SpawnProfileDefinterface{ id, waves[] }.
SPAWN_PROFILESRecord<string, SpawnProfileDef>The profile library, keyed by id.

Types

SpawnPosition

'cardinal' | 'ring' | 'random' | 'edge_random' | 'opposite_player'.

SpawnTrigger

VariantFieldsMeaning
timeat: numberFires once at encounter time at.
recurringevery: number, from?: number, until?: numberFires every every seconds, starting at from (default 0), stopping at until if set.
phaseindex: numberFires 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

IdIntentWaves
noneEmpty timeline. No adds.
light_pressureBackground harassment, small adds dribble in from arena edge.recurring every 8s from 4s — 3× orb_common at edge_random.
heavy_pressureConstant gauntlet, mid adds keep arriving so player gets no clean boss window.recurring every 12s from 2s — 5× gunner_common at cardinal.
beacon_clearersAnchor-clearing interrupters, fast melee that punish ignoring them.recurring every 15s from 10s — 2× charger_common at opposite_player.
stormBurst panic, long quiet windows then a wall of mid adds drops.recurring every 20s from 15s — 8× gunner_common at ring.
crescendoPhase-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

  • crescendo is the v1 user of phase triggers. 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.
  • affixIds and abilityIds are 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-profiles roll-up wiki page listing every profile with intent + cadence + enemy mix, aimed at boss authors choosing a pressure shape.
  • Document SpawnPosition semantics (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 recurring vs phase, how to pick from/every against typical encounter length, how to pair with boss HP thresholds.