Class KnockoutMath

java.lang.Object
privbot.mechanics.KnockoutMath

public final class KnockoutMath extends Object
Pure probability calculations adapted from ElorinPvP's KO-risk model; inputs are estimates, not guarantees.
  • Method Details

    • uniformDangerLine

      public static Integer uniformDangerLine(Integer maxHit, Integer riskPercent, Integer accuracyPercent, Integer maxHp, Integer marginPercent)
      Highest HP at which the estimated KO probability exceeds the requested percentage, assuming a uniform damage roll from zero to max and the caller's hit accuracy. With risk zero, returns max plus the max-HP margin. All values are supplied by the caller; unknown or invalid inputs return null, never a safe line of zero.
    • measuredDangerLine

      public static Integer measuredDangerLine(int[] survival, Integer riskPercent, Integer maxHp)
      Highest HP at which a measured damage distribution exceeds the requested KO probability. survival[x] is P(damage >= x) in per-mille on a 99-HP scale, supplied by the caller for the correct server and attack. Returns null for unreadable, invalid, non-monotone or truncated rows: no measured line is not zero risk. The caller is responsible for sample quality, attribution, any reflect damage and server applicability.
    • dharokMultiplier

      public static Double dharokMultiplier(Integer hpPercent)
      Dharok's set multiplier at a readable wielder HP percentage; unknown or out-of-range is null.