Class HealthHistory
java.lang.Object
privbot.mechanics.HealthHistory
Detached recent health observations for the eat decision. A measured drop is not proof of an individual hit or its source;
healing or another state change may obscure damage. Single-owner; repeated observations of a tick are ignored.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear at a session boundary, death or restart.voidobserve(int tick, Integer hp, ItemContainerSnapshot inventory) Record one detached sample; a missing inventory does not mean an empty one.voidobserve(FightFrame frame) Record the HP and inventory in one detached fight frame.Largest drop into a sample in [tick-11,tick].
-
Constructor Details
-
HealthHistory
public HealthHistory()
-
-
Method Details
-
observe
Record the HP and inventory in one detached fight frame. An unavailable threat read means HP is unknown. -
observe
Record one detached sample; a missing inventory does not mean an empty one. -
worstDrop
Largest drop into a sample in [tick-11,tick]. Excludes transitions where configured supplies decreased; if inventory is unreadable, a drop remains a lower bound. Names use case-insensitive substring matching. Returns null when no health observation exists in the window. -
clear
public void clear()Clear at a session boundary, death or restart.
-