Class KnockoutRisk

java.lang.Object
privbot.mechanics.KnockoutRisk

public final class KnockoutRisk extends Object
Combines caller-supplied risk estimates with a hit-time estimate. Neither is proof that the next hit is safe.
  • Method Details

    • assessCandidates

      public static KnockoutRisk.Assessment assessCandidates(int now, Integer hp, Integer maxHp, List<KnockoutRisk.Candidate> candidates, Integer reflect, Integer nextHitTick, Integer sendDelay, Integer riskPercent, Integer marginPercent)
      Assess all supplied possible next attacks and take their highest danger line. Each candidate must have a valid caller-supplied uniform estimate or a measured distribution for the current server. Unknown candidates, an unknown reflect amount, an empty list or overflow make the danger unknown rather than silently dropping risk. Reflect is in current-HP units. A measured line adds it after scaling; a uniform model includes it in its maximum. Timing remains an estimate.
    • assess

      public static KnockoutRisk.Assessment assess(int now, Integer hp, Integer maxHp, Integer maxHit, Integer nextHitTick, Integer sendDelay, Integer riskPercent, Integer accuracyPercent, Integer marginPercent)
      An eat is due when readable HP is at or below the estimated danger line and now is at or past the last send tick that could process the eat one tick before the predicted hit. Null means an input needed for the answer is unavailable or invalid. The caller supplies the maximum hit, probability and accuracy; none are inferred here.