Class OpponentAttackClock
java.lang.Object
privbot.mechanics.OpponentAttackClock
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 Summary
ConstructorsConstructorDescriptionOpponentAttackClock(Map<Integer, CombatStyle> animations, Set<Integer> nonAttacks, Set<Integer> rangedGraphics) -
Method Summary
Modifier and TypeMethodDescriptioninthitLag(CombatStyle style) Median of the last nine valid attributed swing-to-hit gaps after five samples, else zero.intnextPossibleHit(int now, Map<String, Integer> weaponOverrides) A prediction, never a proof: missing or stale data and a possible granite-maul special are due now.voidobserve(int tick, long lockId, PlayerView opponent, Integer cycleTicks) Fold one opponent observation.voidobserve(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.
-
Constructor Details
-
OpponentAttackClock
-
-
Method Details
-
observe
Fold one opponent observation. ChangelockIdwhen the lock is retaken, including on the same player. Null opponent, weapon, animation or targeting is unknown.cycleTicksis 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
-
hitLag
Median of the last nine valid attributed swing-to-hit gaps after five samples, else zero.
-