spell_list {dndR}R Documentation

List Spells Based on Criteria

Description

Query list of all Dungeons & Dragons spells based on partial string matches between user inputs and the relevant column of the spell information data table. Currently supports users querying the spell list by spell name, which class lists allow the spell, spell's level, the school of magic the spell belongs in, whether or not the spell can be cast as a ritual, and the time it takes to cast the spell. All character arguments are case-insensitive (note that the ritual argument expects a logical). Any argument set to 'NULL' (the default) will not be used to include/exclude spells from the returned set of spells

Usage

spell_list(
  name = NULL,
  class = NULL,
  level = NULL,
  school = NULL,
  ritual = NULL,
  cast_time = NULL
)

Arguments

name

(character) text to look for in spell names

class

(character) character class(es) with the spell(s) on their list

level

(character) "cantrip" and/or the minimum required spell slot level

school

(character) school(s) of magic within which the spell belongs (e.g., 'evocation', 'necromancy', etc.)

ritual

(logical) whether the spell can be cast as a ritual

cast_time

(character) either the phase of a turn needed to cast the spell or the in-game time required (e.g., "reaction", "1 minute", etc.)

Value

(dataframe) 10 columns of information with one row per spell(s) that fit(s) the user-specified criteria. If no spells fit the criteria, returns a message to that effect instead of a data object

Examples

# Search for evocation spells with 'fire' in the name that a wizard can cast
spell_list(name = "fire", class = "wizard", school = "evocation")


[Package dndR version 2.0.0 Index]