Class StylePlanner

java.lang.Object
privbot.mechanics.StylePlanner

public final class StylePlanner extends Object
Deterministic style-set planning with the flagship's least-switching, range and commitment rules. Gear matching, readability and overhead debouncing are supplied as detached facts by the caller.
  • Method Details

    • candidate

      public static StylePlanner.Candidate candidate(CombatStyle style, GearSetup setup, FightFrame frame, Boolean blocked, Boolean outOfReach, boolean refused, boolean allowNameVariants)
      Derive one style candidate from a worn setup and a same-tick frame. Each missing piece needs a distinct carried slot; unreadable containers or names do not become a negative answer. Name variants use the historical GearNames rules only when the caller explicitly opts in for the server. The candidate establishes availability, not that a later equip dispatch will succeed.
    • decide

      public static StylePlanner.Decision decide(int tick, Boolean wornReadable, List<StylePlanner.Candidate> candidates, CombatStyle preference, CombatStyle held, Integer heldSince, Integer heldBlockedTicks)
      Choose from configured candidates. Unknown worn gear, obtainability, prayer or range cannot establish a safe new selection. A known reachable, unblocked set with the fewest missing pieces wins; if all known sets are blocked, choose the least-changing reachable set, then an out-of-range set only if no other set is available. Equal costs use preference, then MELEE/RANGED/MAGIC. The held style stays through the eight-tick commitment, except when no longer viable or a prayer blocks it for two readable ticks. A one-tick flick never breaks it, including after the initial window. Null result means the inputs do not establish a candidate.