DPS Theory

May 17, 2008

Hitting a Target in d20

Filed under: DPS, Games, Math, d20 — Peter @ 6:46 pm

In the current (version 3.5, anyway, I think ver. 4 is out now) edition of Dungeons & Dragons, hitting (or missing) a target is pretty easy. It is, after all, meant to be done by people playing on a tabletop with dice, a pencil, and paper…not necessarily on a 3GHz microprocessor pushing a few billion floating point operations per second. So all you do is roll a 20 sided die, you always miss on a 1, always hit on a 20*, and otherwise, if your hit roll plus “base attack bonus(BAB)” ± other modifiers is greater than your target’s Armor Class (AC), you hit your target! The BAB depends on your character’s class and level, you’ll look it up in a table. Other modifiers are any applicable strength or dexterity bonuses, weapon enchantment bonuses, buffs or debuffs, and about a hundred other details in the D&D rules. Armor class depends on the type of armor, be it plate armor, chain mail, leather, whatever, and dexterity (for dodging), and some other things. Thus, the basic probability of a hit is

P(scoring a hit) = {MIN[19/20, MAX(1/20, (20 + BAB + to-hit modifiers - AC)/20)]}

All very linear and easy, no squaring, no roots, no exponentials. Yawn.

However, just to spice things up, Wizards of the Coast have also allowed you to roll a “critical hit (or crit, for short).” On a crit, your damage is multiplied by two, three, or more depending on the type of weapon you’re weilding and your proficiency with that weapon, as described by “feats” you have acquired. To roll a crit under the v. 3.5 rules, you must roll high enough to hit (including modifiers), and the number on the face of the d20 must be within the “critical threat range” of the weapon you’re swinging: 20 for a battle ax, 19-20 for most swords, and 18-20 for weapons such as scimitars. However, after rolling (a hit) within the critical threat range, you must then roll the d20 again, with the same modifiers (you may have a feat that gives an extra bonus to this roll), and score a hit. Failing this second roll still results in a hit, but not a critical hit. So, the probability of a critical hit given that you’ve rolled a critical threat is:

P(crit hit|crit threat) = P(scoring a hit)

or, with the aforementioned feat (Power Critical, gives +4 bonus to hit on this roll with a specific weapon)

P(crit hit|crit threat with power critical feat) = P(scoring a hit) + 4/20 (for 2/20 < P(scoring a hit) < 16/20)

The probability at the ends is still capped at 1/20 to miss and 1/20 to hit.

Thus,

P(crit) = .05×MIN(threat range, hit chance) × P(scoring a hit)

without Power Critical and

P(crit with power critical) = .05×MIN[threat range, hit chance] × [P(scoring a hit) + .2] .2 < P(scoring a hit) < .8

Now, what’s the chance of scoring a regular hit, but not a crit?

P(regular hit) = P(scoring a hit) – P(crit) = 1 – P(crit) – P(miss)

That’s straightforward enough.

Now that we can hit a target, which is worth more? A more damaging crit (higher crit multiplier) or a more accurate crit (broader threat range/power critical)? I’ll look at that next time.

*If for some reason you can’t see your target, say cuz your character is blinded or the target is invisible, there will be another d100 roll against a concealment percentage.

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.