calculate()
and it takes five arguments: Hit Points, Armor Class, Damage per Round, Attack Bonus, and Save DC. It uses the arguments to calculate the monster's Challenge Rating as described in the Dungeons & Dragons 5th Edition Dungeon Master's Guide.calculateWithDice()
to enter Damage per Round in the dice string format used in the D&D sourcebooks. When this function is used, the Damage per Round is calculated as an average of the dice formula provided. This is then provided to the calculate()
function to return the CR value.package.json
contains scripts for compiling the Coffeescript and running tests locally. To get the project up and running locally is very simple:npm run test
or npm run test:watch
.dnd-5e-cr-calculator
package is released under the MIT license.