mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 08:52:42 +00:00
Pets: roll arrival on expedition emergence, not the 08:00 morning DM
The pet-arrival roll only ran in sendMorningDMs (the 08:00 overworld morning DM), which is skipped for anyone underground. Expedition players are almost never in the overworld at 08:00, so the roll never reached them — the encounter never fired despite the conditions being met. Move the roll onto the emergence seam via a shared helper maybeRollPetArrivalOnEmerge, called when a player surfaces alive (voluntary extract, abandon, survived forced extraction) and on respawn for underground deaths. Remove the now-dead morning-DM arrival roll. Story-wise: while the player was out, an animal wandered into the empty house looking for food. The 25% morning pet event still rolls only in the overworld DM and has the same reachability gap; left for a follow-up.
This commit is contained in:
@@ -303,6 +303,14 @@ func (p *AdventurePlugin) deliverBriefing(e *Expedition, now time.Time) error {
|
||||
if err := p.SendDM(uid, body); err != nil {
|
||||
slog.Warn("expedition: send briefing DM", "user", uid, "err", err)
|
||||
}
|
||||
// Emergence seam: a briefing-time forced extraction (starvation /
|
||||
// abyss collapse) surfaces the player alive — roll pet arrival.
|
||||
// Combat/patrol deaths never reach deliverBriefing (the row is
|
||||
// already abandoned), so an abandoned status here means a survived
|
||||
// emergence; those death paths roll on respawn instead.
|
||||
if e.Status == ExpeditionStatusAbandoned {
|
||||
p.maybeRollPetArrivalOnEmerge(uid)
|
||||
}
|
||||
}
|
||||
if err := appendExpeditionLog(e.ID, e.CurrentDay, "briefing",
|
||||
fmt.Sprintf("morning briefing — %.1f SU consumed overnight", burn), line); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user