Class SustainChoice
java.lang.Object
privbot.mechanics.SustainChoice
What
SustainPolicy says to do about hitpoints, prayer or a boost this tick. It names an item and the
menu action to use on it; it does not act.
What it proves: item() and action() are non-null only for EAT, COMBO_EAT, BREW, RESTORE and
BOOST, and the item was seen in the inventory snapshot with that action. NONE means everything read was fine.
OUT_OF means a need was read and nothing carried can meet it. UNREADABLE means the inventory, HP or max HP could
not be read, which is not the same as NONE.
Thread rule: immutable, safe on any thread.
-
Nested Class Summary
Nested Classes -
Method Summary
-
Method Details
-
kind
- Returns:
- the kind of answer
-
item
- Returns:
- the carried item's name to use, or null when the kind is not an item action
-
action
- Returns:
- "Eat" or "Drink", or null when the kind is not an item action
-
reason
- Returns:
- a short plain-words reason (never null)
-
toString
-