Class EmergencyConsume
java.lang.Object
privbot.mechanics.EmergencyConsume
Pure emergency consume selection. The caller resolves configured names to carried items before invoking this
rule. A decision is a proposal: dispatch acceptance and a later inventory observation are separate facts.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescriptionstatic EmergencyConsume.Decisiondecide(ConsumeTiming.Mode mode, int tick, Integer hpPercent, Integer worstHitPercent, int eatAtPercent, int emergencyPercent, Integer lastFood, Integer lastCombo, Integer lastPotion, ItemContainerSnapshot.Item food, ItemContainerSnapshot.Item combo, ItemContainerSnapshot.Item brew, ItemContainerSnapshot.Item restore, Boolean restoreDue) Applies the flagship emergency rule to one inventory snapshot.
-
Method Details
-
decide
public static EmergencyConsume.Decision decide(ConsumeTiming.Mode mode, int tick, Integer hpPercent, Integer worstHitPercent, int eatAtPercent, int emergencyPercent, Integer lastFood, Integer lastCombo, Integer lastPotion, ItemContainerSnapshot.Item food, ItemContainerSnapshot.Item combo, ItemContainerSnapshot.Item brew, ItemContainerSnapshot.Item restore, Boolean restoreDue) Applies the flagship emergency rule to one inventory snapshot. Candidates must be actual items from that snapshot; a null candidate means unavailable. In the independent profile a predicted hit can make an eat due critical, but does not trigger a brew above the emergency threshold. In Elorin Dharok mode only the actual emergency threshold triggers this rule. Unknown timers do not authorize a click. The caller separately handles normal eating, KO deadlines, restores outside emergencies and boost potions.
-