Skip to content

Implement boss monsters with hit points and multi-hit mechanics - #1

Merged
h1ddenpr0cess20 merged 2 commits into
mainfrom
claude/laughing-cori-4g4yj9
Oct 7, 2026
Merged

h1ddenpr0cess20 merged 2 commits into
mainfrom
claude/laughing-cori-4g4yj9

Conversation

@h1ddenpr0cess20

Copy link
Copy Markdown
Owner

This PR adds a boss monster system where certain enemies have multiple hit points and require multiple successful hits to defeat, rather than being defeated in a single blow.

Summary

Boss monsters now have hit points (hp) and can survive multiple hits from the party. They always land at least a quarter of their power in damage, hit harder on failed rolls, and have a guard cooldown between hits. The battle system now tracks hits landed and remaining HP, with the UI displaying remaining hits during multi-hit boss fights.

Key Changes

  • Boss hit points system: Bosses have an hp property and take multiple hits to defeat. Each hit reduces their HP, and they're only defeated when HP reaches 0.
  • Guard cooldown: After taking a hit, bosses enter a 1.5-second guard state where they can't be hit again, giving them a moment to recover.
  • Damage scaling for bosses:
    • Bosses always deal at least 1/4 of their power in damage (even on critical hits)
    • Failed rolls against bosses cost 4/3 more damage than against regular enemies
    • Critical hits land 2 hits instead of 1; fumbles land 0 hits
  • Battle UI updates: The loot display now shows remaining hits during multi-hit fights instead of gold, and boss-specific flavor text appears for critical and success grades.
  • Monster stat adjustments: Eggdreessen (dc 16→17, hp: 3) and Red Dragon (dc 17→18, power 12→14, hp: 4) updated as bosses.
  • Die physics: When a boss survives a hit, the die is knocked back away from the boss rather than disappearing.

Implementation Details

  • The resolveBattle() function now returns a hits property indicating how many times the boss is struck
  • A new wound() method in the actors system handles boss HP tracking and guard state
  • The defeat() call is deferred until HP reaches 0, allowing multi-hit encounters
  • Tests updated to verify boss damage floors, multi-hit mechanics, and damage scaling

https://claude.ai/code/session_01HmZbXRXiPKCrDCJSgfXwsL

A boss has hit points (Eggdreessen 3, Red Dragon 4): a critical lands two hits, a fumble none, anything else one. It survives a blow, throws the die clear and guards for a moment. Bosses always land at least a quarter of their power, hit harder on a struggle, and hit harder overall.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmZbXRXiPKCrDCJSgfXwsL
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dungeon-roller Ready Ready Preview Oct 7, 2026 7:39pm UTC

Every hero standing when a monster falls earns experience (half its gold). Levels raise max HP (healed on the spot), and as the party's average level climbs the battle roll gets a bonus (never past a natural 1 or 20). Levels show in the HUD and the battle screen. Regular monsters get higher DCs and power to match.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmZbXRXiPKCrDCJSgfXwsL
@h1ddenpr0cess20
h1ddenpr0cess20 merged commit 8afefcf into main Oct 7, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
Preview — 6ae36fb6 Deployed Oct 7, 2026 by vercel[bot]
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.

2 participants