Currently the spell casting system is lacking, only having a get_spell and get_spells command which only prints out existing information
It should be linked to the new mana system in that:
/cast (single use spell name) should apply the energy modification of the spell to the user's energy counter
(It should error if the user tries to use a loop spell)
/toggle (loop spell) should in some way enable a looped spell
/end_turn should apply all the transformations that are currently enabled in the order they were enabled in
It seems reasonable to simply hold toggled spells in memory as it is unlikely for the bot to be restarted midway through combat, which saves having to create a new table (this may need to be done in future, to keep the database normalized each enabled spell should have its own row with the character ID it is enabled for)
/end_combat should disable all toggled spells
As the bot knows about the cast time for spells also, it could also ensure the user does not go over their action limit per turn, however this is out of scope for this change and would cause issues when action count is modified by things other than spell casting (like for example stealing an action from another character, taking an action to simply punch someone, etc)
Currently the spell casting system is lacking, only having a get_spell and get_spells command which only prints out existing information
It should be linked to the new mana system in that:
/cast (single use spell name) should apply the energy modification of the spell to the user's energy counter (It should error if the user tries to use a loop spell)
/toggle (loop spell) should in some way enable a looped spell
/end_turn should apply all the transformations that are currently enabled in the order they were enabled in
/end_combat should disable all toggled spells
As the bot knows about the cast time for spells also, it could also ensure the user does not go over their action limit per turn, however this is out of scope for this change and would cause issues when action count is modified by things other than spell casting (like for example stealing an action from another character, taking an action to simply punch someone, etc)