Skip to content

Level 4 — Molten Nest: Magma King boss - #7

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

Level 4 — Molten Nest: Magma King boss#7
cmalpass merged 1 commit into
mainfrom
cmalpass-potential-enigma

Conversation

@cmalpass

Copy link
Copy Markdown
Owner

What

The endgame level: a short, climactic lava run ending in a pattern-based boss fight against the Magma King.

Boss (src/boss.ts)

  • Patrol inside the arena, telegraphed 3-glob magma spreads (0.75s glow + warning), and telegraphed charges (0.85s crouch, screen shake, 640 px/s) that stagger the king when he hits the arena walls (2.2s)
  • Orb mechanic: 3 crystal orbs on perches around the arena — shattering all 3 stuns the king (3.2s); shattered orbs respawn
  • Damage: stompable only while staggered/stunned (200 pts, bounces); armor clanks otherwise; side contact deals 1 hit (i-frames respected); magma globs are dodgeable
  • Defeat: 3 stomp hits → 1.6s death sequence, ember burst, onBossDefeated (fires exactly once), +1500

Level 4 "Molten Nest"

  • Lava-pit approach, walled boss arena (both walls have walk-under entry gaps), orb perches, and a nest gate that latches open only on boss defeat — the nest is unpassable until the king falls
  • 3 hidden fossils, 14 crystals, checkpoint, beetle, theme-specific palette + "THE MAGMA KING SLEEPS IN THE NEST." intro

Polish

  • Magma glob projectile type + ember particles + boss roar/orb SFX
  • HUD: boss HP bar (top-right) with 3 orb pips
  • Victory ceremony: "THE MAGMA KING FALLS!" title, molten confetti, "Magma King defeated! +1500" results line
  • Menu: 5th level card "MOLTEN NEST — The Magma King's arena"

Validation

  • typecheck ✓ · 174/174 tests (10 files; +14 boss, +8 LEVEL_4 integrity, +2 integration) ✓ · build 124 kB / 38 kB gzip ✓ · lint ✓
  • Headless E2E: menu (5 cards) → Molten Nest → boss patrol → defeat (gate latches, status "THE MAGMA KING FALLS!") → victory ceremony; zero page errors; screenshots verified
  • CI note: GitHub CI fails on this repo for pre-existing unrelated reasons; local validation is the merge gate.

Part of the Batch B "Endgame" plan (boss → power-ups → adaptive music).

- src/boss.ts: MagmaKing state machine — arena patrol, telegraphed
  3-glob magma spreads, telegraphed charge that staggers at the arena
  walls, and a 3-crystal-orb stun mechanic; stompable only while
  staggered/stunned, three hits defeat him.
- Level 4 "Molten Nest" in level-data.ts: lava-pit approach, walled
  boss arena with orb perches (both walls have walk-under gaps), and a
  nest gate that latches open on defeat.
- Magma glob projectiles, ember particles, boss roar + orb SFX.
- HUD: boss HP bar with orb pips; victory ceremony gains a
  "THE MAGMA KING FALLS!" title, molten confetti, and a Magma King
  results line; menu gains the fifth level card.
- Tests: boss state-machine suite, LEVEL_4 integrity checks, Game
  integration (defeat -> gate latch -> victory); 174 passing,
  typecheck/build/lint clean, headless E2E verified (zero page errors).
@cmalpass
cmalpass merged commit 496ca03 into main Aug 26, 2026
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