feat(dungeon): boss-fight HUD bar - #32
Merged
Merged
Conversation
Top strip: themed (darkened boss color) bar holding door + "Floor N/5 · domain" left and icon-only SFX/BGM right; boss name moves below. New bossHud composer + pure darken/formatRunLabel seams; domainShort added to boss config. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
6 tasks: darken+formatRunLabel helpers (TDD), domainShort on bosses, audio iconOnly option, mountMenuButton position, mountBossHud composer, BossFightScene wiring + manual verify. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
From /pr-review-toolkit:review-pr: - domainShort is now a DomainShort union (closed set of 5) — typos become compile errors instead of silent bad labels. - HUD's campaign subset is Pick<Campaign,'floorsCleared'|'bossOrder'> via a type-only import (de-duped, drift-protected) instead of an inline literal. - Named BAR_BORDER_DARKEN constant for the border factor. - Fixed stale "top-left" doc on mountMenuButton (HUD repositions it); clarified iconOnly re-anchors layout; dropped the rot-prone "y 0–44" literal comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
silver-snoopy
force-pushed
the
feat/boss-hud
branch
from
May 30, 2026 21:55
ae8a47b to
3fc850d
Compare
…ants - Boss name moves off the scene body into the HUD bar (amber, centered between the run label and audio cluster); the old top-center banner floated on the brick wall and clipped the question scroll. - Hero/boss clusters (sprite + HP + name/taunt) shifted outward (x 120/840 → 85/875) for breathing room around the central scroll; taunt wrap trimmed so it stays on-canvas at the new position. - Boss scaled up (4 → 6) for presence and grounded on the hero's floor line, so it looms ~2× the hero instead of reading as the same size. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Gathers the loose top of the boss fight into a single themed HUD bar: back-to-menu door +
Floor N/M · <domain>on the left, icon-only SFX/BGM on the right, and the boss name moved just below it.Design · Plan.
How
src/ui/bossHud.ts— pure, unit-testeddarken(color, factor)+formatRunLabel(campaign, domainShort), and a composermountBossHud(scene, {boss, campaign, onExit, onBgmToggle})that draws the bar (darkenedenvironmentColor+ subtle border) and reusesmountMenuButton(door) +mountAudioToggles(icon-only).src/ui/audioToggles.ts— newiconOnly+yoptions; the Hub keeps its labeled toggles (passes noiconOnly), so mute/persistence behavior is byte-for-byte unchanged.src/ui/inFightNav.ts—mountMenuButtongained an optional position.src/types.ts+src/config.ts—domainShorton each boss (Agentic/Claude Code/Prompting/MCP/Context).src/scenes/BossFightScene.ts— onemountBossHud(...)call replaces the two separate mounts; boss name y 30 → 66.Floor =
floorsCleared+1 / bossOrder.length; isolated/debug fights (no campaign) gracefully show just the domain.Tests / checks
npx vitest run→ 127 passing (incl. 7 new:darken,formatRunLabelwith/without campaign, and adomainShort-on-every-boss guard).tsc --noEmitclean ·npm run buildclean · rootnpm run lint(Biome) clean.Manual verification (interactive — not automatable in CI)
At
localhost:5173in a real run, enter a boss fight and confirm:Floor 1/5 · <domain>left, icon-only 🔊/🎵 right?demoshows the bar; a debug-isolated boss shows just the domain (no "Floor"), no crashBAR_DARKENif too dark)🤖 Generated with Claude Code