diff --git a/docs.tex b/docs.tex index 21e1806ac1d9b71109a346131e2ebd99f387e0bb..102b5efab5a902a7c653a36a0a80b333f9f289ed 100644 --- a/docs.tex +++ b/docs.tex @@ -135,6 +135,17 @@ And you can list dice, with results, with the `\texttt{dlist}' environment. \subsection{Magic} +\subsubsection{Spells} + +Spells automatically calculate everything they can. + +\spell{Quake}% Name + {Earth}% Spheres + {Large, Twisted, Ranged}% Enhancements + {Caving}% Skill + {GrrrrrrrrglllllllllllbrrrrrrrrrrrrrrBBBBBBB}% Description + + \subsubsection{Magical Items} This is a magical item. diff --git a/layout.sty b/layout.sty index 00871d40690fbc076a966f06a8aba916d4a8dfa8..627fc45408d1b08892f6c35b322bad151beb7bf2 100644 --- a/layout.sty +++ b/layout.sty @@ -817,6 +817,24 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west) \newcolumntype{Y}{>{\centering\arraybackslash}X} \newcolumntype{L}{>{\raggedright\arraybackslash}X} +% 1 = Name +% 2 = Spheres +% 3 = Enhancements +% 4 = Skill +% 5 = Description + +\newcommand{\spell}[5]{ + \setcounter{spelllevel}{1} + \foreach \s in {#3}{ + \stepcounter{spelllevel} + } + \subsubsection[\textbf{#1}: #5. (\textit{#4})]{#1} + \index[spells]{\textbf{#1}: #5. (Cost: \arabic{spelllevel}, Spheres: #2, Skill: #4)} + + {\small\it Spheres: #2, \glsentrytext{mp} Cost: \arabic{spelllevel}, Enhancements: #3, \underline{Skill: #4}} + \vspace{.5em}\afterparnoindent +} + \newcommand{\magicitem}[7]{% \vspace{1em}\needspace{1em}\noindent\textbf{#1}% \index{Magical Item!#1}