feat(engine): persistenza enigmi, inventario strutturato, HP mostri
test / test (push) Has been cancelled

Fase 2 del remediation plan:
- set_puzzle_state / is_puzzle_solved per enigmi area
- update_inventory su character_items con add/remove/equip/list
- combat() legge HP da combat_state e persiste danno
- dm_cycle inietta campaign_id nei tool che ne hanno bisogno
- helpers db: dedup inventario, remove/equip per nome

Fase 4 del remediation plan:
- test integrazione dm_cycle con LLM mockato (5 test)
- test WebSocket handler con mock (4 test)
- CI minimo .gitea/workflows/test.yml
This commit is contained in:
truetype committed 2026-06-27 18:29:32 +02:00
1 parent cb45172717
commit 6b048dc0cc
7 files changed
+386 -18

No files matched your search

+4
View File
@@ -39,6 +39,10 @@ def dm_cycle(campaign_id: int, player_action: str) -> dict:
tool_name, tool_params, narration = _llm_decision(ctx, player_action, current_area_id=ctx.current_area_id)
# Inietta campaign_id per strumenti che necessitano persistenza
if tool_name == "combat":
tool_params.setdefault("campaign_id", campaign_id)
result = tools.run(tool_name, **tool_params)
mechanic_msg = result.get("message", "")