knitr::opts_chunk$set(echo = TRUE)
devtools::load_all()

monsteR

A list of D&D 5e monsters provided through SRD and some functions to fiddle with them.

Data is taken from the json file shared by u/droiddruid combined with the human readable files from open5e.

Installation

devtools::install_github('oganm/monsteR')

Usage

The package includes a list that include all SRD monsters called monsters. Each element of this list is a list that holds monster attributes

ls(monsters$Acolyte)

monsters$Acolyte$actions

Individual monsters have a special print function (print.monster). When a monster is called, the text taken from open5e is displayed

monsters$Acolyte

The package includes an attack function. This function looks at all available actions of a monster, detects if they have attack rolls and damage dice associated with them, and rolls the dice

attack(monsters$`Bandit Captain`)

If the monster is a spellcaster it will have a spellcasting list which lists spell DC, spell attack bonus and spells. Note that spells are spellList objects from wizaRd package.

monsters$Acolyte$spellcasting

monsters$Acolyte$spellcasting$spells$`Cure Wounds`


oganm/monsteR documentation built on April 22, 2023, 10:34 a.m.