Decided to work this out. Basically as I understand it all melee rolls are between two 20 sided dice, the attacker's roll having a positive or negative modifier based on the difference between the attackers' and defender's melee and evasion. Ties go to the defender.
So this amounts to two rolls, each having a range of 20, with those two ranges offset against one another by some amount. I.e., 5-24 vs 1-20, if melee is 4 more than evasion.
So first you work out the chance that both rolls occur within the overlapping region of the ranges. That's the fraction of pairings where both values are within the overlap, divided by the total number of pairings. Easy enough. Within our example, rolls between 5 and 20 are within the overlap. Range is 16, making the number of pairings within the overlap 16^2. Total number of pairings would be 20^2.
Then you work out the number of possible ties within the overlap. That's just the number of values within the overlap. 5 through 20 in our example, making 16 tied pairings.
Then you work out the total number of wins within the overlap, which is just half the number of non-ties within the overlap (since there will be identical number of non-tied wins and losses, statistically, within any overlap region).
If melee is greater than evasion, pairings outside the overlap are automatic wins. If melee is less than evasion, pairings outside the overlap are automatic losses. So chance of win outside overlap is always either 1 or 0 depending on whether melee is higher than evasion.
So the formula for hit chance becomes "chance of being outside overlap * chance of win outside overlap + chance of being inside overlap * chance of win inside overlap".
Here's the table, indexed by "melee minus evasion". Anything beyond these values are automatic hits or misses.
For hair-pulling fun, you can raise "one minus the appropriate value" by the power of N next time you miss N times in a row and die. That'll be the chance of that happening.
So this amounts to two rolls, each having a range of 20, with those two ranges offset against one another by some amount. I.e., 5-24 vs 1-20, if melee is 4 more than evasion.
So first you work out the chance that both rolls occur within the overlapping region of the ranges. That's the fraction of pairings where both values are within the overlap, divided by the total number of pairings. Easy enough. Within our example, rolls between 5 and 20 are within the overlap. Range is 16, making the number of pairings within the overlap 16^2. Total number of pairings would be 20^2.
Then you work out the number of possible ties within the overlap. That's just the number of values within the overlap. 5 through 20 in our example, making 16 tied pairings.
Then you work out the total number of wins within the overlap, which is just half the number of non-ties within the overlap (since there will be identical number of non-tied wins and losses, statistically, within any overlap region).
If melee is greater than evasion, pairings outside the overlap are automatic wins. If melee is less than evasion, pairings outside the overlap are automatic losses. So chance of win outside overlap is always either 1 or 0 depending on whether melee is higher than evasion.
So the formula for hit chance becomes "chance of being outside overlap * chance of win outside overlap + chance of being inside overlap * chance of win inside overlap".
Here's the table, indexed by "melee minus evasion". Anything beyond these values are automatic hits or misses.
For hair-pulling fun, you can raise "one minus the appropriate value" by the power of N next time you miss N times in a row and die. That'll be the chance of that happening.
Code:
-18 0.0025 -17 0.0075 -16 0.015 -15 0.025 -14 0.0375 -13 0.0525 -12 0.07 -11 0.09 -10 0.1125 -9 0.1375 -8 0.165 -7 0.195 -6 0.2275 -5 0.2625 -4 0.3 -3 0.34 -2 0.3825 -1 0.4275 0 0.475 1 0.525 2 0.5725 3 0.6175 4 0.66 5 0.7 6 0.7375 7 0.7725 8 0.805 9 0.835 10 0.8625 11 0.8875 12 0.91 13 0.93 14 0.9475 15 0.9625 16 0.975 17 0.985 18 0.9925 19 0.9975
Comment