Class RiskValuation
java.lang.Object
privbot.mechanics.RiskValuation
Pure valuation over caller-supplied prices and death rules. It is an estimate, not a server-issued loss guarantee.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic final classOne physical entry.static final classValue and death treatment for one item ID, from a caller-verified server-specific source. -
Method Summary
Modifier and TypeMethodDescriptionstatic LongfromFrame(FightFrame frame, Map<Integer, RiskValuation.ItemRule> itemRules, Boolean skulled, Boolean protectItem, int ordinarySlots, int skulledSlots, boolean prayerAddsSlot) Evaluate both containers from one fight frame.static Longlost(List<RiskValuation.Item> items, Boolean skulled, Boolean protectItem, int ordinarySlots, int skulledSlots, boolean prayerAddsSlot) Estimate the value lost using caller-verified death rules and a consistent value source.
-
Method Details
-
fromFrame
public static Long fromFrame(FightFrame frame, Map<Integer, RiskValuation.ItemRule> itemRules, Boolean skulled, Boolean protectItem, int ordinarySlots, int skulledSlots, boolean prayerAddsSlot) Evaluate both containers from one fight frame. Every occupied item ID must have an explicit rule, including items always kept. Null frame, containers, map or state stays unknown. No value or death rule is inferred from an item's definition, name or server. The caller supplies the skull and prayer observations for this tick. -
lost
public static Long lost(List<RiskValuation.Item> items, Boolean skulled, Boolean protectItem, int ordinarySlots, int skulledSlots, boolean prayerAddsSlot) Estimate the value lost using caller-verified death rules and a consistent value source. The caller supplies the ordinary and skulled protection counts and whether prayer adds a slot; no server rule is assumed. A null list, price, disposition, skull or prayer state, invalid slot count or arithmetic overflow yields null, never zero. Items to which the server applies custom reclaim, conversion or other special rules require a matching supplied valuation and disposition; otherwise their entry must be unknown. This function does not read a client.
-