The updateRelationships method rebuilds DOM every broadcast tick,
which reset expand/collapse state. Now tracks expanded tiers in a
Set that persists across re-renders.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update CLAUDE.md with relationship system entry points, conventions, test count
- Restore NPC info panel to 280px width with original font sizes
- Add responsive scaling to Phaser game config
- Bump CommandPanel font sizes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix stale test count (29 -> 86) and system order in CLAUDE.md
- Add new key entry points for stat system files
- Add shared build command
- Document stat conventions (3d6, modifiers, drift, wire protocol)
- Add NPC Stats section to README with stat descriptions and effects
- Add Game Constants table pointing to shared/src/constants.ts
- Update follow mode description with stats display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Math.max(3, ...) to baseline drift in socialSystem to prevent
stats drifting below minimum (was only clamping upward with Math.min)
- Make NpcInfoPanel.updateStats private (only called from updateInfo)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Positive social outcomes drift sociability and empathy up (+0.05),
negative outcomes drift temperament up (+0.02), capped at 18.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
High constitution slows hunger/energy decay, low constitution speeds it.
Uses getEffectiveStat helper which defaults to 10 for entities without
stats, preserving backward compatibility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add stats and statModifiers components to spawnNPC, and run
statModifierSystem as the first system in the GameLoop update cycle.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covers shared types, stat generation, modifier system, system
integrations (needs decay, social), serialization, and UI display.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two-tier stat system (Physical + Personality) using 3d6 generation,
transient modifiers, slow baseline drift, and integration points
for needs decay, brain, and social systems.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a method that searches outward from a center position in Manhattan
distance rings to find the nearest walkable tile within a given radius.
Returns null if no walkable tile is found. Includes 5 tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two bugs fixed:
1. NPC sprites not fully rendering: createEntitySprite is async but was
called without await from handleStateUpdate. Concurrent state updates
triggered multiple simultaneous creation calls for the same entity.
The second call composited before textures loaded, producing empty
spritesheets. Fixed with a creatingEntities guard set.
2. Interaction emojis not appearing after first use: animationend
listener was attached during removal (when animation had already
completed), so it never fired. Ghost entries in activeEmojis map
blocked future emoji creation. Fixed by self-cleaning via
animationend listener attached at creation time.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Process phase transitions per-pair instead of per-entity to avoid
double-processing (latent bug for future side effects)
- Restore independent outcome rolls per NPC (as designed)
- Let emoji CSS animation finish before removing DOM element, preventing
visual pop when server broadcast timing doesn't align with animation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9-task TDD plan covering shared types, socialSystem, brain/movement
guards, game loop wiring, state serialization, client emoji overlay,
and info panel integration.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covers awareness zone, interaction state machine, cooldowns,
brain/movement guards, broadcast format, and client emoji overlay.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Document follow mode panel feature and controls
- Add Traefik reverse proxy deployment instructions
- Add security note about vite dev vs production serving
- Update CLAUDE.md with new entry points, test count, and conventions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>