D&D 5e Calculations Using Anydice

Hi Everyone! This is a compilation page of useful Anydice functions and calculations used in the Don’t Stop Thinking channel. Link: http://anydice.com/

The purpose of the damage calculator is to give players who are interested in dice probabilities a peek into the thought process the designers of RPGs put into the design of the games.

In this page I will be covering the 5th Edition Dungeons & Dragons calculations. I will update this page as I cover more calculations in the channel.

What you see below is the Basic Damage Calculation function which will be modified for different calculations.

\**** Damage calculator ****\

function: attackroll ROLL:n vs AC:n {
if ROLL >= CRITROLL { result: CRITDAMAGE }
if ROLL = 1 { result: 0 }
if ROLL + PROFICIENCY + ATTACKMOD + ACCBONUS >= AC { result: DAMAGE }
result: 0
}

\looped against enemy AC from 15-20\
ENEMYAC: d{15..20}

ATTACKMOD: 3
DMGBONUS: 0
PROFICIENCY: 2
ACCBONUS: 0
CRITROLL: 20
ATTACKTIMES: 1
DAMAGE: 1d8 + ATTACKMOD + DMGBONUS
CRITDAMAGE: 2d8 + ATTACKMOD + DMGBONUS
output ATTACKTIMESd[attackroll d20 vs ENEMYAC] named "Longsword +2 proficiency +3 Attack modifier"

This is the shortcut to the code above: http://anydice.com/program/d080

This is the Master List containing all the code compiled thus far: http://anydice.com/program/d0ac

 

https://youtu.be/rbRtpNq9SMc

It can get pretty messy as more codes are added, so be warned. For individual, separated calculations, refer to the list below.

Difference between Fighting Style: Dueling and Archery

\**** Damage calculator duelling Vs archery ****\

function: attackroll ROLL:n vs AC:n {
if ROLL >= CRITROLL { result: CRITDAMAGE }
if ROLL = 1 { result: 0 }
if ROLL + PROFICIENCY + ATTACKMOD + ACCBONUS >= AC { result: DAMAGE }
result: 0
}

\looped against enemy AC from 15-20\
ENEMYAC: d{15..20}

ATTACKMOD: 3
DMGBONUS: 2
PROFICIENCY: 2
ACCBONUS: 0
CRITROLL: 20
ATTACKTIMES: 1
DAMAGE: 1d8 + ATTACKMOD + DMGBONUS
CRITDAMAGE: 2d8 + ATTACKMOD + DMGBONUS
output ATTACKTIMESd[attackroll d20 vs ENEMYAC] named "Longsword with dueling"

ATTACKMOD: 3
DMGBONUS: 0
PROFICIENCY: 2
ACCBONUS: 2
CRITROLL: 20
ATTACKTIMES: 1
DAMAGE: 1d8 + ATTACKMOD + DMGBONUS
CRITDAMAGE: 2d8 + ATTACKMOD + DMGBONUS
output ATTACKTIMESd[attackroll d20 vs ENEMYAC] named "Longbow with archery"

This is the shortcut to the code above: http://anydice.com/program/d082

 

Attacking with Advantage

\**** Damage calculator normal Vs advantage ****\

function: attackroll ROLL:n vs AC:n {
if ROLL >= CRITROLL { result: CRITDAMAGE }
if ROLL = 1 { result: 0 }
if ROLL + PROFICIENCY + ATTACKMOD + ACCBONUS >= AC { result: DAMAGE }
result: 0
}

\looped against enemy AC from 15-20\
ENEMYAC: d{15..20}

ATTACKMOD: 3
DMGBONUS: 0
PROFICIENCY: 2
ACCBONUS: 0
CRITROLL: 20
ATTACKTIMES: 1
DAMAGE: 1d8 + ATTACKMOD + DMGBONUS
CRITDAMAGE: 2d8 + ATTACKMOD + DMGBONUS
output ATTACKTIMESd[attackroll d20 vs ENEMYAC] named "normal attack"

ATTACKMOD: 3
DMGBONUS: 0
PROFICIENCY: 2
ACCBONUS: 0
CRITROLL: 20
ATTACKTIMES: 1
DAMAGE: 1d8 + ATTACKMOD + DMGBONUS
CRITDAMAGE: 2d8 + ATTACKMOD + DMGBONUS
output ATTACKTIMESd[attackroll [highest 1 of 2d20] vs ENEMYAC] named "attack with advantage"

This is the shortcut to the code above: http://anydice.com/program/d159

RSS
Follow by Email
Facebook
Facebook
YouTube
YouTube