Skip to content

Commit

Permalink
Add a command to specify expended spell slots (#89)
Browse files Browse the repository at this point in the history
* Add a command to specify expended spell slots

* Add expended slots to the test files

The reference pdfs will follow in a separate commit as they need to be generated first by the github action.

* Update test reference pdfs
  • Loading branch information
Ambossmann authored May 22, 2024
1 parent 3b7dc0e commit bd78982
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 0 deletions.
21 changes: 21 additions & 0 deletions template/character-sheet-commands.tex
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,27 @@
\newcommand{\EighthLevelSpellSlotsTotal}[1]{\renewcommand{\EighthLevelSpellSlotsTotalValue}{#1}}
\newcommand{\NinthLevelSpellSlotsTotal}[1]{\renewcommand{\NinthLevelSpellSlotsTotalValue}{#1}}

% EXPENDED SPELL SLOTS
\newcommand{\FirstLevelSpellSlotsExpendedValue}{}
\newcommand{\SecondLevelSpellSlotsExpendedValue}{}
\newcommand{\ThirdLevelSpellSlotsExpendedValue}{}
\newcommand{\FourthLevelSpellSlotsExpendedValue}{}
\newcommand{\FifthLevelSpellSlotsExpendedValue}{}
\newcommand{\SixthLevelSpellSlotsExpendedValue}{}
\newcommand{\SeventhLevelSpellSlotsExpendedValue}{}
\newcommand{\EighthLevelSpellSlotsExpendedValue}{}
\newcommand{\NinthLevelSpellSlotsExpendedValue}{}

\newcommand{\FirstLevelSpellSlotsExpended}[1]{\renewcommand{\FirstLevelSpellSlotsExpendedValue}{#1}}
\newcommand{\SecondLevelSpellSlotsExpended}[1]{\renewcommand{\SecondLevelSpellSlotsExpendedValue}{#1}}
\newcommand{\ThirdLevelSpellSlotsExpended}[1]{\renewcommand{\ThirdLevelSpellSlotsExpendedValue}{#1}}
\newcommand{\FourthLevelSpellSlotsExpended}[1]{\renewcommand{\FourthLevelSpellSlotsExpendedValue}{#1}}
\newcommand{\FifthLevelSpellSlotsExpended}[1]{\renewcommand{\FifthLevelSpellSlotsExpendedValue}{#1}}
\newcommand{\SixthLevelSpellSlotsExpended}[1]{\renewcommand{\SixthLevelSpellSlotsExpendedValue}{#1}}
\newcommand{\SeventhLevelSpellSlotsExpended}[1]{\renewcommand{\SeventhLevelSpellSlotsExpendedValue}{#1}}
\newcommand{\EighthLevelSpellSlotsExpended}[1]{\renewcommand{\EighthLevelSpellSlotsExpendedValue}{#1}}
\newcommand{\NinthLevelSpellSlotsExpended}[1]{\renewcommand{\NinthLevelSpellSlotsExpendedValue}{#1}}

% CANTRIPS
\newcommand{\CantripSlotAValue}{}
\newcommand{\CantripSlotBValue}{}
Expand Down
15 changes: 15 additions & 0 deletions template/half-spell-sheet/player-input.tex
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
% TOTAL SLOTS
\rput[cc](91.03045507,563.85545107){\LARGE \entryfont \textcolor{primary-indicator-color}{\FirstLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](201.03045507,563.85545107){\LARGE \entryfont \textcolor{primary-indicator-color}{\FirstLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](63.17786559,526.122385345){\footnotesize \entryfont \textcolor{text-color}{\FirstLevelSpellSlotAValue}}
\rput[l](63.17786559,507.455719145){\footnotesize \entryfont \textcolor{text-color}{\FirstLevelSpellSlotBValue}}
Expand Down Expand Up @@ -59,6 +62,9 @@
% TOTAL SLOTS
\rput[cc](343.03044877,847.49771214){\LARGE \entryfont \textcolor{primary-indicator-color}{\SecondLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](453.03044877,847.49771214){\LARGE \entryfont \textcolor{primary-indicator-color}{\SecondLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](315.17785929,812.43171302){\footnotesize \entryfont \textcolor{text-color}{\SecondLevelSpellSlotAValue}}
\rput[l](315.17785929,793.76504682){\footnotesize \entryfont \textcolor{text-color}{\SecondLevelSpellSlotBValue}}
Expand All @@ -84,6 +90,9 @@
% TOTAL SLOTS
\rput[cc](343.03044877,431.71745300){\LARGE \entryfont \textcolor{primary-indicator-color}{\ThirdLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](453.03044877,431.71745300){\LARGE \entryfont \textcolor{primary-indicator-color}{\ThirdLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](315.17785929,396.651053875){\footnotesize \entryfont \textcolor{text-color}{\ThirdLevelSpellSlotAValue}}
\rput[l](315.17785929,377.984387675){\footnotesize \entryfont \textcolor{text-color}{\ThirdLevelSpellSlotBValue}}
Expand All @@ -109,6 +118,9 @@
% TOTAL SLOTS
\rput[cc](592.53044253,847.49771214){\LARGE \entryfont \textcolor{primary-indicator-color}{\FourthLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](702.53044253,847.49771214){\LARGE \entryfont \textcolor{primary-indicator-color}{\FourthLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](564.67785305,812.43171302){\footnotesize \entryfont \textcolor{text-color}{\FourthLevelSpellSlotAValue}}
\rput[l](564.67785305,793.76504682){\footnotesize \entryfont \textcolor{text-color}{\FourthLevelSpellSlotBValue}}
Expand All @@ -134,6 +146,9 @@
% TOTAL SLOTS
\rput[cc](592.53044253,431.16145114){\LARGE \entryfont \textcolor{primary-indicator-color}{\FifthLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](702.53044253,431.16145114){\LARGE \entryfont \textcolor{primary-indicator-color}{\FifthLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](564.67785305,396.09505201){\footnotesize \entryfont \textcolor{text-color}{\FifthLevelSpellSlotAValue}}
\rput[l](564.67785305,377.42838581){\footnotesize \entryfont \textcolor{text-color}{\FifthLevelSpellSlotBValue}}
Expand Down
27 changes: 27 additions & 0 deletions template/spell-sheet/player-input.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
% TOTAL SLOTS
\rput[cc](91.03045507,623.85545107){\LARGE \entryfont \textcolor{primary-indicator-color}{\FirstLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](201.03045507,623.85545107){\LARGE \entryfont \textcolor{primary-indicator-color}{\FirstLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](63.17786559,586.122385345){\footnotesize \entryfont \textcolor{text-color}{\FirstLevelSpellSlotAValue}}
\rput[l](63.17786559,567.455719145){\footnotesize \entryfont \textcolor{text-color}{\FirstLevelSpellSlotBValue}}
Expand All @@ -43,6 +46,9 @@
% TOTAL SLOTS
\rput[cc](91.03045507,319.09665869){\LARGE \entryfont \textcolor{primary-indicator-color}{\SecondLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](201.03045507,319.09665869){\LARGE \entryfont \textcolor{primary-indicator-color}{\SecondLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](63.17786559,284.030259565){\footnotesize \entryfont \textcolor{text-color}{\SecondLevelSpellSlotAValue}}
\rput[l](63.17786559,265.363593365){\footnotesize \entryfont \textcolor{text-color}{\SecondLevelSpellSlotBValue}}
Expand All @@ -62,6 +68,9 @@
% TOTAL SLOTS
\rput[cc](343.03044877,847.49771214){\LARGE \entryfont \textcolor{primary-indicator-color}{\ThirdLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](453.03044877,847.49771214){\LARGE \entryfont \textcolor{primary-indicator-color}{\ThirdLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](315.17785929,812.43171302){\footnotesize \entryfont \textcolor{text-color}{\ThirdLevelSpellSlotAValue}}
\rput[l](315.17785929,793.76504682){\footnotesize \entryfont \textcolor{text-color}{\ThirdLevelSpellSlotBValue}}
Expand All @@ -81,6 +90,9 @@
% TOTAL SLOTS
\rput[cc](343.03044877,546.71745300){\LARGE \entryfont \textcolor{primary-indicator-color}{\FourthLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](453.03044877,546.71745300){\LARGE \entryfont \textcolor{primary-indicator-color}{\FourthLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](315.17785929,511.651053875){\footnotesize \entryfont \textcolor{text-color}{\FourthLevelSpellSlotAValue}}
\rput[l](315.17785929,492.984387675){\footnotesize \entryfont \textcolor{text-color}{\FourthLevelSpellSlotBValue}}
Expand All @@ -100,6 +112,9 @@
% TOTAL SLOTS
\rput[cc](343.03044877,244.63252722){\LARGE \entryfont \textcolor{primary-indicator-color}{\FifthLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](453.03044877,244.63252722){\LARGE \entryfont \textcolor{primary-indicator-color}{\FifthLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](315.17785929,209.566128095){\footnotesize \entryfont \textcolor{text-color}{\FifthLevelSpellSlotAValue}}
\rput[l](315.17785929,190.899461895){\footnotesize \entryfont \textcolor{text-color}{\FifthLevelSpellSlotBValue}}
Expand All @@ -115,6 +130,9 @@
% TOTAL SLOTS
\rput[cc](592.53044253,847.49771214){\LARGE \entryfont \textcolor{primary-indicator-color}{\SixthLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](702.53044253,847.49771214){\LARGE \entryfont \textcolor{primary-indicator-color}{\SixthLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](564.67785305,812.43171302){\footnotesize \entryfont \textcolor{text-color}{\SixthLevelSpellSlotAValue}}
\rput[l](564.67785305,793.76504682){\footnotesize \entryfont \textcolor{text-color}{\SixthLevelSpellSlotBValue}}
Expand All @@ -130,6 +148,9 @@
% TOTAL SLOTS
\rput[cc](592.53044253,621.16145114){\LARGE \entryfont \textcolor{primary-indicator-color}{\SeventhLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](702.53044253,621.16145114){\LARGE \entryfont \textcolor{primary-indicator-color}{\SeventhLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](564.67785305,586.09505201){\footnotesize \entryfont \textcolor{text-color}{\SeventhLevelSpellSlotAValue}}
\rput[l](564.67785305,567.42838581){\footnotesize \entryfont \textcolor{text-color}{\SeventhLevelSpellSlotBValue}}
Expand All @@ -145,6 +166,9 @@
% TOTAL SLOTS
\rput[cc](592.53044253,394.75559013){\LARGE \entryfont \textcolor{primary-indicator-color}{\EighthLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](702.53044253,394.75559013){\LARGE \entryfont \textcolor{primary-indicator-color}{\EighthLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](564.67785305,359.68919101){\footnotesize \entryfont \textcolor{text-color}{\EighthLevelSpellSlotAValue}}
\rput[l](564.67785305,341.02252481){\footnotesize \entryfont \textcolor{text-color}{\EighthLevelSpellSlotBValue}}
Expand All @@ -158,6 +182,9 @@
% TOTAL SLOTS
\rput[cc](592.53044253,207.12412815){\LARGE \entryfont \textcolor{primary-indicator-color}{\NinthLevelSpellSlotsTotalValue}}

% EXPENDED SLOTS
\rput[cc](702.53044253,207.12412815){\LARGE \entryfont \textcolor{primary-indicator-color}{\NinthLevelSpellSlotsExpendedValue}}

% KNOWN SPELLS
\rput[l](564.67785305,172.05772903){\footnotesize \entryfont \textcolor{text-color}{\NinthLevelSpellSlotAValue}}
\rput[l](564.67785305,153.39106283){\footnotesize \entryfont \textcolor{text-color}{\NinthLevelSpellSlotBValue}}
Expand Down
9 changes: 9 additions & 0 deletions tests/full-caster-spell-sheet.tex
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
\CantripSlotH{Cantrip Slot H}

\FirstLevelSpellSlotsTotal{13}
\FirstLevelSpellSlotsExpended{1}
\FirstLevelSpellSlotA{First Level Spell Slot A}
\FirstLevelSpellSlotB{First Level Spell Slot B}
\FirstLevelSpellSlotC{First Level Spell Slot C}
Expand All @@ -55,6 +56,7 @@


\SecondLevelSpellSlotsTotal{13}
\SecondLevelSpellSlotsExpended{2}
\SecondLevelSpellSlotA{Second Level Spell Slot A}
\SecondLevelSpellSlotB{Second Level Spell Slot B}
\SecondLevelSpellSlotC{Second Level Spell Slot C}
Expand All @@ -78,6 +80,7 @@
\SecondLevelSpellSlotMPrepared{True}

\ThirdLevelSpellSlotsTotal{13}
\ThirdLevelSpellSlotsExpended{3}
\ThirdLevelSpellSlotA{Third Level Spell Slot A}
\ThirdLevelSpellSlotB{Third Level Spell Slot B}
\ThirdLevelSpellSlotC{Third Level Spell Slot C}
Expand All @@ -102,6 +105,7 @@


\FourthLevelSpellSlotsTotal{13}
\FourthLevelSpellSlotsExpended{4}
\FourthLevelSpellSlotA{Fourth Level Spell Slot A}
\FourthLevelSpellSlotB{Fourth Level Spell Slot B}
\FourthLevelSpellSlotC{Fourth Level Spell Slot C}
Expand All @@ -126,6 +130,7 @@


\FifthLevelSpellSlotsTotal{9}
\FifthLevelSpellSlotsExpended{5}
\FifthLevelSpellSlotA{Fifth Level Spell Slot A}
\FifthLevelSpellSlotB{Fifth Level Spell Slot B}
\FifthLevelSpellSlotC{Fifth Level Spell Slot C}
Expand All @@ -144,6 +149,7 @@


\SixthLevelSpellSlotsTotal{9}
\SixthLevelSpellSlotsExpended{6}
\SixthLevelSpellSlotA{Sixth Level Spell Slot A}
\SixthLevelSpellSlotB{Sixth Level Spell Slot B}
\SixthLevelSpellSlotC{Sixth Level Spell Slot C}
Expand All @@ -162,6 +168,7 @@


\SeventhLevelSpellSlotsTotal{9}
\SeventhLevelSpellSlotsExpended{7}
\SeventhLevelSpellSlotA{Seventh Level Spell Slot A}
\SeventhLevelSpellSlotB{Seventh Level Spell Slot B}
\SeventhLevelSpellSlotC{Seventh Level Spell Slot C}
Expand All @@ -180,6 +187,7 @@


\EighthLevelSpellSlotsTotal{7}
\EighthLevelSpellSlotsExpended{8}
\EighthLevelSpellSlotA{Eighth Level Spell Slot A}
\EighthLevelSpellSlotB{Eighth Level Spell Slot B}
\EighthLevelSpellSlotC{Eighth Level Spell Slot C}
Expand All @@ -195,6 +203,7 @@


\NinthLevelSpellSlotsTotal{7}
\NinthLevelSpellSlotsExpended{9}
\NinthLevelSpellSlotA{Ninth Level Spell Slot A}
\NinthLevelSpellSlotB{Ninth Level Spell Slot B}
\NinthLevelSpellSlotC{Ninth Level Spell Slot C}
Expand Down
5 changes: 5 additions & 0 deletions tests/half-caster-spell-sheet.tex
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
\CantripSlotK{Cantrip Slot K}

\FirstLevelSpellSlotsTotal{26}
\FirstLevelSpellSlotsExpended{1}
\FirstLevelSpellSlotA{First Level Spell Slot A}
\FirstLevelSpellSlotB{First Level Spell Slot B}
\FirstLevelSpellSlotC{First Level Spell Slot C}
Expand Down Expand Up @@ -77,6 +78,7 @@


\SecondLevelSpellSlotsTotal{19}
\SecondLevelSpellSlotsExpended{2}
\SecondLevelSpellSlotA{Second Level Spell Slot A}
\SecondLevelSpellSlotB{Second Level Spell Slot B}
\SecondLevelSpellSlotC{Second Level Spell Slot C}
Expand Down Expand Up @@ -109,6 +111,7 @@
\SecondLevelSpellSlotSPrepared{True}

\ThirdLevelSpellSlotsTotal{19}
\ThirdLevelSpellSlotsExpended{3}
\ThirdLevelSpellSlotA{Third Level Spell Slot A}
\ThirdLevelSpellSlotB{Third Level Spell Slot B}
\ThirdLevelSpellSlotC{Third Level Spell Slot C}
Expand Down Expand Up @@ -141,6 +144,7 @@
\ThirdLevelSpellSlotSPrepared{True}

\FourthLevelSpellSlotsTotal{19}
\FourthLevelSpellSlotsExpended{4}
\FourthLevelSpellSlotA{Fourth Level Spell Slot A}
\FourthLevelSpellSlotB{Fourth Level Spell Slot B}
\FourthLevelSpellSlotC{Fourth Level Spell Slot C}
Expand Down Expand Up @@ -173,6 +177,7 @@
\FourthLevelSpellSlotSPrepared{True}

\FifthLevelSpellSlotsTotal{19}
\FifthLevelSpellSlotsExpended{5}
\FifthLevelSpellSlotA{Fifth Level Spell Slot A}
\FifthLevelSpellSlotB{Fifth Level Spell Slot B}
\FifthLevelSpellSlotC{Fifth Level Spell Slot C}
Expand Down
Binary file modified tests/reference/full-caster-spell-sheet.pdf
Binary file not shown.
Binary file modified tests/reference/half-caster-spell-sheet.pdf
Binary file not shown.

0 comments on commit bd78982

Please sign in to comment.