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:
@@ -486,9 +486,14 @@ func (p *AdventurePlugin) expeditionCmdAbandon(ctx MessageContext) error {
|
||||
}
|
||||
_ = retireAllRegionRuns(exp)
|
||||
_ = appendExpeditionLog(exp.ID, exp.CurrentDay, "narrative", "expedition abandoned", "")
|
||||
return p.SendDM(ctx.Sender, fmt.Sprintf(
|
||||
if err := p.SendDM(ctx.Sender, fmt.Sprintf(
|
||||
"Expedition in **%s** abandoned on Day %d. Supplies are forfeit. The dungeon remembers.",
|
||||
zone.Display, exp.CurrentDay))
|
||||
zone.Display, exp.CurrentDay)); err != nil {
|
||||
return err
|
||||
}
|
||||
// Emergence seam: see maybeRollPetArrivalOnEmerge.
|
||||
p.maybeRollPetArrivalOnEmerge(ctx.Sender)
|
||||
return nil
|
||||
}
|
||||
|
||||
// helper: ensure we don't shadow id.UserID import in test harness.
|
||||
|
||||
Reference in New Issue
Block a user