summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--incantesimi.cmd.tex80
-rw-r--r--incantesimi.example.tex82
2 files changed, 162 insertions, 0 deletions
diff --git a/incantesimi.cmd.tex b/incantesimi.cmd.tex
new file mode 100644
index 0000000..75b9c61
--- /dev/null
+++ b/incantesimi.cmd.tex
@@ -0,0 +1,80 @@
+\documentclass[a4paper,10pt,landscape]{article}
+\usepackage[empty,cm]{fullpage}
+\usepackage[latin1]{inputenc}
+\usepackage[italian]{babel}
+\usepackage[T1]{fontenc}
+\usepackage{tikz}
+\usetikzlibrary{calc}
+\usepackage{pgfkeys}
+
+%%%% fullpage
+\setlength{\headheight}{0pt}
+\setlength{\headsep}{0pt}
+\setlength{\footskip}{0pt}
+\setlength{\textwidth}{\paperwidth}
+\setlength{\oddsidemargin}{-2.68cm}
+\setlength{\evensidemargin}{\oddsidemargin}
+\setlength{\textheight}{\paperheight}
+\setlength{\topmargin}{0pt}
+\addtolength{\topmargin}{-2.68cm}
+\addtolength{\oddsidemargin}{0.45cm} % per centrare le etichette
+\addtolength{\evensidemargin}{0.45cm} % per centrare le etichette
+%%%%
+\setlength{\parindent}{0pt}
+
+\tikzstyle{carta}=[rectangle,minimum width=4.8cm,minimum height=7cm,outer sep=0,use as bounding box]
+\tikzstyle{small label}=[rectangle,text=red,minimum height=0.5cm,font=\tiny,inner sep=1mm]
+\tikzstyle{medium label}=[rectangle,text=blue,minimum height=0.5cm,font=\footnotesize,inner sep=1mm]
+\tikzstyle{side label}=[rectangle,rotate=90,text=green,minimum height=0.3cm,font=\tiny,inner sep=1mm]
+\tikzstyle{center label}=[rectangle,text=magenta,font=\tiny,inner sep=1mm,text width=3.9cm,align=justify]
+
+\pgfkeys{/spells/.unknown/.code = {\pgfkeyssetvalue{\pgfkeyscurrentpath/\pgfkeyscurrentname}{#1}}}
+\pgfkeyssetvalue{/spells/type}{spell}
+\pgfkeyssetvalue{/spells/st}{None}
+\pgfkeyssetvalue{/spells/sr}{No}
+\pgfkeyssetvalue{/spells/tempo}{1a}
+
+\newcommand{\incantesimo}[1]{%
+%\begin{scope}[every node/.style={draw},/spells/.cd,#1]
+\begin{scope}[/spells/.cd,#1]
+\node[carta] (card) {};
+
+\node [anchor=north east,side label] (type) at (card.north west)
+ {\pgfkeysvalueof{/spells/type}};
+\node [anchor=north,medium label] (name) at (card.north)
+ {\pgfkeysvalueof{/spells/name}};
+\node [anchor=north,small label] (scuola) at (name.south)
+ {\pgfkeysvalueof{/spells/scuola}};
+\node [anchor=north east,medium label] (lvl) at ($(card.north east) - (0,1cm)$)
+ {lvl \pgfkeysvalueof{/spells/level}};
+
+\node [anchor=north east,side label] (range) at (type.north west)
+ {rng: \pgfkeysvalueof{/spells/range}};
+
+\node [anchor=north east,small label] (target) at (lvl.north west)
+ {\pgfkeysvalueof{/spells/target}};
+
+\node [anchor=south west,small label] (st) at (card.south west)
+ {ST:\pgfkeysvalueof{/spells/st}};
+
+\node [anchor=south west,small label] (sr) at (st.north west)
+ {SR:\pgfkeysvalueof{/spells/sr}};
+\node [anchor=south east,small label] (durata) at (card.south east)
+ {\pgfkeysvalueof{/spells/durata}};
+\node [anchor=south east,small label] (tempo) at (durata.north east)
+ {\pgfkeysvalueof{/spells/tempo}};
+
+\node [anchor=south east,side label] (ref) at (lvl.south east)
+ {\pgfkeysvalueof{/spells/ref}};
+
+\node [anchor=north west,center label] (components) at (range.south |- target.south)
+ {\pgfkeysvalueof{/spells/components}};
+
+\node [anchor=north west,center label] (description) at ($(components.south west) - (0,1mm)$)
+ {\pgfkeysvalueof{/spells/descrizione}};
+
+\node [anchor=north west,center label] (notes) at ($(description.south west) - (0,1mm)$)
+ {\pgfkeysvalueof{/spells/note}};
+
+\end{scope}%
+}
diff --git a/incantesimi.example.tex b/incantesimi.example.tex
new file mode 100644
index 0000000..40a0173
--- /dev/null
+++ b/incantesimi.example.tex
@@ -0,0 +1,82 @@
+\include{incantesimi.cmd}
+
+\begin{document}
+
+\begin{tikzpicture}
+
+\matrix {
+
+\incantesimo{type=spell-like,
+ scuola={Enchantment (Charm) [LD, MA, Sonic]},
+ st={Fort half (HO)},
+ tempo=15m,
+ name=Regenerate Moderate Wounds,
+ level=9,
+ sr={Yes (HO)},
+ durata={30m / disch},
+ ref=PH289,
+ range=medium,
+ target={Well shaft 10ft. diam 100 ft. deep},
+ components={V,S,M,F,DF,XP\\M: Incense; F: Prayer bead (500 MO)},
+ descrizione={Fully repairs an obj. up to 5\%/2L mass loss; cures 1d4 dmg to magical obj.},
+ note={Reasonable command may give -1 to -4 pen. to S. T.}
+} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} \\
+
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} \\
+
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}} &
+\incantesimo{scuola=scuola a caso,name=Incantesimo col nome lungo,level=1,
+ durata=Inst,range=touch,target=you,components={V,S},
+ descrizione={blah blah blah}}
+
+\\};
+
+\end{tikzpicture}
+
+\end{document}