ship-progression.ts

Cocytus — Purpose

Ship progression v4 — star-tier-from-XP curve plus mod-backpack grid sizing. XP is the count of duplicate hull pulls (each duplicate = 1 XP). Stars unlock mod-grid space only; per-star hull stats are not scaled.

Phlegethon — Exports

SymbolKindSignature / Value
STAR_XP_THRESHOLDSconst number[][0, 0, 1, 3, 7, 17]
GRID_DIMS_BY_STARReadonlyArray<readonly [number, number]>rows of (cols, rows) per star
starFromXp(xp)(xp: number) => numberreturns star 1-5; throws on negative xp
xpToNextStar(xp)(xp: number) => numberXP delta to next star; 0 at ★5
gridForStar(star)(star: number) => readonly [number, number]throws if star < 1 or > 5

Lethe — XP Thresholds (cumulative duplicates)

StarXP thresholdTotal pulls to reach
★101 (first pull)
★212
★334
★478
★51718

Index 0 of STAR_XP_THRESHOLDS is unused (set to 0).

Acheron — Grid Dimensions

Starcols × rowscells
★13 × 39
★24 × 312
★34 × 416
★45 × 420
★55 × 525

Index 0 of GRID_DIMS_BY_STAR is unused (set to [0, 0]).

Styx — Behavior Notes

  • starFromXp cascade: highest threshold checked first; falls through to ★1 as the floor at xp >= 0.
  • starFromXp throws Error on negative xp.
  • xpToNextStar returns 0 once starFromXp(xp) >= 5 (capped, no overflow).
  • gridForStar throws Error for star < 1 or star > 5. Does not accept 0 as the unused slot.
  • Comment on line 11 claims “★5 reached at xp >= 17 per the v4 plan curve” — matches STAR_XP_THRESHOLDS[5] = 17. Docstring on line 5 states “★5 needs 37 cumulative dupes (38 total pulls)” — stale, contradicts the 17 in the array.

Tartarus — Drift / Risks

  • Docstring (line 5) says ★5 = 38 pulls; code says 18 pulls. The data is the source of truth; docstring is stale.
  • STAR_XP_THRESHOLDS[0] = 0 and STAR_XP_THRESHOLDS[1] = 0 both equal 0 — ★1 unlocks at 0 XP (first pull) by design.
  • No bounds check that xp is an integer; floats would silently work but may produce unexpected xpToNextStar deltas.

EXTRACT-CANDIDATE

  • Star tier curve (STAR_XP_THRESHOLDS) — load-bearing collection-progression knob; belongs in a metagame/star-progression concept page.
  • Mod grid sizing (GRID_DIMS_BY_STAR) — load-bearing for mod-backpack UI and inventory; belongs in a mod-backpack concept page alongside grid rendering and slot-cell logic.
  • Duplicate-pull → XP mapping — the “1 dupe = 1 XP” rule is metagame-economy load-bearing; belongs in a collection/dupe-economy concept page.