Class OpponentTiming

java.lang.Object
privbot.mechanics.OpponentTiming

public final class OpponentTiming extends Object
Pure timing rules adapted from ElorinPvP's opponent clock; no client reads or claimed hit observations.
  • Field Details

  • Method Details

    • nextPossibleHit

      public static int nextPossibleHit(int now, Integer lockedSince, Integer swingTick, Integer swingSpeed, Integer hitLag, Boolean switchedToInstant)
      Estimated earliest next hit. Unknown, a fresh lock, invalid observations, and a possible instant weapon all answer now, not a safe future tick. The last swing's speed is retained through ordinary weapon switches; the caller must mark a switch into an instant special weapon as true, or null if it cannot be ruled out. This is a prediction, not proof that damage will or will not arrive.
    • measuredLag

      public static int measuredLag(List<Integer> samples)
      Median lag from at least five valid samples; otherwise zero, the conservative same-tick estimate.