mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 00:52:40 +00:00
Adv 2.0 D&D Phase R R2: Harvest nodes & per-room registry
Per-zone resource registry (§3, all 10 zones) and full per-room harvest layer wired into expeditions: !forage / !mine / !scavenge / !essence / !commune / !resources. Auto-spawns a DungeonRun per region on !expedition start, swaps it on !region travel, retires on abandon/extract. Long rest at camp replenishes nodes across every room and region. Reuses existing flavor.Harvest* / RichYield / NodeDepleted / per-zone Harvest<Zone> pools. Also clears two pre-existing test failures introduced by the E6c flavor expansion (briefing substring list + combat-lift trial count). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -196,6 +196,17 @@ func (p *AdventurePlugin) expeditionCmdStart(ctx MessageContext, c *DnDCharacter
|
||||
return p.SendDM(ctx.Sender, "Couldn't start expedition: "+err.Error())
|
||||
}
|
||||
|
||||
// R2 — auto-spawn the DungeonRun for the starting region. Per-room
|
||||
// harvest depends on this; the existing zone-run !advance/!retreat
|
||||
// commands now operate on this run while the expedition is active.
|
||||
if _, err := ensureRegionRun(exp, c.Level); err != nil {
|
||||
// Refund and tear the expedition row back down — without a
|
||||
// linked run, harvest and rooms can't function.
|
||||
_ = abandonExpedition(ctx.Sender)
|
||||
p.euro.Credit(ctx.Sender, cost, "expedition outfitting refund (run-spawn failed)")
|
||||
return p.SendDM(ctx.Sender, "Couldn't outfit the first region: "+err.Error())
|
||||
}
|
||||
|
||||
// Log the start with prewritten flavor.
|
||||
startLine := flavor.Pick(flavor.ExpeditionStart)
|
||||
_ = appendExpeditionLog(exp.ID, 1, "narrative", "expedition started", startLine)
|
||||
@@ -375,6 +386,7 @@ func (p *AdventurePlugin) expeditionCmdAbandon(ctx MessageContext) error {
|
||||
if err := abandonExpedition(ctx.Sender); err != nil {
|
||||
return p.SendDM(ctx.Sender, "Couldn't abandon: "+err.Error())
|
||||
}
|
||||
_ = retireAllRegionRuns(exp)
|
||||
_ = appendExpeditionLog(exp.ID, exp.CurrentDay, "narrative", "expedition abandoned", "")
|
||||
return p.SendDM(ctx.Sender, fmt.Sprintf(
|
||||
"Expedition in **%s** abandoned on Day %d. Supplies are forfeit. The dungeon remembers.",
|
||||
|
||||
Reference in New Issue
Block a user