Recursive combined probability for triggering a bonus attack

advantage-and-disadvantageattackdnd-5estatistics

I'm trying to determine the average damage per round for a homebrew fighting style, so that I can compare it to other types of combat choices, and see if thing will remain balanced, when we introduce this (or not).

Apart from the concrete scenario that triggered this question, I'm also interested in learning how to actually calculate the probabilities involved in this scenario (is this indeed a recursive combined probability?)

The scenario:

  • The Player can make X attacks per round;
  • Before each attack, the Player can choose to attack with disadvantage. If such an attack hits, he can make an additional attack, as bonus action1.

Let's say the player want to trigger the bonus attack, so he is always going to choose to attack with disadvantage, until he gets the bonus attack. Once the bonus attack is triggered, he will not impose disadvantage on any subsequent attacks this round.

So my question is, how can I:

  1. calculate the combined probability of main attack(s) hitting, such that: \$averageDamageFromAttacks = combinedHitProbability \times averageDamagePerHit\$
  2. calculate the probability of the bonus attack being triggered?

Note:
For this question, I would like to focus on the probabilities involved in the mechanics described. So let's say that the probability to hit (and miss) a single attack, both with and without disadvantage, as well as the average damage per hit, are all known values.

Note 2:
enter image description here
Figure 1: a schematic view of when to player will attack with disadvantage, and when without disadvantage.


1. As per the rules, the Player can of course only ever take a single bonus action.

Best Answer

Chance of Triggering the Bonus Attack

The chance of triggering a bonus attack is quite a bit simpler, assuming you follow the strategy of always attacking with disadvantage if you haven't triggered it yet.

You will only fail to trigger the bonus action if all of your regular attacks miss, and the probability of each attack missing is \$(1-p^2)\$. So the final probability is

$$1 - \left(1-p^2\right)^n$$

And the corresponding probabilities are:

\$p\$ 1 attack 2 attacks 3 attacks 4 attacks
0.4 0.1600 0.2944 0.4073 0.5021
0.45 0.2025 0.3640 0.4928 0.5955
0.5 0.2500 0.4375 0.5781 0.6836
0.55 0.3025 0.5135 0.6607 0.7633
0.6 0.3600 0.5904 0.7379 0.8322
0.65 0.4225 0.6665 0.8074 0.8888
0.7 0.4900 0.7399 0.8673 0.9323
0.75 0.5625 0.8086 0.9163 0.9634
0.8 0.6400 0.8704 0.9533 0.9832
0.85 0.7225 0.9230 0.9786 0.9941
0.9 0.8100 0.9639 0.9931 0.9987
0.95 0.9025 0.9905 0.9991 0.9999

Expected Damage (without crits)

Let \$p\$ be your chance to hit, \$n\$ be your number of regular attacks, \$d\$ be your average damage on a hit.

Then the expected damage of an attack without disadvantage is \$pd\$.

Then we can break it into cases based on which is your first regular attack that hits.

  • If your first attack hits, you deal its damage, and the expected damage of the rest of your attacks is \$npd\$ since you have \$n-1\$ regular attacks and the bonus attack left. So the total is \$d+npd\$. The odds of this happening are \$p^2\$
  • If your second attack is the first hit, you deal its damage and \$n-1\$ more attacks, so the expected damage is \$d + (n-1)pd\$. The chance of this happening is \$(1-p^2)p^2\$ since you would first have to miss your first attack and then hit your 2nd.
  • If your first hit is your third attack, the expected damage is \$d+(n-2)pd\$ and the odds are \$(1-p^2)^2p^2\$.
  • If your first hit is your fourth attack, the expected damage is \$d+(n-3)pd\$ and the odds are \$(1-p^2)^3p^2\$.
  • And of course, if all your attacks miss, your damage is \$0\$.

So to get the total expected damage, we need to add these all up. Doing so gives us the following formula: $$\sum_{i=1}^n p^2(1-p^2)^{i-1}\left(d + (n+1-i)pd\right)$$ This can be simplified a bit by starting labelling the first attack 0 instead of 1:

$$\sum_{i=0}^{n-1} p^2(1-p^2)^{i}\left(d + (n-i)pd\right)$$

And a bit more by factoring out \$d\$:

$$d\sum_{i=0}^{n-1} p^2(1-p^2)^{i}\left(1 + (n-i)p\right)$$

Now the summation represents the expected number of successful hits. Unfortunately, the expected number of hits is still too complex (for me) to work out by hand, so I worked it out in Python for some common values of \$n\$ and \$p\$. All of these values need to be multiplied by \$d\$ to get the final expected damage.

\$p\$ 1 attack 2 attacks 3 attacks 4 attacks
0.4 0.2240 0.4762 0.7520 1.0477
0.45 0.2936 0.6189 0.9695 1.3401
0.5 0.3750 0.7812 1.2109 1.6582
0.55 0.4689 0.9623 1.4728 1.9953
0.6 0.5760 1.1606 1.7508 2.3445
0.65 0.6971 1.3743 2.0401 2.6991
0.7 0.8330 1.6008 2.3354 3.0531
0.75 0.9844 1.8369 2.6318 3.4014
0.8 1.1520 2.0787 2.9243 3.7408
0.85 1.3366 2.3217 3.2091 4.0695
0.9 1.5390 2.5604 3.4835 4.3879
0.95 1.7599 2.7888 3.7465 4.6973

Something we can see from the table is that if your hit chance is \$0.6\$ or lower, this feature doesn't add damage compared to attacking \$n\$ times without disadvantage (the expected damage of that is \$npd\$, so \$0.6, 1.2, 1.8, 2.4\$ for that row). Given that in normal play, hit chances tend to be around \$0.65\$, this feature will add some damage, but not a huge amount unless you combine it with other features that increase your accuracy.

Expected damage (with crits)

The formula gets more complicated if you want to factor in the damage with crits.

Let \$n\$ be the number of regular attacks, \$p\$ be your chance to hit, \$c\$ be your chance to crit, \$d_n\$ be your damage on a normal hit and \$d_c\$ be your extra damage on a crit.

Then the expected damage of a normal attack is \$pd_n + cd_c\$. But the expected damage of an attack with disadvantage is \$p^2d_n + c^2d_c\$.

Then your final expected damage is:

$$\sum_{i=0}^{n-1}(1-p^2)^{i} \left(c^2d_c + p^2d_n + p^2(n-i)(pd_n + cd_c) \right)$$

We are still calculating the probability of hitting on the \$i\$'th attack, then adding its damage with the expected damage of the rest of your normal attack + bonus action attack.

But now we add the term \$c^2d_c\$ to account for the possibility of a crit on the disadvantage attack, and the expected damage of the rest of your attacks is \$(n-i)(pd_n + cd_c)\$.

There are many more variables here, so I'll make a table with some variables fixed. I'll use a crit rate of \$c =1/20\$, and to make it easier to compare to the table without crits I'll use \$d_n = 1\$ and \$d_c = 0.7\$ (which is based on a greatsword user with +3 from strength, obviously the ratio between normal damage and crit damage chances based on a lot of factors).

\$p\$ 1 attack 2 attacks 3 attacks 4 attacks
0.4 0.2314 0.4953 0.7866 1.101
0.45 0.3025 0.6419 1.011 1.403
0.5 0.3855 0.8084 1.259 1.731
0.55 0.4812 0.9938 1.528 2.078
0.6 0.5903 1.197 1.813 2.437
0.65 0.7137 1.415 2.11 2.8
0.7 0.8519 1.647 2.412 3.162
0.75 1.006 1.887 2.715 3.518
0.8 1.176 2.134 3.013 3.864
0.85 1.364 2.381 3.303 4.199
0.9 1.569 2.625 3.582 4.522
0.95 1.793 2.857 3.85 4.835