Class OpponentAttackClock

java.lang.Object
privbot.mechanics.OpponentAttackClock

public final class OpponentAttackClock extends Object
Conservative observed-swing timing for one locked opponent. The caller supplies server-specific animation and graphic cues; an unrecognised signal, an unreadable player, or a stale sample makes a hit due now. This does not estimate the opponent's spec energy, attribute damage, or prove an attack cannot arrive sooner. Single-owner.
  • Constructor Details

  • Method Details

    • observe

      public void observe(int tick, long lockId, PlayerView opponent, Integer cycleTicks)
      Fold one opponent observation. Change lockId when the lock is retaken, including on the same player. Null opponent, weapon, animation or targeting is unknown. cycleTicks is a known current-weapon cycle.
    • observe

      public void observe(int tick, long lockId, PlayerView opponent, Integer cycleTicks, Integer attributedHit)
      As above, with damage independently attributed to this opponent (including 0); null means no attributed hit was supplied. A hit in a new-swing sample is associated with the preceding outstanding swing first.
    • nextPossibleHit

      public int nextPossibleHit(int now, Map<String,Integer> weaponOverrides)
      A prediction, never a proof: missing or stale data and a possible granite-maul special are due now.
    • hitLag

      public int hitLag(CombatStyle style)
      Median of the last nine valid attributed swing-to-hit gaps after five samples, else zero.