Pets: roll arrival on run-complete emergence too

The emergence-seam roll added in 3ed2e1d covered extract, abandon,
forced extraction, and death-respawn — but not a natural run-complete
(boss down / dead-end node), which is the most common successful
emergence. Players who cleared a run cleanly never got the arrival roll
despite meeting every condition.

Wire maybeRollPetArrivalOnEmerge into the two real run-complete callers
(expeditionCmdRun foreground + the autorun background ticker), gated on
reason == stopComplete. Kept out of runAutopilotWalk itself so the sim
path (which calls the walk directly) never fires arrival DMs.
This commit is contained in:
prosolis
2026-05-21 23:27:53 -07:00
parent 2ea3e42612
commit 978dc5e25f
2 changed files with 13 additions and 0 deletions

View File

@@ -154,6 +154,11 @@ func (p *AdventurePlugin) tryAutoRun(e *Expedition, now time.Time) error {
// "no expedition" / "no run" — race with abandon/extract. Silent.
return nil
}
// Emergence seam: a run-complete reached by the background ticker is
// still a live emergence — roll pet arrival. See maybeRollPetArrivalOnEmerge.
if r.reason == stopComplete {
p.maybeRollPetArrivalOnEmerge(uid)
}
if !shouldDMAutoRun(r) {
return nil
}