# Anydice formula for Great Weapon Master Feat

I'm trying to compare my rogue's damage output to our party's fighter but I've run into a couple snags..

• The fighter uses the Great Weapon Master feat and that gives him an extra attack as a bonus action when he scores a critical hit. How would that be added?

• The fighter rerolls 1s and 2s for his weapon damage. I did find a formula for this in another post, but I don't know about incorporating it into what I already have.

• If the rogue misses, he may make another attack. How do I add that?

Here's what I have so far.. https://anydice.com/program/12d62

• What do you mean by "If the rogue misses, he may make another attack." What is the exact mechanic here? – Szega Dec 30 '18 at 11:17
• I guess you assume the HP of the target are high enough not to be dropped to 0 HP? Otherwise this would be another way of gaining an additional attack via the feat without having to score a crit. Chances of this depend on the AC and HP of the target... – fabian Dec 30 '18 at 12:00
• @Szega: OP could be talking about the 20th-level feature Stroke of Luck, once per short rest: " If your attack misses a target within range, you can turn the miss into a hit." It could also be the 17th-level Swashbuckler feature Master Duelist, once per short rest: "If you miss with an attack roll, you can roll it again with advantage." – V2Blast Dec 30 '18 at 19:33
• @szega: Sorry I guess I oversimplified, asking for what I desired without how it worked mechanically. Dual wielding daggers, can use a bonus action to attack with offhand. Only really worth using if the first attack misses since can't use sneak attack damage twice. – magicmike2x Dec 30 '18 at 20:05
• @fabian: Yes, assuming a monster or boss with a lot of health, something the fighter is likely to use his action surge on (in which case i'll bump the attacks to 4 instead of 2 when I want to factor this in) – magicmike2x Dec 30 '18 at 20:07

## 1 Answer

I'm not going to give you an AnyDice-specific answer, because in my experience it chokes on anything but the most trivial formulas. Instead I'm going to tell you how to calculate this yourself using simple high-school algebra.

Let's assume your fighter's attack and damage bonus are +5 and the target's AC is 15. Also let's assume the fighter is attacking with a greatsword (2d6+5 damage).

A handy representation of probability distributions is a polynumber in a variable x, where x raised to the nth power represents a roll of n on the die. For example, a constant 5 (a die that always comes up 5) is represented as: $$x^5$$

The probability distribution of the attack roll is even across the 20 numbers on the die. We can thus represent a d20 as the sum: $$\sum_ {n=1}^{20}{x^n}$$

We can combine the d20 and the constant 5 to get our attack roll. We multiply one polynumber by the other:

$$x^5\times\sum_ {n=1}^{20}{x^n}=\sum_ {n=1}^{20}{x^{n+5}}$$

To represent 2d6, we just square the polynumber representing a d6: $$(\sum_ {n=1}^{6}{x^n})^2$$ For 3d6, we just raise to the 3rd power, and so on.

Out of the 20 numbers on the fighter's attack roll, 9 of them miss for 0 damage, 10 hit for 2d6+5 damage, and one number (a natural 20) crits for 4d6+5. To add these together, we have to weigh by how frequently a given result comes up. We divide the d6 terms by 6 (since each has a 1/6 chance), then weight the damage rolls by how frequently they happen (1/20, 10/20, and 9/20, respectively). So the total distribution of the damage is: $$\frac{x^5((\sum_ {n=1}^{6}{\frac{x^n}{6}})^4+10(\sum_ {n=1}^{6}{\frac{x^n}{6}})^2)+9x^0}{20}$$

If we plug that into our calculator, we get a polynumber of order 29 (the maximum damage), and each coefficient of x^n is how frequently n occurs.

Plug into your favorite charting software (I'm using Mathematica) for a pretty histogram:

We can see that the average Damage Per Round is 6.95

Let's now add an extra attack as a bonus action on a crit. How would we do that? Easy. In addition to plugging in the distribution of 4d6 for the crit, we add in the distribution for the whole attack again.

$$\frac{x^5((\sum_ {n=1}^{6}{\frac{x^n}{6}})^4\times\frac{x^5((\sum_ {n=1}^{6}{\frac{x^n}{6}})^4+10(\sum_ {n=1}^{6}{\frac{x^n}{6}})^2)+9}{20}+10(\sum_ {n=1}^{6}{\frac{x^n}{6}})^2)+9}{20}$$

The DPR is slightly better:

Rerolling 1s and 2s is straightforward. If we roll 1d6 and reroll 1s and 2s, what we're doing is equivalent to rolling 1d4+2 two-thirds of the time (when we roll 3-6 and don't reroll), and rolling a regular 1d6 one-third of the time (when we have to reroll).

$$\frac{x^5(\frac{(\sum_ {n=1}^{4}{\frac{2x^{n+2}}{4}}+\sum_ {n=1}^{6}{\frac{x^n}{6}})^4}{3}\times\frac{x^5(\frac{(\sum_ {n=1}^{4}{\frac{2x^{n+2}}{4}}+\sum_ {n=1}^{6}{\frac{x^n}{6}})^4}{3}+10\frac{(\sum_ {n=1}^{4}{\frac{2x^{n+2}}{4}}+\sum_ {n=1}^{6}{\frac{x^n}{6}})^2}{3})+9}{20}+10\frac{(\sum_ {n=1}^{4}{\frac{2x^{n+2}}{4}}+\sum_ {n=1}^{6}{\frac{x^n}{6}})^2}{3})+9}{20}$$

Rerolling 1s and 2s is pretty good, but the difference is not nearly as dramatic as rerolling misses.

Calculating the distribution for making a second attack on a miss is the same principle as making a second attack on a crit. Instead of adding 9 (representing 9 out of 20 chances of getting zero damage) to represent the miss, we just add the whole attack again just like we did with the crit, except 9 times.

$$\frac{x^5((\sum_ {n=1}^{6}{\frac{x^n}{6}})^4+10(\sum_ {n=1}^{6}{\frac{x^n}{6}})^2)+9{\frac{x^5((\sum_ {n=1}^{6}{\frac{x^n}{6}})^4+10(\sum_ {n=1}^{6}{\frac{x^n}{6}})^2)+9}{20}}}{20}$$

Being able to attack again on a miss turns out to be really good. In this case it more than halves your chances of doing no damage. The higher the AC, the more dramatic this improvement.

End result: An ability to re-roll missed attacks is better than Great Weapon Master on average, but GWM can reach higher damage numbers when the dice are favourable.

• Wow! I'll admit to completely glazing over while reading this, but color me suitably impressed. These are some awesome charts. Hats off to you, my good dude. – L.S. Cooper Jan 2 at 18:51
• Rerolling the 1s and 2s only happens once - your answer assumes it keeps happening – Dale M Jan 2 at 20:35
• do you have a reference for the polynumber representation? – cannedprimates Jan 11 at 19:24
• No, sorry, I saw it mentioned in passing in some stats textbook and have been using it since – Apocalisp Jan 12 at 0:45