data/abilities.ts
Purpose
Reusable ability templates keyed by string id, referenced by boss roster entries through BossRosterEntry.abilityIds. Each entry conforms to AbilityDef (imported from ../engine/abilities) and is consumed at runtime via engine/abilities/index.ts. Spec anchor: docs/superpowers/specs/2026-04-25-bosses-as-enemies-design.md §3.1.
Exports
ABILITY_DEFS: Record<string, AbilityDef>— single named export, keyed by ability id.
Naming convention
{boss}_{flavor} per entry; per-boss tuning is isolated so one boss’s instance does not affect another’s. Generic templates use generic_ prefix for reuse by non-boss enemies (sub-bosses, adds).
Entries
generic_minor_radial
pattern:radial_burstcooldown: 4.0 sstartDelay: 2.0 sparams: count 8, bulletSpeed 180, bulletDamage 4, bulletRadius 6, bulletColor#ff8800, telegraphMs 700
generic_spawn_call
pattern:spawn_telegraphcooldown: 8.0 sstartDelay: 4.0 sparams: circleCount 4, enemyTypeIdorb_common, affixIds[], positionscardinal, telegraphMs 1500
pierre_telegraphed_circles
- Owner: Junkrat Captains (boss #3) — Pierre. Spec §3.6.
pattern:telegraphed_circlescooldown: 5.0 sparams: circleCount 3, circleRadius 80, circleDamage 25, telegraphMs 1500, arenaPositionsrandom, bulletColor#cc5522- Visual note in source: rust-orange fill, ember-yellow pulse last 0.5 s, oil-black smoke on detonate; 1.5 s windup.
marco_aimed_volley
- Owner: Junkrat Captains (boss #3) — Marco.
pattern:aimed_volleycooldown: 2.5 sparams: count 5, spread 25, bulletSpeed 220, bulletDamage 8, bulletRadius 5, bulletColor#ff4422, telegraphMs 800- Comment characterizes it as aimed mortar volleys, shorter cooldown, ember-red bullets.
Patterns referenced
radial_burstspawn_telegraphtelegraphed_circlesaimed_volley
Resolution / behavior for each pattern lives in engine/abilities/index.ts (not in this file).
Consumers
- Boss roster entries (
BossRosterEntry.abilityIds) — see boss data files. engine/abilities/index.ts— runtime dispatcher readingABILITY_DEFSby id.
Dependencies
- Type-only import:
AbilityDeffrom../engine/abilities.
Editing notes
- Tuning a single boss: edit only that boss’s entry (e.g.,
pierre_telegraphed_circles); do not retunegeneric_*for boss-specific changes. - Adding a new ability: pick
{boss}_{flavor}id, ensure pattern is implemented inengine/abilities/index.ts, reference the id from the boss’sabilityIdsarray.
EXTRACT-CANDIDATE
- Per-ability
paramsschemas (bullet count/speed/damage/radius/color, telegraphMs, circle geometry, spread, positions strategy) are inline literals; a typedparamsdiscriminated union keyed onpatternwould move parameter shape out of free-formRecordand into the type system. CurrentlyAbilityDef.paramsis unconstrained at this call site. - Visual styling (colors, telegraph durations) embedded in data table — candidate to lift into a shared
abilityVisualstable if more abilities share palettes. generic_*templates are the only reusable layer; if more sub-boss / add abilities accumulate, extract agenericAbilities.tssibling.