Class OwnAttackClock

java.lang.Object
privbot.mechanics.OwnAttackClock

public final class OwnAttackClock extends Object
Combines a cue detector and confirmed-action history for our attack cycle. Single-owner; create a new clock on a session reset. Call observe(privbot.mechanics.FightFrame, java.lang.Boolean, java.lang.Integer) before recording sends decided from that frame. This class never dispatches, and a send is not a fire. The caller must supply server-ID-space cues and confirm food and clearing effects.
  • Constructor Details

  • Method Details

    • observe

      public AttackFireDetector.Result observe(FightFrame frame, Boolean specFired, Integer cycleTicks)
      Fold one detached frame. specFired is a separately confirmed spec energy drop, or null when unknown; cycleTicks is the known cycle of the currently worn weapon, or null. Neither is inferred from a click.
    • sent

      public void sent(int tick, AttackHistory.Family family)
      Record a send only after the dispatcher accepted it.
    • eatLanded

      public void eatLanded(int tick, String foodIdentity)
      Record an eat only after a fresh inventory read proves it landed.
    • cleared

      public void cleared(int tick)
      Record a clearing effect only after it is observed and attributed to an action after the send.
    • newFight

      public void newFight()
    • unsettled

      public boolean unsettled()
    • swingsUnseen

      public Boolean swingsUnseen(int threshold)
      Whether consecutive accepted sends expired unseen; null if a gap prevents a reliable count.
    • estimatedReady

      public Integer estimatedReady(Map<String,Integer> overrides)
      Null after an unreadable sample until a fresh fire re-establishes the timer.
    • pending

      public Boolean pending(int tick, Map<String,Integer> overrides)
    • autoAttacking

      public Boolean autoAttacking(Boolean facingOpponent)
      Whether a confirmed melee or ranged fire is repeating while the player still faces the locked opponent. Null means the observation or fire history cannot establish an answer.
    • stalled

      public Boolean stalled(int tick, Boolean facingOpponent, Map<String,Integer> overrides)
      Whether a faced opponent has gone beyond the ready/send deadline without a later confirmed fire. The result is a re-click signal, not proof that a prior dispatch failed.