mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
Combat: auto-play timed-out turn-based sessions to a real win/loss
A combat session abandoned past its 1h TTL is now resumed from persisted mid-state and auto-played through the shared resolver to a real win or loss, rather than flatly marked as a retreat. The bulk-UPDATE sweep is replaced by listExpiredCombatSessions plus a reaper that locks the user, auto-plays the fight, runs the normal close-out, and DMs the outcome. markCombatSessionExpired remains the terminal fallback for sessions that can't be reconstructed. Wired into eventTicker. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,9 @@ func (p *AdventurePlugin) eventTicker() {
|
||||
// Expire stale pending events every tick
|
||||
expireAdvPendingEvents()
|
||||
|
||||
// Auto-play any combat sessions past their 1h timeout.
|
||||
p.reapExpiredCombatSessions()
|
||||
|
||||
advEventScheduleMu.Lock()
|
||||
if advEventScheduleDay != dateKey {
|
||||
advEventSchedule = make(map[string]int)
|
||||
|
||||
Reference in New Issue
Block a user