summaryrefslogtreecommitdiff
path: root/inventario.cmd.tex
blob: cbfe99818d4a093d46c71a67cf7df1ba8b0d14db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
\documentclass[a4paper,10pt]{article}
\usepackage[empty,cm]{fullpage}
\usepackage[latin1]{inputenc}
\usepackage[italian]{babel}
\usepackage[T1]{fontenc}
\usepackage{pslatex}
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\usetikzlibrary{calc}
\usepackage{pgffor}
 
%%%% 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}
%%%%
\setlength{\parindent}{0pt}
 
\pgfdeclareimage[width=1mm]{empty}{empty}
 
\newcommand{\DDitemhoriz}[7]{%
\begin{scope}
 
\node [draw,ultra thin,dotted,rectangle,minimum height=4.8cm,minimum width=7cm,outer sep=0,use as bounding box] (card) {};
 
\node [anchor=north west,rotate=90] (itemtype) at (node cs:name=card,anchor=south west)
      {#2};
 
\node [anchor=north east,rotate=90] (itemowner) at (node cs:name=card,anchor=north west)
      {#3};
 
\node [anchor=south west,rotate=90] (itemweight) at (node cs:name=card,anchor=south east)
      {#4};
 
\node [anchor=south east,rotate=90] (itemprice) at (node cs:name=card,anchor=north east)
      {#5};
 
\node [anchor=north,inner sep=1mm,text width=4.6cm,rotate=90,text centered]
      (itemname)
      at ($0.5*(node cs:name=itemtype,anchor=south west)+0.5*(node cs:name=itemowner,anchor=south east)$)
      {#6};
 
\node [anchor=north,rotate=90] (itemimage)
      at (node cs:name=itemname,anchor=south)
      {\pgfuseimage{#1}};
 
\node [anchor=south,inner sep=1mm,text width=4.6cm,rotate=90]
      (itemdesc)
      at ($0.5*(node cs:name=itemweight,anchor=north west)+0.5*(node cs:name=itemprice,anchor=north east)$)
      {#7};
 
\end{scope}%
}
 
\newcommand{\DDitem}[7]{\DDitemhoriz{#1}{#2}{#3}{#4}{#5}{#6}{#7}}
 
% proprietari
\newcommand{\group}{Gruppo}
 
% dimensioni
\newcommand{\itemsize}[1]{#1}
\newcommand{\tinyitem}{\itemsize{Tiny}}
\newcommand{\smallitem}{\itemsize{Small}}
\newcommand{\mediumitem}{\itemsize{Medium}}
\newcommand{\largeitem}{\itemsize{Large}}
\newcommand{\hugeitem}{\itemsize{Huge}}
 
% prezzi
\newcommand{\mo}[1]{#1 MO}
 
% pesi
\newcommand{\lb}[1]{#1lb}
 
% tipi
\newcommand{\itemtype}[1]{#1}
\newcommand{\itemweapon}[1]{\itemtype{#1 Weapon}}
\newcommand{\meleeweapon}{\itemweapon{Melee}}
\newcommand{\rangedweapon}{\itemweapon{Ranged}}
\newcommand{\itemarmor}[1]{\itemtype{#1 Armor}}
\newcommand{\itemshield}[1]{\itemtype{#1 Shield}}
\newcommand{\lightarmor}{\itemarmor{Light}}
\newcommand{\ammo}{\itemtype{Ammunition}}
\newcommand{\itemfocus}[1]{\itemtype{#1 Focus}}
\newcommand{\divinefocus}{\itemfocus{Divine}}
\newcommand{\arcanefocus}{\itemfocus{Arcane}}
\newcommand{\itemwear}[1]{\itemtype{#1}}
\newcommand{\belt}{\itemwear{Belt}}
\newcommand{\gloves}{\itemwear{Gloves}}
\newcommand{\headband}{\itemwear{Headband}}
\newcommand{\necklace}{\itemwear{Necklace}}
\newcommand{\ring}{\itemwear{Ring}}
\newcommand{\cloak}{\itemwear{Cloak}}
\newcommand{\clothes}{\itemwear{Clothes}}
\newcommand{\bedroll}{\itemwear{Bedroll}}
\newcommand{\amulet}{\itemwear{Amulet}}
\newcommand{\bracers}{\itemwear{Bracers}}
\newcommand{\itemcontainer}[1]{\itemtype{#1}}
\newcommand{\backpack}{\itemcontainer{Backpack}}
\newcommand{\itemmagic}[1]{\itemtype{#1}}
\newcommand{\potion}{\itemmagic{Potion}}
\newcommand{\wand}{\itemmagic{Wand}}
\newcommand{\magicring}{\itemmagic{Ring}}
\newcommand{\rod}{\itemmagic{Rod}}
\newcommand{\scroll}{\itemmagic{Scroll}}
\newcommand{\magicbook}{\itemmagic{Magic Book}}
\newcommand{\tool}{\itemtype{Tool}}
\newcommand{\gem}{\itemtype{Gem}}
\newcommand{\itemmisc}{\itemtype{Misc}}
 
% cariche
\newcommand{\cariche}[1]{\begin{tikzpicture}[x=0.4cm,y=-0.4cm]
\pgfmathsetmacro{\carichelines}{floor(#1/10)}
\pgfmathsetmacro{\caricherest}{mod(#1,10)}
\ifnum 0<\carichelines
\foreach \line in {1,...,\carichelines} {
 \foreach \col in {0,...,9}
  \draw (\col,\line - 1) circle (0.2cm);
}
\fi
\ifnum 0<\caricherest
\pgfmathsetmacro{\carichelines}{\carichelines + 1}%
\foreach \col in {1,...,\caricherest} {
  \draw (\col - 1,\carichelines) circle (0.2cm);
}
\fi
\end{tikzpicture}}