mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 16:42:41 +00:00
dnd_zone_run table (run_id, zone_id, room_seq_json, rooms_cleared, boss_defeated, abandoned, loot_collected, gm_mood, started_at, last_action_at, completed_at) added to db.go schema with active-run index. dnd_zone_run.go ships RoomType (entry|exploration|trap|elite|boss), DungeonRun struct, generateRoomSequence (Entry → ExplorationxN1 → Trap → ExplorationxN2 → Elite → Boss within zone's [MinRooms, MaxRooms]), and persistence helpers: startZoneRun (gates on level tier + active-run exclusivity), getActiveZoneRun, getZoneRun, markRoomCleared (advances and auto-completes on boss kill), abandonZoneRun, adjustGMMood (clamped to [0,100]), addLoot. 8 new tests covering room-sequence shape (entry first, boss last, exactly one trap/elite, ≥2 explorations), happy-path start, concurrent-run rejection, unknown-zone rejection, full advance-to-boss flow with completion, abandon idempotency, GM mood clamping at both bounds, and loot accumulation order. Full repo test suite green. Boss-room behavior, !zone command surface, and TwinBee narration arrive in D1c/D1d. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6.1 KiB
6.1 KiB