summaryrefslogtreecommitdiff
path: root/inventario.cmd.tex
blob: bac7ff8a41292ba1c70f154f02d03810a1a69746 (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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
\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}
\addtolength{\topmargin}{0.45cm} % per centrare le etichette
%%%%
\setlength{\parindent}{0pt}
 
\pgfdeclareimage[width=1mm]{empty}{empty}
 
\newcommand{\DDitemhoriz}[7]{%
\begin{scope}
 
\node [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}
\newcommand{\ma}[1]{#1 MA}
\newcommand{\mr}[1]{#1 MR}
 
% pesi
\newcommand{\lb}[1]{#1lb}
 
% tipi
\newcommand{\itemtype}[1]{#1}
\newcommand{\typedisc}[1]{\tikz[baseline] \draw[#1] (0,0) circle (0.2cm);}
\newcommand{\itemweapon}[1]{\typedisc{draw=red,fill=red} \itemtype{#1 Weapon}}
\newcommand{\itemweapondef}{\itemweapon{}}
\newcommand{\meleeweapon}{\itemweapon{Melee}}
\newcommand{\rangedweapon}{\itemweapon{Ranged}}
\newcommand{\ammo}{\itemtype{Ammunition}}
 
\newcommand{\itemarmor}[1]{\typedisc{draw=brown,fill=brown} \itemtype{#1 Armor}}
\newcommand{\itemarmordef}{\itemarmor{}}
\newcommand{\itemshield}[1]{\typedisc{draw=brown,fill=brown} \itemtype{#1 Shield}}
\newcommand{\itemshielddef}{\itemshield{}}
\newcommand{\largeshield}{\itemshield{Large}}
\newcommand{\smallshield}{\itemshield{Small}}
\newcommand{\lightarmor}{\itemarmor{Light}}
\newcommand{\heavyarmor}{\itemarmor{Heavy}}
 
\newcommand{\itemwear}[1]{\typedisc{draw=black,fill=black} \itemtype{#1}}
\newcommand{\itemweardef}{\itemwear{Wearable}}
\newcommand{\belt}{\itemwear{Belt}}
\newcommand{\gloves}{\itemwear{Gloves}}
\newcommand{\headband}{\itemwear{Headband}}
\newcommand{\necklace}{\itemwear{Necklace}}
\newcommand{\earring}{\itemwear{Earring}}
\newcommand{\ring}{\itemwear{Ring}}
\newcommand{\cloak}{\itemwear{Cloak}}
\newcommand{\clothes}{\itemwear{Clothes}}
\newcommand{\amulet}{\itemwear{Amulet}}
\newcommand{\bracers}{\itemwear{Bracers}}
\newcommand{\boots}{\itemwear{Boots}}
\newcommand{\glasses}{\itemwear{Glasses}}
 
\newcommand{\itemcons}[1]{\typedisc{draw=blue,fill=blue} \itemtype{#1}}
\newcommand{\itemconsdef}{\itemcons{Consumable}}
\newcommand{\potion}{\itemcons{Potion}}
\newcommand{\wand}{\itemcons{Wand}}
\newcommand{\scroll}{\itemcons{Scroll}}
 
\newcommand{\itemmisc}[1]{\typedisc{draw=black,fill=white} #1}
\newcommand{\itemmiscdef}{\itemmisc{Misc}}
\newcommand{\tool}{\itemmisc{Tool}}
\newcommand{\rope}{\itemmisc{Rope}}
\newcommand{\gem}{\itemmisc{Gem}}
\newcommand{\bedroll}{\itemmisc{Bedroll}}
\newcommand{\waterskin}{\itemmisc{Waterskin}}
\newcommand{\book}{\itemmisc{Book}}
\newcommand{\itemfocus}[1]{\itemmisc{#1 Focus}}
\newcommand{\divinefocus}{\itemfocus{Divine}}
\newcommand{\arcanefocus}{\itemfocus{Arcane}}
\newcommand{\saddle}{\itemmisc{Saddle}}
 
\newcommand{\itemcontainer}[1]{\itemmisc{#1}}
\newcommand{\backpack}{\itemcontainer{Backpack}}
\newcommand{\bagofholding}{\itemcontainer{Bag of Holding}}
\newcommand{\saddlebag}{\itemcontainer{Saddlebag}}
 
\newcommand{\itemspecial}[1]{\typedisc{draw=green,fill=green} #1}
\newcommand{\itemspecialdef}{\itemspecial{Special}}
\newcommand{\magicbook}{\itemspecial{Magic Book}}
\newcommand{\rod}{\itemspecial{Rod}}
 
% 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}}