From bcd4a873a5e32fbf01c538d30664971ce4d90b55 Mon Sep 17 00:00:00 2001 From: prosolis <5590409+prosolis@users.noreply.github.com> Date: Wed, 20 May 2026 19:23:46 -0700 Subject: [PATCH] Idle reaper: credit the closing day, not the new day midnightReset runs at 00:00 UTC closing out yesterday, but gated idle shame on HasActedToday(), which compares LastActionDate to today (the new day). DnD-side players credit the day via LastActionDate only, so anyone who played yesterday and extracted before midnight read as idle and had their streak halved. Credit activity on the closing day (LastActionDate==yesterday) directly, matching the streak-bump branch. (cherry picked from commit f6cb4889e7e6bfacce41ea40853456b08d6857a9) --- internal/plugin/adventure_scheduler.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/internal/plugin/adventure_scheduler.go b/internal/plugin/adventure_scheduler.go index d66de9d..6f9e0a5 100644 --- a/internal/plugin/adventure_scheduler.go +++ b/internal/plugin/adventure_scheduler.go @@ -407,7 +407,16 @@ func (p *AdventurePlugin) midnightReset() error { dmsSent := 0 for _, char := range chars { - if !char.HasActedToday() { + // This runs at 00:00 of the new UTC day, closing out the day that just + // ended (= yesterday). HasActedToday() compares LastActionDate against + // time.Now()'s date (the *new* day), so DnD-side players who credited + // the closing day via LastActionDate=yesterday would read as idle and + // get their streak halved. Credit activity on the closing day directly: + // legacy counters are still non-zero here (reset happens further below), + // and LastActionDate==yesterday means they played the day we're closing. + acted := char.CombatActionsUsed > 0 || char.HarvestActionsUsed > 0 || + char.LastActionDate == today || char.LastActionDate == yesterday + if !acted { // If the player died today or yesterday, they couldn't act — no shame, // no streak reset. This covers both currently-dead players and players // who were just revived at midnight (Alive already flipped to true by