# The Dota 2 Pseudo-Random Distribution Creates Semi-Consistent Effects

It’s more correct to call this the Warcraft III PRD, as this mechanic originates from that engine. It’s used increasingly and more consistently in Dota, however, and the WC3 engine encodes incorrect c values for higher levels of $p$.

In order to increase the consistency of some random effects, Dota 2 uses a “pseudo-random distribution” (PRD) to determine when those effects proc, or occur.

The Abyssal Blade’s ability Bash has a 25% chance to stun a target. In reality, it has about an 8.5% chance to proc on the first hit, a 17% chance to proc on the second hit, a 25.5% chance to proc on the third hit, and so on. When Bash procs, the chance is reset.

This:

• Reduces the chance of the effect happening multiple times in a row11Bash also has a 2.3 second cooldown to prevent stunlocking, but that’s a mechanic specific to Bash and not intrinsic to PRD.
• Reduces the chance of long periods between procs (and in fact guarantees the proc will occur on the $\frac{1}{c}$ th trial if it has not already)
• Reduces the effectiveness of priming the weapon (if the effect procced reliably every 1 in 4 times, you might hit a neutral creep 3 times before a teamfight to guarantee a proc on the first hit.)
1Bash also has a 2.3 second cooldown to prevent stunlocking, but that’s a mechanic specific to Bash and not intrinsic to PRD.

## Math

There’s a PRD constant $c$ that’s associated with the effective probability $p$ of the effect. The chance of the effect proccing on the $n$th test is:

$P(n) = c \cdot n$

This test is only performed if the previous $n - 1$ tests fail.

For Bash, $p = 0.25$, $c \approx 0.0847$.

I’m unaware of a non-iterative way of deriving $c$ given $p$.