knitr::opts_chunk$set(echo = TRUE) devtools::load_all() set.seed(1)
A list of D&D 5e spells and some functions to fiddle with them.
Spell data taken from https://github.com/thebombzen/grimoire, originally https://github.com/ephe/grimoire/.
Dice rolls are taken from \@FightClubXML when possible, inferred from text using regex when not.
devtools::install_github('oganm/wizaRd')
The package includes a list that include all 5e spells called spells
. Each element of this list is a list that holds different attributes of the spells.
spells$`Acid Splash` %>% ls spells$`Acid Splash`$components
Individual spells have a special print function (print.spell
). When a spell is called the text for the spell is printed and any dice roll found to be associated with the spell based on the text is rolled
spells$Immolation
The spells
object also has a special print function (print.spellList
).
head(spells)
A few utility functions exist to create subset spellList
s
spells %>% filterSpells(level=c(0,1),class= 'bard',sources='PHB',school='evocation') makeBook(level=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.