Class RiskValuation

java.lang.Object
privbot.mechanics.RiskValuation

public final class RiskValuation extends Object
Pure valuation over caller-supplied prices and death rules. It is an estimate, not a server-issued loss guarantee.
  • 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.