feat: implement basic RPG mechanics with boss counter-attack

- Add Player and Boss data models (models.py)
- Implement command processing via regex matching (attack/heal/status)
- Add boss counter-attack mechanism (15 dmg per player attack)
- Add player death/respawn system (lose half gold, respawn full HP)
- Update frontend with boss HP bar, player stats panel, quick action buttons
- Add colored event log (red for attack, green for heal)
- Change port from 8000 to 8080

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
empty
2025-12-30 16:50:07 +08:00
parent 714b5824ba
commit 4c08b00832
7 changed files with 615 additions and 51 deletions

View File

@@ -16,6 +16,13 @@ class EventType(str, Enum):
TICK = "tick"
SYSTEM = "system"
ERROR = "error"
# RPG-specific events
ATTACK = "attack"
HEAL = "heal"
STATUS = "status"
BOSS_UPDATE = "boss_update"
BOSS_DEFEATED = "boss_defeated"
PLAYER_UPDATE = "player_update"
class GameEvent(BaseModel):