mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 08:52:42 +00:00
Adv 2.0 D&D Phase 12 E1d: real-time day cycle (06:00 briefing / 21:00 recap)
Two new tickers in adventure.go startup. Each minute, when UTC clock hits the trigger hour, walks every active expedition whose last_briefing_at / last_recap_at is stale relative to today's threshold and fires it. Per- expedition gating (rather than global db.JobCompleted) means a player who started mid-day still gets their first briefing the next morning. Briefing: applies one day's supply burn (harsh mult kicks in when threat > 60 / siege / temporal stack > 0), advances current_day by one, picks flavor.MorningBriefing<DayBand> (Day1/Day3/Day7/Day14/Day21 → otherwise Generic), DMs the §12.1 block, appends a 'briefing' log entry, stamps last_briefing_at. Recap: scans today's log entries — boss kill picks flavor.EveningRecapBossKilled, no combat + no narrative entries picks EveningRecapNothingHappened, otherwise EveningRecapGeneric. DMs the §12.2 block (HP-aware close-call detection deferred to E2 since it needs combat hooks). Stamps last_recap_at. Tests cover day-band selection, day advance + supply burn (incl. harsh mult), threshold filtering, recap log entry creation, and boss-kill override. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -173,6 +173,8 @@ func (p *AdventurePlugin) Init() error {
|
||||
go p.hospitalNudgeTicker()
|
||||
go p.mortgageTicker()
|
||||
go p.coopTicker()
|
||||
go p.expeditionBriefingTicker()
|
||||
go p.expeditionRecapTicker()
|
||||
|
||||
// Auto-cashout any arena runs left in 'awaiting' from a prior restart
|
||||
p.arenaCleanupStaleRuns()
|
||||
|
||||
Reference in New Issue
Block a user