mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 08:52:42 +00:00
Close expedition/run seam on combat loss & flee
Run-loss paths (turn-based elite/boss death + flee, exploration combat death/retreat, interrupt/patrol death) abandoned the zone run but left the wrapping expedition row at status='active', so the ambient ticker kept DMing about a dungeon the player had walked away from. Adds forceExtractExpeditionForRunLoss helper and wires it into every run-loss site; ambient ticker also skips when the expedition's run is no longer active as a safety net. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -188,6 +188,7 @@ func (p *AdventurePlugin) runHarvestInterrupt(
|
||||
_, _ = applyMoodEvent(run.RunID, MoodEventPlayerDeath)
|
||||
_ = abandonZoneRun(userID)
|
||||
_ = retireAllRegionRuns(exp)
|
||||
_, _, _ = forcedExtractExpedition(exp.ID, "interrupt death")
|
||||
markAdventureDead(userID, "expedition", zone.Display)
|
||||
if line := flavor.Pick(flavor.PlayerDeath); line != "" {
|
||||
b.WriteString(line)
|
||||
@@ -513,6 +514,7 @@ func (p *AdventurePlugin) tryPatrolEncounter(
|
||||
_, _ = applyMoodEvent(run.RunID, MoodEventPlayerDeath)
|
||||
_ = abandonZoneRun(userID)
|
||||
_ = retireAllRegionRuns(exp)
|
||||
_, _, _ = forcedExtractExpedition(exp.ID, "patrol death")
|
||||
markAdventureDead(userID, "patrol", zone.Display)
|
||||
if line := flavor.Pick(flavor.PlayerDeath); line != "" {
|
||||
ob.WriteString(line)
|
||||
|
||||
Reference in New Issue
Block a user