Skip to content
Snippets Groups Projects
Unverified Commit d86a2367 authored by Malin Freeborn's avatar Malin Freeborn
Browse files

make negative to 0 attributes squares

parent 5d5072ab
No related branches found
No related tags found
No related merge requests found
......@@ -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}
}
%----
......
......@@ -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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment