AutoId: a selected target alone no longer holds the pack
A hunting bot nearly always has something selected, so holding Inventory appraisals on a selection would leave the pack (mana stones included) unread. Combat is now a cast in flight (CastGate) or an attack running (ClientActionGates) only, in the pure AutoIdPolicy.InCombat, which takes the selection as input and ignores it. Tests: target selected with no cast and no attack is not combat and the pack sends; a cast, or an attack, alone is combat. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8668f2a3ca
commit
831001796b
5 changed files with 29 additions and 13 deletions
|
|
@ -110,6 +110,14 @@ internal static partial class Program
|
|||
Check(AutoIdPolicy.Decide(AutoIdMode.Limited, C.Target, 0, false, false, false, false, combatBusy: true) == V.Send, "combat never holds the selected target");
|
||||
Check(AutoIdPolicy.Decide(AutoIdMode.Limited, C.Container, Old, false, true, false, false, combatBusy: true) == V.Send, "combat never holds an open container");
|
||||
Check(AutoIdPolicy.Decide(AutoIdMode.All, C.Inventory, Old, false, false, false, false, combatBusy: true) == V.Send, "All mode: no combat hold (old behaviour)");
|
||||
// What counts as combat: a cast or an attack, never a selection alone (a hunting bot
|
||||
// nearly always has one, and the pack would never be appraised).
|
||||
Check(!AutoIdPolicy.InCombat(0x80001234, 0, false), "target selected, no cast, no attack: not combat");
|
||||
bool selectedOnly = AutoIdPolicy.InCombat(0x80001234, 0, false);
|
||||
Check(AutoIdPolicy.Decide(AutoIdMode.Limited, C.Inventory, Old, false, false, false, false, combatBusy: selectedOnly) == V.Send, "target selected, no cast, no attack: the pack sends");
|
||||
Check(AutoIdPolicy.InCombat(0, 1, false), "a cast in flight is combat");
|
||||
Check(AutoIdPolicy.InCombat(0, 0, true), "an attack running is combat");
|
||||
Check(!AutoIdPolicy.InCombat(0, 0, false), "nothing at all: not combat");
|
||||
// Limited: unknown place.
|
||||
Check(AutoIdPolicy.Decide(AutoIdMode.Limited, C.Unknown, 100, false, false, false, false) == V.WaitAge, "unknown place waits while young");
|
||||
Check(AutoIdPolicy.Decide(AutoIdMode.Limited, C.Unknown, Old, false, false, false, false) == V.SkipMode, "still unknown when old: skipped");
|
||||
|
|
|
|||
Loading…
Reference in a new issue