Class HealthHistory

java.lang.Object
privbot.mechanics.HealthHistory

public final class HealthHistory extends Object
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 Details

    • HealthHistory

      public HealthHistory()
  • Method Details

    • observe

      public void observe(FightFrame frame)
      Record the HP and inventory in one detached fight frame. An unavailable threat read means HP is unknown.
    • observe

      public void observe(int tick, Integer hp, ItemContainerSnapshot inventory)
      Record one detached sample; a missing inventory does not mean an empty one.
    • worstDrop

      public Integer worstDrop(int tick, List<String> foods, List<String> potions)
      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.