mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 00:52:40 +00:00
Adv 2.0 D&D polish: GM→DM rename, streamed zone combat, end-to-end scenario test
GM→DM rename across docs and code (GMNarrationType→DMNarrationType, GMState→DMState, narration constants, comments) so the system reads as "Dungeon Master" everywhere. Player-visible "GM mood" wording stays where it appears in flavor. Streamed zone/expedition combat: zone advance now stages patrol → patrol play-by-play → patrol resolution → room intro → room play-by-play → final outcome through sendZoneCombatMessages with 2–3s pacing (arena keeps its 5–8s window). Combat narrative lines pick up a compact d20-vs-AC roll annotation for hit/crit/miss/block events. Combat outcome polish: dndHPSnapshot lets narration show sheet HP rather than legacy combat-engine HP, and markAdventureDead clears the zombie state where hp_current was 0 but the legacy alive flag stayed true after a D&D-layer KO. Adv 2.0 announcement (ADVENTURE_2.0_ANNOUNCEMENT.md), README rewrite covering the new layer, and adv2_scenario_test.go — a full zone-run + expedition + harvest playthrough against a copy of the prod DB asserting persisted state end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -83,8 +83,8 @@ func TestStartZoneRun_HappyPath(t *testing.T) {
|
||||
if run.CurrentRoom != 0 {
|
||||
t.Errorf("current room = %d", run.CurrentRoom)
|
||||
}
|
||||
if run.GMMood != 50 {
|
||||
t.Errorf("gm mood = %d", run.GMMood)
|
||||
if run.DMMood != 50 {
|
||||
t.Errorf("gm mood = %d", run.DMMood)
|
||||
}
|
||||
if !run.IsActive() {
|
||||
t.Error("expected run active")
|
||||
@@ -201,15 +201,15 @@ func TestAdjustGMMoodClampsBounds(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
r, _ := getZoneRun(run.RunID)
|
||||
if r.GMMood != 100 {
|
||||
t.Errorf("upper clamp: mood = %d", r.GMMood)
|
||||
if r.DMMood != 100 {
|
||||
t.Errorf("upper clamp: mood = %d", r.DMMood)
|
||||
}
|
||||
if err := adjustGMMood(run.RunID, -250); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
r, _ = getZoneRun(run.RunID)
|
||||
if r.GMMood != 0 {
|
||||
t.Errorf("lower clamp: mood = %d", r.GMMood)
|
||||
if r.DMMood != 0 {
|
||||
t.Errorf("lower clamp: mood = %d", r.DMMood)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user