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

make \randomtwo simple increment

parent c54c5ac5
Branches
Tags
No related merge requests found
...@@ -517,10 +517,10 @@ ...@@ -517,10 +517,10 @@
} }
\newcommand{\basilisk}{ \newcommand{\basilisk}{
\randomthree\addtocounter{age}{5}\randomtwo\addtocounter{random}{1} \randomthree\addtocounter{age}{5}\randomtwo\addtocounter{r2}{1}
\animal{\arabic{age}}% STRENGTH \animal{\arabic{age}}% STRENGTH
{-2}% DEXTERITY {-2}% DEXTERITY
{\arabic{random}}% SPEED {\arabic{r2}}% SPEED
{0}% WITS {0}% WITS
{4}% DR {4}% DR
{2}% AGGRESSION {2}% AGGRESSION
......
...@@ -164,6 +164,10 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west) ...@@ -164,6 +164,10 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)
\setcounter{secnumdepth}{1} \setcounter{secnumdepth}{1}
} }
\newcounter{r2}
\setcounter{r2}{1}
\newcounter{r3}
\setcounter{r3}{2}
\newcounter{enc} \newcounter{enc}
\newcounter{list} \newcounter{list}
\newcounter{spelllevel} \newcounter{spelllevel}
...@@ -272,13 +276,9 @@ Roll & Result \\ ...@@ -272,13 +276,9 @@ Roll & Result \\
{\setcounter{age}{\value{random}}} {\setcounter{age}{\value{random}}}
} }
\newcommand{\randomtwo}{ \newcommand{\randomtwo}{
\random \ifnumcomp{\value{r2}}{>}{2}{\setcounter{r2}{1}}{\addtocounter{r2}{1}}
\whileboolexpr{
test {\ifnumcomp{\value{random}}{>}{2}}
}
{\addtocounter{random}{-2}}
{\setcounter{enc}{\value{random}}}
} }
\newcommand{\mapentry}[1]{\addtocounter{list}{1}\subsubsection{\arabic{list}: #1}} \newcommand{\mapentry}[1]{\addtocounter{list}{1}\subsubsection{\arabic{list}: #1}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment