diff options
Diffstat (limited to 'incantesimi/incantesimi.cmd.tex')
-rw-r--r-- | incantesimi/incantesimi.cmd.tex | 70 |
1 files changed, 47 insertions, 23 deletions
diff --git a/incantesimi/incantesimi.cmd.tex b/incantesimi/incantesimi.cmd.tex index b2e6146..b294498 100644 --- a/incantesimi/incantesimi.cmd.tex +++ b/incantesimi/incantesimi.cmd.tex @@ -5,6 +5,7 @@ \usepackage[OT1]{fontenc} \usepackage{pgfkeys} \usepackage{tikz} +\usepackage{ifthen} \usetikzlibrary{calc} \usetikzlibrary{shapes.multipart} @@ -29,7 +30,9 @@ %\fontseries{c}\fontshape{sc} -\tikzstyle{carta}=[rectangle,minimum width=4.8cm,minimum height=7cm,outer sep=0,use as bounding box] +\tikzstyle{carta}=[rectangle,minimum width=4.8cm,minimum height=7cm,outer sep=0,use as bounding box +% ,ultra thin,draw %uncomment to show card boxes! +] \tikzstyle{title label}=[rectangle,text=blue!80!green!75!black,minimum height=2\baselineskip,font={\small},inner sep=1mm,text width=4.6cm,align=flush center] @@ -45,7 +48,7 @@ \tikzstyle{angles label}=[rectangle split,rectangle split parts=2,rectangle split part align=left,text=blue!50!black,font=\tiny,align=justify] -\tikzstyle{prep label}=[rectangle split,rectangle split parts=2,rectangle split part align=left,draw,ultra thin,minimum width=0.333*4.8cm,text=yellow!10!black,inner xsep=0.1em,inner ysep=0.29em,font={\it\tiny}]%inner ysep is set to have 7mm overall heigh +\tikzstyle{prep label}=[rectangle split,rectangle split parts=2,rectangle split part align=left,draw,ultra thin,minimum width=0.333*4.8cm,text=yellow!10!black,inner xsep=0.1em,inner ysep=0.293em,font={\it\tiny}]%inner ysep is set to have 7mm overall heigh %%%% @@ -57,19 +60,23 @@ \tikzset{/spells/note/.initial={}} \tikzset{/spells/ref/.initial={}} \tikzset{/spells/tempo/.initial={1 a}} +\tikzset{/spells/tempostr/.initial={}} \tikzset{/spells/level/.initial={Must be passed in}} +\tikzset{/spells/levelstr/.initial={}} \tikzset{/spells/name/.initial={Must be passed in}} \tikzset{/spells/scuola/.initial={Must be passed in}} +\tikzset{/spells/source/.initial={Must be passed in}} \tikzset{/spells/durata/.initial={Must be passed in}} \tikzset{/spells/components/.initial={Must be passed in}} +\tikzset{/spells/uses/.initial={Must be passed in}} \tikzset{/spells/descrizione/.initial={Must be passed in}} \tikzset{/spells/target/.initial={Must be passed in}} \tikzset{/spells/range/.initial={Must be passed in}} -\newcommand{\incantesimo}[1]{% +\newcommand{\spellcard}[1]{% %\begin{scope}[every node/.style={draw,ultra thin},/spells/.cd,#1] \begin{scope}[/spells/.cd,#1] -\node[carta,ultra thin,draw] (card) {}; +\node[carta] (card) {}; % titolo \node [anchor=north,title label] (name) at (card.north) @@ -83,34 +90,37 @@ \node [anchor=south,prep label] (prep) at (card.south) {Prep:\nodepart{two}Used:}; -%angolo sud ovest -\node [anchor=south west,angles label] - (st) at (card.south west) - {\textsc{ST:}\nodepart{two}\textsc{\pgfkeysvalueof{/spells/st}}}; - +%lato sud ovest \node [anchor=south west,above angles label] (durata) at (card.west |- prep.north) {\textsf{Duration: \pgfkeysvalueof{/spells/durata}}}; -%angolo sud est -\node [anchor=south east,angles label] (sr) at (card.south east) - {\textsc{SR:}\nodepart{two}\textsc{\pgfkeysvalueof{/spells/sr}}}; - +%lato sud est \node [anchor=south east,above angles label] (tempo) at (card.east |- prep.north) - {\textsf{CT: \pgfkeysvalueof{/spells/tempo}}}; + {\pgfkeysvalueof{/spells/tempostr}}; -%lato sud est \node [anchor=north east,side label] (ref) at ($(tempo.north east) + (0,3mm)$) {\pgfkeysvalueof{/spells/ref}}; +%angolo sud ovest +\node [anchor=south west,angles label] (sr) at (card.south west) + {\textsc{SR:}\nodepart{two}\textsc{\pgfkeysvalueof{/spells/sr}}}; + +%angolo sud est +\node [anchor=south east,angles label] (st) at (card.south east) + {\textsc{ST:}\nodepart{two}\textsc{\pgfkeysvalueof{/spells/st}}}; + %sottotitoli -\node [anchor=north east,align=flush right,rectangle,subt label] (scuola) at (type.south west) - {\emph{\pgfkeysvalueof{/spells/scuola}}}; +\node [anchor=north east,align=flush right,rectangle,subt label] (source) at (type.south west) + {\emph{\pgfkeysvalueof{/spells/source}}}; -\node [anchor=north west,rectangle split,rectangle split parts=2,rectangle split part align={left,flushright},subt label] - (components) at ($(scuola.south -| card.west) - (0mm,0mm)$) - {\textsc{\pgfkeysvalueof{/spells/components}}\nodepart{two}{\tiny\pgfkeysvalueof{/spells/specialcomp}}}; +\node [anchor=north west,subt label,align=left] + (components) at ($(source.south -| card.west) - (0mm,0mm)$) + {\textsc{\pgfkeysvalueof{/spells/components}}}; +\node [anchor=north west,subt label,align=flush right] + (specialcomp) at (components.south west) + {\tiny\pgfkeysvalueof{/spells/specialcomp}}; %centro @@ -122,15 +132,29 @@ % sopra il centro \node [anchor=south west,trg label=flush left] (target) at ($(description.north west) + (0,1mm)$) - {{\scriptsize{}Target/Effect/Area:}\\{\slshape\pgfkeysvalueof{/spells/target}}}; + {{\tiny{}Target/Effect/Area:}\\{\slshape\pgfkeysvalueof{/spells/target}}}; \node [anchor=south east,trg label=flush right] (range) at (target.north -| type.south) - {{\scriptsize{}Range:} \textnormal{\itshape\pgfkeysvalueof{/spells/range}}}; + {{\tiny{}Range:} \textnormal{\itshape\pgfkeysvalueof{/spells/range}}}; %lato est \node [anchor=north west,side label] (lvl) at ($0.8*(card.east)+0.2*(card.north east)$) - {\textsc{lvl \pgfkeysvalueof{/spells/level}}}; + {\textbf{\pgfkeysvalueof{/spells/levelstr}}}; \end{scope}% } + +\newcommand{\incantesimo}[1]{% +\pgfkeys{/spells/.cd,#1}\spellcard{type=spell, + tempostr={CT: \pgfkeysvalueof{/spells/tempo}}, + source={\pgfkeysvalueof{scuola}}, + levelstr={LVL \pgfkeysvalueof{/spells/level}}, +}} + +\newcommand{\potere}[1]{% +\pgfkeys{/spells/.cd,level={},type=special,#1}\spellcard{ + tempostr={AT: \pgfkeysvalueof{/spells/tempo}}, + components={\pgfkeysvalueof{/spells/uses}}, + levelstr={\ifthenelse{\equal{\pgfkeysvalueof{/spells/level}}{}}{}{EqvLvl~\pgfkeysvalueof{/spells/level}}} +}} |