Phase-H review fixes: camp, fork streak, pet proc, BG transit, legacy streak

- Camp: campLocationCheck rejects only on live combat; no-encounter and
  post-kill rooms are campable (kills the misleading "clear it first").
- Fork: markActedToday moved after the pending-fork early-return so spamming
  !zone advance at a fork no longer keeps the daily streak alive.
- Pet whiff/deflect: single proc spent on the first multiattack swing only
  (was applied to every swing); also dedups the per-swing event spam.
- Autopilot: background region crossing now runs an HP/SU preflight and
  pauses if low, instead of burning a transit day while the player is idle.
- Legacy streak: acted-branch restamps LastActionDate=today so a purely-legacy
  actor's streak no longer resets to 1 every night.
This commit is contained in:
prosolis
2026-05-22 01:15:23 -07:00
parent bcd4a873a5
commit ef8fbe5496
5 changed files with 43 additions and 19 deletions

View File

@@ -361,19 +361,20 @@ func campLocationCheck(exp *Expedition) (cleared bool, problem string) {
return true, ""
}
}
// Not yet advanced-past, but if there's no live combat encounter in
// this room, it's still safe to rest in. Forward-only navigation means
// players naturally pause right after a kill before advancing — the
// "cleared" flag would otherwise force-downgrade their camp to rough.
// Not yet advanced-past, but the only thing that bars a rest is a live
// fight. Forward-only navigation means players pause right after a kill
// before advancing, and peaceful/exploration/loot rooms never spawn an
// encounter at all — both are safe to rest in. The "cleared" flag would
// otherwise reject standard camp here with a misleading "clear it first".
encID := encounterIDForRoom(run.CurrentRoom)
sess, err := getCombatSessionForEncounter(run.RunID, encID)
if err != nil {
return false, ""
}
if sess != nil && sess.Status != CombatStatusActive {
return true, ""
if sess != nil && sess.Status == CombatStatusActive {
return false, "You can't camp mid-fight — finish the encounter first."
}
return false, ""
return true, ""
}
// campCurrentRoomIndex returns 0 (entry) when no room context exists.