Could it be that the described scenario didn't break in a recent update but was never implemented? Because _filterNonPreparedSpells does receive the complete spell list. But the spell Disguise Self for a sorcerer
Is not a cantrip (lvl 1 spell)
Has the prepared mode
Has preparation.prepared set to false in my test
Is the latter supposed to be true? Otherwise, we would have to add a check for classes (or class features), which is what I did in this PR. Spells for these classes are now considered always prepared:
Bard
Ranger
Sorcerer
If there are additional classes or subclasses missing, it might be worth thinking about checking class features.
I don't know if there is a subclass that adds spellcasting with "always prepared" spells.
https://github.com/espositos/fvtt-tokenactionhud/commit/50c2da3a376e08e80a30d39f9395af367cf76d3c didn't fix #240 for me. Maybe the following is a starting point for you.
Could it be that the described scenario didn't break in a recent update but was never implemented? Because
_filterNonPreparedSpells
does receive the complete spell list. But the spell Disguise Self for a sorcererprepared
modepreparation.prepared
set tofalse
in my testIs the latter supposed to be
true
? Otherwise, we would have to add a check for classes (or class features), which is what I did in this PR. Spells for these classes are now considered always prepared:If there are additional classes or subclasses missing, it might be worth thinking about checking class features. I don't know if there is a subclass that adds spellcasting with "always prepared" spells.