diff --git a/CS.tex b/CS.tex index 1fc7593682ee2222952006bd501f8b0716185ae5..099361d8b62907fa36b2942d174f1a5a8852fdd5 100644 --- a/CS.tex +++ b/CS.tex @@ -48,19 +48,19 @@ adjusted title=Attributes \hint{ 5 | 10 / 20 / 30/ 50 }, remember, ]{name=attributes,column=1,row=3,span=10.2,rowspan=4}{ - \hspace{-.7cm} - \renewcommand{\arraystretch}{1.5} - \addtolength{\tabcolsep}{-0.63em} - \begin{tabular}{@{}X@{}lcccccccccccr@{}} - \hspace{-1em} - & & \tiny{-4} & \tiny{-3} & \tiny{-2} & \tiny{-1} & \tiny{0} & \tiny{1} & \tiny{2} & \tiny{3} & \tiny{4} \\ - \attributeDisplay{Strength}{str} - \attributeDisplay{Dexterity}{dex} - \attributeDisplay{Speed}{spd} - \attributeDisplay{Intelligence}{int} - \attributeDisplay{Wits}{wts} - \attributeDisplay{Charisma}{cha} - \end{tabular}} + \hspace{-0.5em} + \renewcommand{\arraystretch}{1.5} + \addtolength{\tabcolsep}{-0.53em} + \begin{tabular}{lcccccccccc} + & \tiny{-4} & \tiny{-3} & \tiny{-2} & \tiny{-1} & \tiny{0} & \tiny{1} & \tiny{2} & \tiny{3} & \tiny{4} \\ + \showAttribute{Strength}{str} + \showAttribute{Dexterity}{dex} + \showAttribute{Speed}{spd} + \showAttribute{Intelligence}{int} + \showAttribute{Wits}{wts} + \showAttribute{Charisma}{cha} + \end{tabular} + } %---- diff --git a/layout.sty b/layout.sty index 26ca77c1524fa31e682ba4cf9af79b3b7a7c9af8..b827082b4dd96d70cd62f4cb3f10c98c6c66b98d 100644 --- a/layout.sty +++ b/layout.sty @@ -932,7 +932,7 @@ Roll & Result \\ \newcommand{\sqtoc}{\printcontents[\sqarea]{l}{2}{\section*{Summaries}\setcounter{tocdepth}{3}}} -% Change the tocdepth from 2 to 3 in order to output a miniature table of contents on all side quests +% Change the to depth from 2 to 3 in order to output a miniature table of contents on all side quests \newcommand{\sqminitoc}{ \begin{figure*}[t] @@ -980,18 +980,44 @@ Roll & Result \\ \newcommand\currentCircle{} \newcommand{\weeline}{\line(1,0){30} \hspace{.6cm}} +\newcommand\showAttribute[2]{ + \setcounter{track}{-4}% + {#1}% + \whileboolexpr{% + test {\ifnumcomp{\value{track}}{<}{5}}% + }% + {% + &% + \ifnum\value{track}>0% + \ifnum\value{track}>\value{#2}% + \statCircle% + \else% + \statDot% + \fi% + \else% + \ifnum\value{track}>\value{#2}% + {\Large\Square}% + \else% + {\Large\XBox}% + \fi% + \fi% + \stepcounter{track}% + }% + \\% +} + \newcommand\attributeDisplay[2]{ -\setcounter{enc}{-5} -\setcounter{statDots}{\value{#2}} -\large #1 & -\raisebox{2pt}{--} -\Repeat{9}{& -\large\ifnum\value{enc}<\value{statDots}\renewcommand\currentCircle{\statDot}\else\renewcommand\currentCircle{\statCircle}\fi% This decides to use either a statDot (showing a stat value) or an empty statCircle (showing a potential dot) -\ifnum\value{enc}=-1\currentCircle\else\raisebox{2pt}{\currentCircle}\fi% Most circles need a raisebox to appear nicely on a line. The dot representing '0' is large, and doesn't need raised. -\stepcounter{enc} -}% -&\raisebox{2pt}{+} -\\ + \setcounter{enc}{-5} + \setcounter{statDots}{\value{#2}} + \large #1 & + \raisebox{2pt}{--} + \Repeat{9}{& + \large\ifnum\value{enc}<\value{statDots}\renewcommand\currentCircle{\statDot}\else\renewcommand\currentCircle{\statCircle}\fi% This decides to use either a statDot (showing a stat value) or an empty statCircle (showing a potential dot) + \ifnum\value{enc}=-1\currentCircle\else\raisebox{2pt}{\currentCircle}\fi% Most circles need a raisebox to appear nicely on a line. The dot representing '0' is large, and doesn't need raised. + \stepcounter{enc} + }% + &\raisebox{2pt}{+} + \\ } \newcommand{\attributecircles}[1][-5]{\raisebox{0pt}{--}% \setcounter{statDots}{#1}