From ac9ab800d7276b09ebffb7e52fed41f04713bf04 Mon Sep 17 00:00:00 2001 From: Malin Freeborn <malinfreeborn@posteo.net> Date: Mon, 28 Aug 2023 13:17:13 +0200 Subject: [PATCH] add \roll with \tn command --- layout.sty | 11 ++++++++++- stats.sty | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/layout.sty b/layout.sty index 37048c5b..1243a2d6 100644 --- a/layout.sty +++ b/layout.sty @@ -324,10 +324,19 @@ bookmarks=true]% %%% \tn shows a tie number. -\newcommand\tn[1]{% +\newcounter{tn} +\setcounter{tn}{7} +\newcommand\tn[1][\arabic{tn}]{% \gls{tn}~#1% } +\newcommand\roll[2]{% + \setcounter{tn}{7}% + \addtocounter{tn}{\value{#1}}% + \addtocounter{tn}{\value{#2}}% + #1 + #2% +} + %%% The dice-face (\dicef) command shows an actual die, or multiple %%% dice, equal to a number. The optional argument lets it show %%% as \large or similar. diff --git a/stats.sty b/stats.sty index 4e01db25..b4c3c234 100644 --- a/stats.sty +++ b/stats.sty @@ -854,7 +854,7 @@ Viscid (on a tie, the attacker \emph{must} inflict Damage, but the weapon sticks into the body, \setcounter{track}{\value{str}}% \addtocounter{track}{7}% - \tn{\arabic{track}} to pull out)% + \tn[\arabic{track}] to pull out)% } \newcommand{\amphibious}{ -- GitLab