mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +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:
@@ -179,7 +179,13 @@ func (p *AdventurePlugin) handleExtractCmd(ctx MessageContext, _ string) error {
|
||||
}
|
||||
b.WriteString(fmt.Sprintf("Loot, XP, and coins are kept. The dungeon stays where you left it — `!resume` within 7 days to come back. After %s the expedition expires.",
|
||||
(time.Now().UTC().Add(extractResumeWindow)).Format("2006-01-02 15:04 MST")))
|
||||
return p.SendDM(ctx.Sender, b.String())
|
||||
if err := p.SendDM(ctx.Sender, b.String()); err != nil {
|
||||
return err
|
||||
}
|
||||
// Emergence seam: surfacing from a run is when an animal may have moved
|
||||
// into the empty house.
|
||||
p.maybeRollPetArrivalOnEmerge(ctx.Sender)
|
||||
return nil
|
||||
}
|
||||
|
||||
// ── !resume command ─────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user