mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 00:52:40 +00:00
Adv 2.0 D&D Phase 11 D8: mood-banded TwinBee aside
Adds a TwinBee aside on room entry when GM mood sits at the extreme bands (≤19 hostile, ≥80 effusive). Mid-bands stay silent — the aside is strictly extra flavor, never replacing core narration. Two new pools (MoodAsidesHostile, MoodAsidesEffusive) live alongside the existing TwinBee voice in twinbee_gm_flavor.go. Wired into zoneCmdEnter and zoneCmdAdvance; the advance path reloads the run so post-combat nat20/nat1 deltas are reflected before band lookup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -198,6 +198,10 @@ func (p *AdventurePlugin) zoneCmdEnter(ctx MessageContext, c *DnDCharacter, rest
|
||||
b.WriteString(line)
|
||||
b.WriteString("\n\n")
|
||||
}
|
||||
if aside := moodAsideLine(run.GMMood, run.RunID, run.CurrentRoom); aside != "" {
|
||||
b.WriteString(aside)
|
||||
b.WriteString("\n\n")
|
||||
}
|
||||
b.WriteString(fmt.Sprintf("**Room 1/%d — %s.** Use `!zone advance` to proceed, `!zone map` for layout.",
|
||||
run.TotalRooms, prettyRoomType(run.CurrentRoomType())))
|
||||
return p.SendDM(ctx.Sender, b.String())
|
||||
@@ -367,6 +371,16 @@ func (p *AdventurePlugin) zoneCmdAdvance(ctx MessageContext) error {
|
||||
b.WriteString("\n\n")
|
||||
}
|
||||
}
|
||||
// Reload mood — combat-event nat20/nat1 deltas have been persisted via
|
||||
// scanMoodEventsFromCombat but not reflected on the in-memory run.
|
||||
freshMood := run.GMMood
|
||||
if fresh, _ := getZoneRun(run.RunID); fresh != nil {
|
||||
freshMood = fresh.GMMood
|
||||
}
|
||||
if aside := moodAsideLine(freshMood, run.RunID, nextIdx); aside != "" {
|
||||
b.WriteString(aside)
|
||||
b.WriteString("\n\n")
|
||||
}
|
||||
b.WriteString(fmt.Sprintf("**Room %d/%d — %s.** ", nextIdx+1, run.TotalRooms, prettyRoomType(next)))
|
||||
b.WriteString("`!zone advance` to continue.")
|
||||
return p.SendDM(ctx.Sender, b.String())
|
||||
|
||||
Reference in New Issue
Block a user