Currently, spellcasting classes can cast any spell, including those not normally eligible to be cast by a given class. For example, beacon-of-hope is to be cast by clerics only, but could currently be cast by a wizard.
Possible Solutions
Logic could be established to check the result of chosenClass against the contents of data.classes.name.toLowerCase(), with the latter being found in /api/spells. If chosenClass is equal to any of the items in data.classes.name.toLowerCase(), then proceed with current spell. If not, choose a new spell.
Description
Currently, spellcasting classes can cast any spell, including those not normally eligible to be cast by a given class. For example,
beacon-of-hope
is to be cast by clerics only, but could currently be cast by a wizard.Possible Solutions
Logic could be established to check the result of
chosenClass
against the contents ofdata.classes.name.toLowerCase()
, with the latter being found in/api/spells
. IfchosenClass
is equal to any of the items indata.classes.name.toLowerCase()
, then proceed with current spell. If not, choose a new spell.