Skip to content

feat: color-coded combat text with hit type labels#343

Merged
mokn merged 5 commits intodevfrom
feat/creature-studio
Apr 9, 2026
Merged

feat: color-coded combat text with hit type labels#343
mokn merged 5 commits intodevfrom
feat/creature-studio

Conversation

@mokn
Copy link
Copy Markdown
Collaborator

@mokn mokn commented Apr 9, 2026

Summary

  • Player damage stays red, enemy damage renders in white/gray — instant visual distinction of who hit whom
  • New floating text labels: BLOCKED (teal), DODGED (gray), CRIT (amber for enemies)
  • 4 new DamageTypes: enemyDamage, enemyCrit, blocked, dodged
  • 12 tests covering all combat outcome paths

Test plan

  • Fight a monster on beta — verify player damage is red, counterattack damage is white
  • Equip a shield/high-DEF gear and verify BLOCKED X appears in teal when blocking
  • Confirm crits still show CRIT label (red for player, amber for enemy)
  • Verify MISS and DODGED show correctly for misses/spell dodges

🤖 Generated with Claude Code

mokn and others added 5 commits April 9, 2026 08:08
Deploy UniRig+Blender animated spider GLB (7 clips: idle, walk, attack,
hit, death, block, dodge) to client. Replaces static canvas draw with
makeGLBDrawFn wrapper — canvas art remains as loading fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
GLB lighting boosted (key 2.2, fill 0.6, ambient 0.4), toon gradient
shadows lifted, ASCII renderer gamma/ambient/brightness cranked up.
Cave background doubled: 8-13 stalactites, 6-10 stalagmites, thicker
walls/ceiling/floor, boulder clusters, more interior scatter.
Creature lab: fix animation seek order, update dire rat GLB.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…e ASCII effect

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Both useBattleSceneSignals and useFloatingDamageSignals had a reset bug:
their processedCountRef was reset to 0 every time visibleOutcomes changed,
including when useCombatPacing revealed the counterattack after 600ms.
This caused the player attack to be replayed alongside the counterattack,
making it look like both sides attack simultaneously.

Fix: track signaled outcomes by unique key (encounterId + turn +
attackNumber + attackerId) instead of by array index. When the
counterattack is revealed and visibleOutcomes grows, already-signaled
outcomes are skipped.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Player damage renders in red, enemy damage in white/gray, blocks in
teal, crits in orange, dodges in gray. Floating damage numbers now
clearly distinguish who is hitting whom at a glance.

New DamageTypes: enemyDamage, enemyCrit, blocked, dodged.
Existing player damage types (damage, crit, double, critDouble) unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

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

Project Deployment Actions Updated (UTC)
blog Building Building Preview, Comment Apr 9, 2026 7:40pm
ud Building Building Preview, Comment Apr 9, 2026 7:40pm
ud-api Building Building Preview, Comment Apr 9, 2026 7:40pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ud-api-beta Ignored Ignored Preview Apr 9, 2026 7:40pm

Request Review

@mokn mokn merged commit 83267cc into dev Apr 9, 2026
4 of 8 checks passed
@mokn mokn deleted the feat/creature-studio branch April 9, 2026 19:39
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