Expedition: skip idle reaper + legacy morning DM while on expedition

The midnight idle reaper inspected only the overworld CombatActionsUsed/
HarvestActionsUsed counters, so a player on an active expedition was
flagged idle — streak halved and a nonsense overworld shame DM sent. The
08:00 morning DM had the same gap and stomped on the 06:00 expedition
briefing. Both paths now early-out when getActiveExpedition is non-nil
(advancing the streak in the midnight branch).

Includes a one-shot bootstrap that doubles CurrentStreak (capped at
BestStreak, +1 when room allows to recover the integer-divide odd half)
for characters still flagged StreakDecayed with an active expedition.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-05-12 21:54:40 -07:00
parent 9ce82f7c67
commit 2b86f3df16
3 changed files with 102 additions and 0 deletions

View File

@@ -175,6 +175,7 @@ func (p *AdventurePlugin) Init() error {
// have a player_meta row. Idempotent. Required for DBs that didn't go
// through the L4-L5h dual-write soak (fresh deploys, restored backups).
bootstrapPlayerMetaFromLegacy()
bootstrapRestoreExpeditionStreakDecay()
// Rehydrate DM room mappings for existing characters
chars, err := loadAllAdvCharacters()