PURPOSE
Maps boss and boss-roster enemy typeId strings to their exact ships-v4 hull filename stems so the shared sprite atlas can bake each boss with its faction-specific artwork instead of the generic red enemy silhouette. Covers bosses #1 through #8 plus their supporting anchor units across the Backwater, Junkrats, Industria, Solaris, and Prism factions.
OWNS
- The
BOSS_TYPE_TO_HULLrecord — the single source of truth pairing each boss-rostertypeId(snake_case) to aships-v4hull name (exact filename stem with spaces and case preserved per theships-v4-loadercontract). - Entries for four faction groupings: Backwater (Killer Croc + Caiman variants), Junkrats (Stinger, Orca, Pierre, Marco), Industria (Loader, Drillbot, Bigbot, Digbot), Solaris (Hauler, Valet, Oracle), and Prism (Citrine, Ruby, Jade, Pearl).
READS FROM
Nothing. This module is a static data table — pure constants, no imports.
PUSHES TO
engine/bridge.ts— importsBOSS_TYPE_TO_HULLfor two purposes: iterating all entries inside_bakeAllBossSpritesto populate the atlas region for each bosstypeId, and checking individual enemyshapeKeyvalues during the visible-enemy loop to decide when to re-bake sprites that haven’t been patched yet.
DOES NOT
- Resolve hull names to actual image data — that is the
ships-v4-loader/getShipV4responsibility. - Apply per-rarity outline color treatment — bosses use one atlas region per
typeIdfor every rarity bucket, unlike base archetypes. - Enumerate non-boss enemies — only boss-roster types appear here.
- Register types with the enemy data system — that is
data/enemies/index.ts(BOSS_ENEMY_TYPES), which must be updated alongside this map when adding new boss-roster types.
Signals
None. The module exports a frozen-shape constant only; no events, no observers, no callbacks.
Entry points
BOSS_TYPE_TO_HULL— exportedRecord<string, string>consumed byengine/bridge.ts. Lookups use the enemytypeId/shapeKeyas the key and return theships-v4hull filename stem.
Pattern notes
- Hull names preserve spaces and case exactly (for example
'Backwater_Killer Croc') becauseships-v4-loadermatches the underlying asset filenames literally. - Keys are conventional snake_case
typeIdstrings that match the IDs used by the enemy/boss-roster data layer. - Entries are grouped by faction with block comments naming the boss(es) each cluster supports — Backwater (boss #1), Junkrats (bosses #2 and #3), Industria (bosses #4 and #5), Solaris (bosses #6 and #7), Prism (boss #8).
- A header comment requires updating both this map and
data/enemies/index.ts’sBOSS_ENEMY_TYPEStogether when introducing new boss-roster types — the two structures are coupled. - The map size is intentionally small (~17 entries) so
Object.entriesiteration inside the render hot path remains cheap, as noted by the caller inbridge.ts. - Bosses + their anchor/supporting units share this table so faction units that accompany a boss encounter render with the same
ships-v4art treatment as the boss itself.