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_burst
  • cooldown: 4.0 s
  • startDelay: 2.0 s
  • params: count 8, bulletSpeed 180, bulletDamage 4, bulletRadius 6, bulletColor #ff8800, telegraphMs 700

generic_spawn_call

  • pattern: spawn_telegraph
  • cooldown: 8.0 s
  • startDelay: 4.0 s
  • params: circleCount 4, enemyTypeId orb_common, affixIds [], positions cardinal, telegraphMs 1500

pierre_telegraphed_circles

  • Owner: Junkrat Captains (boss #3) — Pierre. Spec §3.6.
  • pattern: telegraphed_circles
  • cooldown: 5.0 s
  • params: circleCount 3, circleRadius 80, circleDamage 25, telegraphMs 1500, arenaPositions random, 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_volley
  • cooldown: 2.5 s
  • params: 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_burst
  • spawn_telegraph
  • telegraphed_circles
  • aimed_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 reading ABILITY_DEFS by id.

Dependencies

  • Type-only import: AbilityDef from ../engine/abilities.

Editing notes

  • Tuning a single boss: edit only that boss’s entry (e.g., pierre_telegraphed_circles); do not retune generic_* for boss-specific changes.
  • Adding a new ability: pick {boss}_{flavor} id, ensure pattern is implemented in engine/abilities/index.ts, reference the id from the boss’s abilityIds array.

EXTRACT-CANDIDATE

  • Per-ability params schemas (bullet count/speed/damage/radius/color, telegraphMs, circle geometry, spread, positions strategy) are inline literals; a typed params discriminated union keyed on pattern would move parameter shape out of free-form Record and into the type system. Currently AbilityDef.params is unconstrained at this call site.
  • Visual styling (colors, telegraph durations) embedded in data table — candidate to lift into a shared abilityVisuals table if more abilities share palettes.
  • generic_* templates are the only reusable layer; if more sub-boss / add abilities accumulate, extract a genericAbilities.ts sibling.