Measurements of probability to win in DnD-style battle
The most of d20-based systems uses next rule:
- throw d20 and add modificators to attack an attribute;
- throw d20 and add modificators to calc the defence;
- compare:
- if attack is more - attack wins
- if attack is equal or less than defence - defence wins
This repository contains some scripts with logic to calculate probability for attacker to win against a defender with defined dice parameters.
Probability to win the attak:
Probability to roll less than:
Probability to roll exactly: