diff --git a/arms.sty b/arms.sty index 67b67443ea6708f7dab3f13cc8e5584e5b4edb49..64a559d82cb6608ed39884d994af75db87c59227 100644 --- a/arms.sty +++ b/arms.sty @@ -118,11 +118,13 @@ \newcommand{\woodaxe}{\weapon[\addtocounter{heft}{1}]{Wood Axe}{1}{2}} % SHIELDS -\newcommand{\longbow}{Longbow} \newcommand{\bucklar}{\shield{Bucklar}{0}} \newcommand{\roundshield}{\shield{Round}{1}} \newcommand{\kiteshield}{\shield{Kite}{2}} +% RANGED WEAPONS +\newcommand{\longbow}{Longbow} + % ARMOUR diff --git a/csCommands.sty b/csCommands.sty index 5aaba489c0bf6df6c3086b93a53e9dac51986603..8c8af6d7cfc3e6093f7be063f66685a1b6bf1505 100644 --- a/csCommands.sty +++ b/csCommands.sty @@ -72,3 +72,60 @@ \newcommand\charSpellList{} + +%%%%% Show Dots Commands %%%%% + +\newcounter{statCircles} +\newcounter{statDots} + +\newcommand\statCircle[1][\large]{#1\textbf{\Circle}} +\newcommand\statDot[1][\large]{#1\textbf{\CIRCLE}} +\newcommand\currentCircle{} +\newcommand{\weeline}{\line(1,0){30} \hspace{.6cm}} + +\newcommand\showAttribute[1]{ + \setcounter{track}{-4}% + {#1}% + \whileboolexpr{% + test {\ifnumcomp{\value{track}}{<}{5}}% + }% + {% + &% + \ifnum\value{track}>0% + \ifnum\value{track}>\value{#1}% + \statCircle% + \else% + \statDot% + \fi% + \else% + \ifnum\value{track}=0% + \raisebox{2pt}{\statDot[\footnotesize]}% + \else% + \ifnum\value{#1}>\value{track}% + {\Large\Square}% + \else% + {\Large\XBox}% + \fi% + \fi% + \fi% + \stepcounter{track}% + }% + \\% +} + + + +\newcommand{\skill}[1]{ + \setcounter{statCircles}{3} + \addtocounter{statCircles}{-\value{#1}} + #1 \dotfill & + \Repeat{\value{#1}}{\statDot}\Repeat{\value{statCircles}}{\statCircle}\\ + \stepcounter{track} +} + +\newcommand\emptySkill{% + \dotfill & % + \Repeat{3}{\statCircle}% + \\% +} + diff --git a/layout.sty b/layout.sty index 71cae01416f7343ddc759942caaaf4dbed19f7a0..09663b047ef832c6cfbf4d412bd9e619a60fc787 100644 --- a/layout.sty +++ b/layout.sty @@ -57,6 +57,44 @@ \pgfusepath{fill}% }% + +%%%%% Common Commands %%%%% + +% make repeating function +\newcommand{\Repeat}[1]{% + \expandafter\@Repeat\expandafter{\the\numexpr #1\relax}% +} + +\def\@Repeat#1{% + \ifnum#1>0 + \expandafter\@@Repeat\expandafter{\the\numexpr #1-1\expandafter\relax\expandafter}% + \else + \expandafter\@gobble + \fi +} +\def\@@Repeat#1#2{% + \@Repeat{#1}{#2}#2% +} + + +% This allows us to compare two strings. What other wonders will LaTeX bring in the future? Perhaps subtraction syntax one day. +\ExplSyntaxOn +\NewExpandableDocumentCommand{\ifStrSame}{mmmm} + { + \str_if_eq:eeTF { #1 } { #2 } { #3 } { #4 } + } +\ExplSyntaxOff + +% This function divides a number by two, and rounds it up. +\newcommand\roundUp[1]{% + \ifodd\value{#1}% + \stepcounter{#1}% + \fi% + \divide\value{#1} by 2% + \addtocounter{#1}{0}% Think this line's pointless? Try removing it and seeing what happens - I dare you. +} + + %%%%% Add fancy page chapter sides %%%%% \newcounter{chapshift} @@ -187,39 +225,6 @@ bookmarks=true]% } } -% and make repeating function -\newcommand{\Repeat}[1]{% - \expandafter\@Repeat\expandafter{\the\numexpr #1\relax}% -} - -\def\@Repeat#1{% - \ifnum#1>0 - \expandafter\@@Repeat\expandafter{\the\numexpr #1-1\expandafter\relax\expandafter}% - \else - \expandafter\@gobble - \fi -} -\def\@@Repeat#1#2{% - \@Repeat{#1}{#2}#2% -} - -% This allows us to compare two strings. What other wonders will LaTeX bring in the future? Perhaps subtraction syntax one day. -\ExplSyntaxOn -\NewExpandableDocumentCommand{\ifStrSame}{mmmm} - { - \str_if_eq:eeTF { #1 } { #2 } { #3 } { #4 } - } -\ExplSyntaxOff - -% This function divides a number by two, and rounds it up. -\newcommand\roundUp[1]{% - \ifodd\value{#1}% - \stepcounter{#1}% - \fi% - \divide\value{#1} by 2% - \addtocounter{#1}{0}% Think this line's pointless? Try removing it and seeing what happens - I dare you. -} - \newcommand{\chapnumfont}{ \fontsize{50}{0} \selectfont @@ -236,10 +241,7 @@ bookmarks=true]% \setcounter{encnum}{1} \newcommand{\sqarea}{town} -\newcommand{\headingtype}{CHAPTER} - -\newcommand\outline[2][7]{\contour[#1]{black}{\textcolor{white}{#2}}} -\contourlength{0.1em} +%%%%% Image Commands %%%%% \newcommand{\pic}[1]{ \noindent% @@ -531,7 +533,6 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west) } } - \newtcolorbox{boxtext}[1][]{ colback=white, before={\paragraph*{}\noindent}, @@ -545,9 +546,17 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west) \end{wrapfigure}% } +%%%%% Header Formatting %%%%% + % Chapter Heading Color + \colorlet{chapnumcol}{black!100} +\newcommand{\headingtype}{CHAPTER} + +\newcommand\outline[2][7]{\contour[#1]{black}{\textcolor{white}{#2}}} +\contourlength{0.1em} + %%%%% Section Formatting %%%%% \newcommand{\frontpage}[2][\expandafter\MakeUppercase \jobname]{ @@ -1027,61 +1036,6 @@ Roll & Result \\ \vspace{3em} } -%%%%% Character Sheet Commands - -\newcounter{statCircles} -\newcounter{statDots} - -\newcommand\statCircle[1][\large]{#1\textbf{\Circle}} -\newcommand\statDot[1][\large]{#1\textbf{\CIRCLE}} -\newcommand\currentCircle{} -\newcommand{\weeline}{\line(1,0){30} \hspace{.6cm}} - -\newcommand\showAttribute[1]{ - \setcounter{track}{-4}% - {#1}% - \whileboolexpr{% - test {\ifnumcomp{\value{track}}{<}{5}}% - }% - {% - &% - \ifnum\value{track}>0% - \ifnum\value{track}>\value{#1}% - \statCircle% - \else% - \statDot% - \fi% - \else% - \ifnum\value{track}=0% - \raisebox{2pt}{\statDot[\footnotesize]}% - \else% - \ifnum\value{#1}>\value{track}% - {\Large\Square}% - \else% - {\Large\XBox}% - \fi% - \fi% - \fi% - \stepcounter{track}% - }% - \\% -} - - -\newcommand{\skill}[1]{ - \setcounter{statCircles}{3} - \addtocounter{statCircles}{-\value{#1}} - #1 \dotfill & - \Repeat{\value{#1}}{\statDot}\Repeat{\value{statCircles}}{\statCircle}\\ - \stepcounter{track} -} - -\newcommand\emptySkill{% - \dotfill & % - \Repeat{3}{\statCircle}% - \\% -} - \newcommand\hint[1]{% \iftoggle{examplecharacter}{}% {\small\textcolor{gray}{(#1)}} diff --git a/test.tex b/test.tex index 30351fa5ca9ddd6ed78468012a760efea19b6b4d..138b4edc009d272655318be06cfd3b5c7b59e177 100644 --- a/test.tex +++ b/test.tex @@ -64,7 +64,6 @@ Current day should equal \arabic{r4b}. & \lii Black Queen \\ & \lii Green Queen \\ - \end{encounters} \begin{rollchart}