Skip to content

Add Rex skins: cosmetic unlocks with a fossil-gated Mint - #6

Merged
cmalpass merged 1 commit into
mainfrom
cmalpass-potential-enigma
Aug 26, 2026
Merged

Add Rex skins: cosmetic unlocks with a fossil-gated Mint#6
cmalpass merged 1 commit into
mainfrom
cmalpass-potential-enigma

Conversation

@cmalpass

Copy link
Copy Markdown
Owner

What

Cosmetic skin system for Rex, giving the fossil hunt a payoff:

  • 4 skins — Classic, Ember, Glacier, Mint — via a SKINS palette table in sprite.ts; drawRex is now palette-driven (the Konami rainbow still overrides everything).
  • Mint is the fossil reward: locked until 3 hidden fossils are unearthed, with a toast + star jingle the moment it unlocks.
  • Menu skin picker: four tappable swatches with mini Rex heads, a gold selection ring, a padlock + "3 fossils to unlock Mint" hint. [ / ] cycle on the menu (locked skins skipped, wraps around).
  • Persistence: tinyrex_skin, validated on both read and write (corrupt/unknown values fall back to Classic).
  • Everywhere Rex appears: player in-run, ghost replay, and the victory-ceremony Rex all wear the selected skin. Controls panel lists the new keys.

Validation (local — CI is failing for pre-existing unrelated reasons)

  • npm run typecheck
  • npm test150/150 (137 baseline + 13 new: skin table, getSkin fallback, unlock gating, drawRex per skin + rainbow, store round-trip/invalid, menu selection/cycling, locked rejection, in-game + ghost propagation, unlock toast, skin keys ignored in play) ✓
  • npm run build — 112.15 kB / 34.87 kB gzip ✓
  • npm run lint
  • Headless Chrome E2E (17/17 checks, zero page errors): fresh profile → Classic; Ember select + persist; bracket cycling skips locked Mint and wraps; reload persistence; 3-fossil unlock → Mint selectable; player wears Mint in-run; skin keys ignored while playing. Screenshots verified (menu picker locked/unlocked + in-game Mint).

Batch A — 4/4 (daily, ghost, fossils, skins). Up next: Batch B (Magma King boss level, power-up drops, adaptive soundtrack).

- SKINS palette table in sprite.ts (Classic, Ember, Glacier, Mint) with
  drawRex driven by the selected skin; rainbow cheat still overrides
- Mint is locked until 3 hidden fossils are unearthed, with a menu
  toast + jingle the moment it unlocks
- Menu skin picker: 4 tappable swatches with mini Rex heads, gold
  selection ring, padlock + hint for the locked skin; [ / ] cycle keys
- Selection persists via tinyrex_skin (validated on read and write)
- Player and ghost replay both wear the selected skin; the victory
  ceremony Rex uses it too; controls panel lists the new key
- 13 new tests (skin table, persistence, selection/cycling, in-game
  propagation, unlock toast) — 150 passing; E2E verified in a real
  browser with screenshots
@cmalpass
cmalpass merged commit a51833a into main Aug 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant