Pets: per-round attack + wire deflect/whiff into the turn engine

The live turn engine only struck once per fight and never rolled pet
deflect or whiff, so pet armor (deflect-only) bought nothing in real
runs. Roll pet attack each player turn and roll deflect/whiff per enemy
turn, mirroring the auto-resolve engine; retire the one-shot pet-proc
machinery (rollCombatSessionPetProc / PetProcReady).

(cherry picked from commit a0e41c97801e500efad13c7e9a06be4c345e464e)
This commit is contained in:
prosolis
2026-05-19 23:37:23 -07:00
parent 28a90292f0
commit 20b0d027b2
5 changed files with 113 additions and 96 deletions

View File

@@ -65,14 +65,6 @@ type CombatStatuses struct {
// combatState, so the flag must survive the commit between them.
EnemySkipNext bool `json:"enemy_skip_next,omitempty"`
// PetProcReady is the per-fight pet-attack outcome. Auto-resolve rolls the
// pet proc every round; a manual fight can run many rounds, so the roll is
// decided once at fight start (rollCombatSessionPetProc) and parked here.
// The pet then lands a single hit on the player's first acting turn, which
// clears the flag — persisted so a suspend/resume or reaper auto-play sees
// the same outcome.
PetProcReady bool `json:"pet_proc_ready,omitempty"`
// Fight-scoped depleting resources — mirror the combatState charges that
// genuinely carry round-to-round. Seeded at fight start (Arcane Ward) or by
// a mid-fight !cast / !consume, restored into combatState on every resume,