Bonus Spell Slots
This came up in a PR discussion.
It'd be useful to be able to have conditions that provide bonus spell slots. Things that would use that are, at least, Rary's Mnemonic Enhancer and Precocious Apprentice.
In browsing the original code, it looks like one of the dispatchers might have been intended to support this (my recollection was maybe 57 or 58). However, if that was the case, it got dropped.
Noting: Dragon Disciple would use this.
Noting: Dragon Disciple would use this.
Very prescient 😆
So assuming we add a dispatch for this:
- What info should be sent out in the event object? I'm guessing class enum is enough.
- I'm thinking the event object should contain a list of bonus slots per level, and the recipients should be able to increment (or decrement, for stuff that requires sacrificing slots e.g. archmage).
Thoughts? Pinging @Sagenlicht @doug1234 @anatoliy-savchak @shartte
Another use case is rings of wizardry.
What those do is double your inherent number of slots for a given level. However, it only doubles the base number. So, a 3rd level specialist wizard with a ring of wizardry 1 would get 2 extra 1st level slots. They wouldn't get 3, because the specialist slot is not doubled, and also the bonus slots from high intelligence aren't doubled.
So, the callback needs to be able to tell how many (effective) levels of the relevant class the character has. I guess that's easily available with just the class enum, though.
So assuming we add a dispatch for this:
- What info should be sent out in the event object? I'm guessing class enum is enough.
- I'm thinking the event object should contain a list of bonus slots per level, and the recipients should be able to increment (or decrement, for stuff that requires sacrificing slots e.g. archmage).
Thoughts? Pinging @Sagenlicht @doug1234 @anatoliy-savchak @shartte
Sounds great, don't think more is needed.
Looks good
This would also be used by loremaster
I've re-integrated event type 58 (in python now called ET_OnGetSpellsPerDayMod), which was sort of used for this. Curiously, it was only used for Sorcerer Spells Per Day, and then only as part of the Action Check for casting. However no condition actually reacted to this event, so might as well repurpose it.
The relevant event object is: (type 18)
https://github.com/GrognardsFromHell/TemplePlus/blob/c2f7bd33c269a076177391c508062b5bee7695f3/TemplePlus/python/python_dispatcher.cpp#L1176
Though come to think of it, most of the fields should be read only, heh.
Can anyone verify it's working as intended?
Sweet!