matsavage / DND-5e-LaTeX-Character-Sheet-Template

LaTeX package to typeset character sheets for the fifth edition of the "world's greatest roleplaying game".
96 stars 49 forks source link

Reset spellslot prepared colour #106

Closed PJBrs closed 2 months ago

PJBrs commented 2 months ago

Hi Mat,

Commit message basically says it all:

Once a spellslot was set as prepared, it would remain set as prepared for any subsequent pages. This patch allows the user to also unset a spellslot as prepared.

I found this out while implementing overflow spell pages for your template in dungeon-sheets, and noticed that spellslots kept being listed as prepared, even when I explicitly set them as not prepared.

matsavage commented 2 months ago

Makes sense. Would you mind adding an example of this to the test sheets.

ie. Setting and then unsetting a slot and verifying it’s not filled and maybe also setting, unsetting and then resetting and verifying it’s set

Happy to merge after that

edit: just do this to one that would already be set/unset there’s no need to regenerate the comparison sheets

PJBrs commented 2 months ago

Done, you'll see that the second spell page has two spellslots set as unprepared, which were prepared at the first page. I'll admit that I didn't make a character that had three spell pages, with one spell slot prepared, than unprepared, than prepared again. But I think the above exhibits the principle well enough, I hope you'll agree :-)

matsavage commented 2 months ago

Looks great, thanks for the contribution