Class IncomingStyleDecision

java.lang.Object
privbot.mechanics.IncomingStyleDecision

public final class IncomingStyleDecision extends Object
Chooses an incoming combat style from detached, independently classified threat evidence. Unknown classifications never become evidence that an attacker or tell is absent.
Since:
1.2.0
  • Method Details

    • observe

      public static IncomingStyleDecision.Decision observe(FightObservation observation, ThreatMemory.View memory, Map<Integer,CombatStyle> shotStyles, int opponentIndex, CombatStyle opponentStyle)
      Apply incoming-style selection to one observation and its same-tick threat memory. The server-ID table, opponent lock, and radius appropriate to the encounter remain the caller's responsibility.
    • opponentEligible

      public static Boolean opponentEligible(FightObservation observation, ThreatMemory.View memory, int opponentIndex)
      Combine same-batch bounded NPC and unfiltered player observations for the named locked player. The caller must choose a radius large enough for relevant attackers and retain a valid lock for this frame.
    • opponentEligible

      public static Boolean opponentEligible(int tick, ThreatMemory.View memory, Boolean attackersComplete, Boolean otherAttacker)
      Determine whether the opponent's predicted style can explain recent hits. A positive answer requires a complete attacker walk, no other attacker, a target observation within two ticks, and fewer than two hits unexplained by their observed weapon styles. Incomplete reads return null rather than assuming no attacker.
    • observe

      public static IncomingStyleDecision.Decision observe(List<ShotView> shots, Map<Integer,CombatStyle> shotStyles, ThreatMemory.View memory, Boolean opponentEligible, CombatStyle opponentStyle)
      Classify the earliest avoidable projectile aimed at the player (more than 21 and at most 60 cycles left), then apply choose(java.lang.Boolean, privbot.mechanics.CombatStyle, java.lang.Boolean, java.lang.Boolean, privbot.mechanics.CombatStyle, privbot.mechanics.CombatStyle). A null projectile list, an unreadable target on a potentially earlier shot, or an unrecognized shot ID leaves that higher-priority evidence unknown. The style table uses server IDs.
    • choose

      public static IncomingStyleDecision.Decision choose(Boolean dueShotReadable, CombatStyle dueShotStyle, Boolean magicTell, Boolean opponentEligible, CombatStyle opponentStyle, CombatStyle ledgerStyle)
      Apply the flagship priority: an avoidable due shot, active magic tell, eligible opponent, then the hit ledger. dueShotReadable is true only if the caller can establish whether a relevant shot exists; a due shot with no known style is also unreadable for this decision. opponentEligible must account for complete attacker scans, recent targeting and unexplained hits. An unreadable tell or eligibility cannot be treated as false. The result is a recommendation, not a prayer dispatch or proof of an attack's source.