maxqwerty / DiceBattleProba

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dice Battle result Probability

Measurements of probability to win in DnD-style battle

Rules

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.

Formulas

Probability to win the attak:

Probability to roll less than:

Probability to roll exactly:

About


Languages

Language:Jupyter Notebook 99.5%Language:Python 0.5%