OSDN Git Service

fix #36659
[jnethack/source.git] / src / objects.c
1 /* NetHack 3.6  objects.c       $NHDT-Date: 1447313395 2015/11/12 07:29:55 $  $NHDT-Branch: master $:$NHDT-Revision: 1.49 $ */
2 /* Copyright (c) Mike Threepoint, 1989.                           */
3 /* NetHack may be freely redistributed.  See license for details. */
4
5 /*
6  * The data in this file is processed twice, to construct two arrays.
7  * On the first pass, only object name and object description matter.
8  * On the second pass, all object-class fields except those two matter.
9  * 2nd pass is a recursive inclusion of this file, not a 2nd compilation.
10  * The name/description array is also used by makedefs and lev_comp.
11  *
12  * #ifndef OBJECTS_PASS_2_
13  * # define OBJECT(name,desc,foo,bar,glorkum) name,desc
14  * struct objdescr obj_descr[] =
15  * #else
16  * # define OBJECT(name,desc,foo,bar,glorkum) foo,bar,glorkum
17  * struct objclass objects[] =
18  * #endif
19  * {
20  *   { OBJECT("strange object",NULL, 1,2,3) },
21  *   { OBJECT("arrow","pointy stick", 4,5,6) },
22  *   ...
23  *   { OBJECT(NULL,NULL, 0,0,0) }
24  * };
25  * #define OBJECTS_PASS_2_
26  * #include "objects.c"
27  */
28
29 /* *INDENT-OFF* */
30 /* clang-format off */
31
32 #ifndef OBJECTS_PASS_2_
33 /* first pass */
34 struct monst { struct monst *dummy; };  /* lint: struct obj's union */
35 #include "config.h"
36 #include "obj.h"
37 #include "objclass.h"
38 #include "prop.h"
39 #include "skills.h"
40
41 #else /* !OBJECTS_PASS_2_ */
42 /* second pass */
43 #include "color.h"
44 #define COLOR_FIELD(X) X,
45 #endif /* !OBJECTS_PASS_2_ */
46
47 /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */
48
49 /*
50  *      Note:  OBJ() and BITS() macros are used to avoid exceeding argument
51  *      limits imposed by some compilers.  The ctnr field of BITS currently
52  *      does not map into struct objclass, and is ignored in the expansion.
53  *      The 0 in the expansion corresponds to oc_pre_discovered, which is
54  *      set at run-time during role-specific character initialization.
55  */
56
57 #ifndef OBJECTS_PASS_2_
58 /* first pass -- object descriptive text */
59 #define OBJ(name,desc)  name, desc
60 #define OBJECT(obj,bits,prp,sym,prob,dly,wt, \
61                cost,sdam,ldam,oc1,oc2,nut,color)  { obj }
62 #define None (char *) 0 /* less visual distraction for 'no description' */
63
64 NEARDATA struct objdescr obj_descr[] =
65 #else
66 /* second pass -- object definitions */
67 #define BITS(nmkn,mrg,uskn,ctnr,mgc,chrg,uniq,nwsh,big,tuf,dir,sub,mtrl) \
68   nmkn,mrg,uskn,0,mgc,chrg,uniq,nwsh,big,tuf,dir,mtrl,sub /*SCO cpp fodder*/
69 #define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
70   { 0, 0, (char *) 0, bits, prp, sym, dly, COLOR_FIELD(color) prob, wt, \
71     cost, sdam, ldam, oc1, oc2, nut }
72 #ifndef lint
73 #define HARDGEM(n) (n >= 8)
74 #else
75 #define HARDGEM(n) (0)
76 #endif
77
78 NEARDATA struct objclass objects[] =
79 #endif
80 {
81 /* dummy object[0] -- description [2nd arg] *must* be NULL */
82 OBJECT(OBJ("strange object", None),
83        BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, 0),
84        0, ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
85
86 /* weapons ... */
87 #define WEAPON(name,desc,kn,mg,bi,prob,wt,                \
88                cost,sdam,ldam,hitbon,typ,sub,metal,color) \
89     OBJECT(OBJ(name,desc),                                          \
90            BITS(kn, mg, 1, 0, 0, 1, 0, 0, bi, 0, typ, sub, metal),  \
91            0, WEAPON_CLASS, prob, 0, wt,                            \
92            cost, sdam, ldam, hitbon, 0, wt, color)
93 #define PROJECTILE(name,desc,kn,prob,wt,                  \
94                    cost,sdam,ldam,hitbon,metal,sub,color) \
95     OBJECT(OBJ(name,desc),                                          \
96            BITS(kn, 1, 1, 0, 0, 1, 0, 0, 0, 0, PIERCE, sub, metal), \
97            0, WEAPON_CLASS, prob, 0, wt,                            \
98            cost, sdam, ldam, hitbon, 0, wt, color)
99 #define BOW(name,desc,kn,prob,wt,cost,hitbon,metal,sub,color) \
100     OBJECT(OBJ(name,desc),                                          \
101            BITS(kn, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, sub, metal),      \
102            0, WEAPON_CLASS, prob, 0, wt,                            \
103            cost, 2, 2, hitbon, 0, wt, color)
104
105 /* Note: for weapons that don't do an even die of damage (ex. 2-7 or 3-18)
106    the extra damage is added on in weapon.c, not here! */
107
108 #define P PIERCE
109 #define S SLASH
110 #define B WHACK
111
112 /* missiles; materiel reflects the arrowhead, not the shaft */
113 PROJECTILE("arrow", None,
114            1, 55, 1, 2, 6, 6, 0,        IRON, -P_BOW, HI_METAL),
115 PROJECTILE("elven arrow", "runed arrow",
116            0, 20, 1, 2, 7, 6, 0,        WOOD, -P_BOW, HI_WOOD),
117 PROJECTILE("orcish arrow", "crude arrow",
118            0, 20, 1, 2, 5, 6, 0,        IRON, -P_BOW, CLR_BLACK),
119 PROJECTILE("silver arrow", None,
120            1, 12, 1, 5, 6, 6, 0,        SILVER, -P_BOW, HI_SILVER),
121 PROJECTILE("ya", "bamboo arrow",
122            0, 15, 1, 4, 7, 7, 1,        METAL, -P_BOW, HI_METAL),
123 PROJECTILE("crossbow bolt", None,
124            1, 55, 1, 2, 4, 6, 0,        IRON, -P_CROSSBOW, HI_METAL),
125
126 /* missiles that don't use a launcher */
127 WEAPON("dart", None,
128        1, 1, 0, 60,   1,   2,  3,  2, 0, P,   -P_DART, IRON, HI_METAL),
129 WEAPON("shuriken", "throwing star",
130        0, 1, 0, 35,   1,   5,  8,  6, 2, P,   -P_SHURIKEN, IRON, HI_METAL),
131 WEAPON("boomerang", None,
132        1, 1, 0, 15,   5,  20,  9,  9, 0, 0,   -P_BOOMERANG, WOOD, HI_WOOD),
133
134 /* spears [note: javelin used to have a separate skill from spears,
135    because the latter are primarily stabbing weapons rather than
136    throwing ones; but for playability, they've been merged together
137    under spear skill and spears can now be thrown like javelins] */
138 WEAPON("spear", None,
139        1, 1, 0, 50,  30,   3,  6,  8, 0, P,   P_SPEAR, IRON, HI_METAL),
140 WEAPON("elven spear", "runed spear",
141        0, 1, 0, 10,  30,   3,  7,  8, 0, P,   P_SPEAR, WOOD, HI_WOOD),
142 WEAPON("orcish spear", "crude spear",
143        0, 1, 0, 13,  30,   3,  5,  8, 0, P,   P_SPEAR, IRON, CLR_BLACK),
144 WEAPON("dwarvish spear", "stout spear",
145        0, 1, 0, 12,  35,   3,  8,  8, 0, P,   P_SPEAR, IRON, HI_METAL),
146 WEAPON("silver spear", None,
147        1, 1, 0,  2,  36,  40,  6,  8, 0, P,   P_SPEAR, SILVER, HI_SILVER),
148 WEAPON("javelin", "throwing spear",
149        0, 1, 0, 10,  20,   3,  6,  6, 0, P,   P_SPEAR, IRON, HI_METAL),
150
151 /* spearish; doesn't stack, not intended to be thrown */
152 WEAPON("trident", None,
153        1, 0, 0,  8,  25,   5,  6,  4, 0, P,   P_TRIDENT, IRON, HI_METAL),
154         /* +1 small, +2d4 large */
155
156 /* blades; all stack */
157 WEAPON("dagger", None,
158        1, 1, 0, 30,  10,   4,  4,  3, 2, P,   P_DAGGER, IRON, HI_METAL),
159 WEAPON("elven dagger", "runed dagger",
160        0, 1, 0, 10,  10,   4,  5,  3, 2, P,   P_DAGGER, WOOD, HI_WOOD),
161 WEAPON("orcish dagger", "crude dagger",
162        0, 1, 0, 12,  10,   4,  3,  3, 2, P,   P_DAGGER, IRON, CLR_BLACK),
163 WEAPON("silver dagger", None,
164        1, 1, 0,  3,  12,  40,  4,  3, 2, P,   P_DAGGER, SILVER, HI_SILVER),
165 WEAPON("athame", None,
166        1, 1, 0,  0,  10,   4,  4,  3, 2, S,   P_DAGGER, IRON, HI_METAL),
167 WEAPON("scalpel", None,
168        1, 1, 0,  0,   5,   6,  3,  3, 2, S,   P_KNIFE, METAL, HI_METAL),
169 WEAPON("knife", None,
170        1, 1, 0, 20,   5,   4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
171 WEAPON("stiletto", None,
172        1, 1, 0,  5,   5,   4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
173 /* 3.6: worm teeth and crysknives now stack;
174    when a stack of teeth is enchanted at once, they fuse into one crysknife;
175    when a stack of crysknives drops, the whole stack reverts to teeth */
176 WEAPON("worm tooth", None,
177        1, 1, 0,  0,  20,   2,  2,  2, 0, 0,   P_KNIFE, 0, CLR_WHITE),
178 WEAPON("crysknife", None,
179        1, 1, 0,  0,  20, 100, 10, 10, 3, P,   P_KNIFE, MINERAL, CLR_WHITE),
180
181 /* axes */
182 WEAPON("axe", None,
183        1, 0, 0, 40,  60,   8,  6,  4, 0, S,   P_AXE, IRON, HI_METAL),
184 WEAPON("battle-axe", "double-headed axe",       /* "double-bitted"? */
185        0, 0, 1, 10, 120,  40,  8,  6, 0, S,   P_AXE, IRON, HI_METAL),
186
187 /* swords */
188 WEAPON("short sword", None,
189        1, 0, 0,  8,  30,  10,  6,  8, 0, P,   P_SHORT_SWORD, IRON, HI_METAL),
190 WEAPON("elven short sword", "runed short sword",
191        0, 0, 0,  2,  30,  10,  8,  8, 0, P,   P_SHORT_SWORD, WOOD, HI_WOOD),
192 WEAPON("orcish short sword", "crude short sword",
193        0, 0, 0,  3,  30,  10,  5,  8, 0, P,   P_SHORT_SWORD, IRON, CLR_BLACK),
194 WEAPON("dwarvish short sword", "broad short sword",
195        0, 0, 0,  2,  30,  10,  7,  8, 0, P,   P_SHORT_SWORD, IRON, HI_METAL),
196 WEAPON("scimitar", "curved sword",
197        0, 0, 0, 15,  40,  15,  8,  8, 0, S,   P_SCIMITAR, IRON, HI_METAL),
198 WEAPON("silver saber", None,
199        1, 0, 0,  6,  40,  75,  8,  8, 0, S,   P_SABER, SILVER, HI_SILVER),
200 WEAPON("broadsword", None,
201        1, 0, 0,  8,  70,  10,  4,  6, 0, S,   P_BROAD_SWORD, IRON, HI_METAL),
202         /* +d4 small, +1 large */
203 WEAPON("elven broadsword", "runed broadsword",
204        0, 0, 0,  4,  70,  10,  6,  6, 0, S,   P_BROAD_SWORD, WOOD, HI_WOOD),
205         /* +d4 small, +1 large */
206 WEAPON("long sword", None,
207        1, 0, 0, 50,  40,  15,  8, 12, 0, S,   P_LONG_SWORD, IRON, HI_METAL),
208 WEAPON("two-handed sword", None,
209        1, 0, 1, 22, 150,  50, 12,  6, 0, S,   P_TWO_HANDED_SWORD,
210                                                             IRON, HI_METAL),
211         /* +2d6 large */
212 WEAPON("katana", "samurai sword",
213        0, 0, 0,  4,  40,  80, 10, 12, 1, S,   P_LONG_SWORD, IRON, HI_METAL),
214 /* special swords set up for artifacts */
215 WEAPON("tsurugi", "long samurai sword",
216        0, 0, 1,  0,  60, 500, 16,  8, 2, S,   P_TWO_HANDED_SWORD,
217                                                             METAL, HI_METAL),
218         /* +2d6 large */
219 WEAPON("runesword", "runed broadsword",
220        0, 0, 0,  0,  40, 300,  4,  6, 0, S,   P_BROAD_SWORD, IRON, CLR_BLACK),
221         /* +d4 small, +1 large; Stormbringer: +5d2 +d8 from level drain */
222
223 /* polearms */
224 /* spear-type */
225 WEAPON("partisan", "vulgar polearm",
226        0, 0, 1,  5,  80,  10,  6,  6, 0, P,   P_POLEARMS, IRON, HI_METAL),
227         /* +1 large */
228 WEAPON("ranseur", "hilted polearm",
229        0, 0, 1,  5,  50,   6,  4,  4, 0, P,   P_POLEARMS, IRON, HI_METAL),
230         /* +d4 both */
231 WEAPON("spetum", "forked polearm",
232        0, 0, 1,  5,  50,   5,  6,  6, 0, P,   P_POLEARMS, IRON, HI_METAL),
233         /* +1 small, +d6 large */
234 WEAPON("glaive", "single-edged polearm",
235        0, 0, 1,  8,  75,   6,  6, 10, 0, S,   P_POLEARMS, IRON, HI_METAL),
236 WEAPON("lance", None,
237        1, 0, 0,  4, 180,  10,  6,  8, 0, P,   P_LANCE, IRON, HI_METAL),
238         /* +2d10 when jousting with lance as primary weapon */
239 /* axe-type */
240 WEAPON("halberd", "angled poleaxe",
241        0, 0, 1,  8, 150,  10, 10,  6, 0, P|S, P_POLEARMS, IRON, HI_METAL),
242         /* +1d6 large */
243 WEAPON("bardiche", "long poleaxe",
244        0, 0, 1,  4, 120,   7,  4,  4, 0, S,   P_POLEARMS, IRON, HI_METAL),
245         /* +1d4 small, +2d4 large */
246 WEAPON("voulge", "pole cleaver",
247        0, 0, 1,  4, 125,   5,  4,  4, 0, S,   P_POLEARMS, IRON, HI_METAL),
248         /* +d4 both */
249 WEAPON("dwarvish mattock", "broad pick",
250        0, 0, 1, 13, 120,  50, 12,  8, -1, B,  P_PICK_AXE, IRON, HI_METAL),
251 /* curved/hooked */
252 WEAPON("fauchard", "pole sickle",
253        0, 0, 1,  6,  60,   5,  6,  8, 0, P|S, P_POLEARMS, IRON, HI_METAL),
254 WEAPON("guisarme", "pruning hook",
255        0, 0, 1,  6,  80,   5,  4,  8, 0, S,   P_POLEARMS, IRON, HI_METAL),
256         /* +1d4 small */
257 WEAPON("bill-guisarme", "hooked polearm",
258        0, 0, 1,  4, 120,   7,  4, 10, 0, P|S, P_POLEARMS, IRON, HI_METAL),
259         /* +1d4 small */
260 /* other */
261 WEAPON("lucern hammer", "pronged polearm",
262        0, 0, 1,  5, 150,   7,  4,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
263         /* +1d4 small */
264 WEAPON("bec de corbin", "beaked polearm",
265        0, 0, 1,  4, 100,   8,  8,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
266
267 /* bludgeons */
268 WEAPON("mace", None,
269        1, 0, 0, 40,  30,   5,  6,  6, 0, B,   P_MACE, IRON, HI_METAL),
270         /* +1 small */
271 WEAPON("morning star", None,
272        1, 0, 0, 12, 120,  10,  4,  6, 0, B,   P_MORNING_STAR, IRON, HI_METAL),
273         /* +d4 small, +1 large */
274 WEAPON("war hammer", None,
275        1, 0, 0, 15,  50,   5,  4,  4, 0, B,   P_HAMMER, IRON, HI_METAL),
276         /* +1 small */
277 WEAPON("club", None,
278        1, 0, 0, 12,  30,   3,  6,  3, 0, B,   P_CLUB, WOOD, HI_WOOD),
279 WEAPON("rubber hose", None,
280        1, 0, 0,  0,  20,   3,  4,  3, 0, B,   P_WHIP, PLASTIC, CLR_BROWN),
281 WEAPON("quarterstaff", "staff",
282        0, 0, 1, 11,  40,   5,  6,  6, 0, B,   P_QUARTERSTAFF, WOOD, HI_WOOD),
283 /* two-piece */
284 WEAPON("aklys", "thonged club",
285        0, 0, 0,  8,  15,   4,  6,  3, 0, B,   P_CLUB, IRON, HI_METAL),
286 WEAPON("flail", None,
287        1, 0, 0, 40,  15,   4,  6,  4, 0, B,   P_FLAIL, IRON, HI_METAL),
288         /* +1 small, +1d4 large */
289
290 /* misc */
291 WEAPON("bullwhip", None,
292        1, 0, 0,  2,  20,   4,  2,  1, 0, 0,   P_WHIP, LEATHER, CLR_BROWN),
293
294 /* bows */
295 BOW("bow", None,               1, 24, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
296 BOW("elven bow", "runed bow",  0, 12, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
297 BOW("orcish bow", "crude bow", 0, 12, 30, 60, 0, WOOD, P_BOW, CLR_BLACK),
298 BOW("yumi", "long bow",        0,  0, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
299 BOW("sling", None,             1, 40,  3, 20, 0, LEATHER, P_SLING, HI_LEATHER),
300 BOW("crossbow", None,          1, 45, 50, 40, 0, WOOD, P_CROSSBOW, HI_WOOD),
301
302 #undef P
303 #undef S
304 #undef B
305
306 #undef WEAPON
307 #undef PROJECTILE
308 #undef BOW
309
310 /* armor ... */
311         /* IRON denotes ferrous metals, including steel.
312          * Only IRON weapons and armor can rust.
313          * Only COPPER (including brass) corrodes.
314          * Some creatures are vulnerable to SILVER.
315          */
316 #define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,  \
317               cost,ac,can,sub,metal,c)                   \
318     OBJECT(OBJ(name, desc),                                         \
319            BITS(kn, 0, 1, 0, mgc, 1, 0, 0, blk, 0, 0, sub, metal),  \
320            power, ARMOR_CLASS, prob, delay, wt,                     \
321            cost, 0, 0, 10 - ac, can, wt, c)
322 #define HELM(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c)  \
323     ARMOR(name, desc, kn, mgc, 0, power, prob, delay, wt,  \
324           cost, ac, can, ARM_HELM, metal, c)
325 #define CLOAK(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c)  \
326     ARMOR(name, desc, kn, mgc, 0, power, prob, delay, wt,  \
327           cost, ac, can, ARM_CLOAK, metal, c)
328 #define SHIELD(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,metal,c) \
329     ARMOR(name, desc, kn, mgc, blk, power, prob, delay, wt, \
330           cost, ac, can, ARM_SHIELD, metal, c)
331 #define GLOVES(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c)  \
332     ARMOR(name, desc, kn, mgc, 0, power, prob, delay, wt,  \
333           cost, ac, can, ARM_GLOVES, metal, c)
334 #define BOOTS(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c)  \
335     ARMOR(name, desc, kn, mgc, 0, power, prob, delay, wt,  \
336           cost, ac, can, ARM_BOOTS, metal, c)
337
338 /* helmets */
339 HELM("elven leather helm", "leather hat",
340      0, 0,           0,  6, 1,  3,  8,  9, 0, LEATHER, HI_LEATHER),
341 HELM("orcish helm", "iron skull cap",
342      0, 0,           0,  6, 1, 30, 10,  9, 0, IRON, CLR_BLACK),
343 HELM("dwarvish iron helm", "hard hat",
344      0, 0,           0,  6, 1, 40, 20,  8, 0, IRON, HI_METAL),
345 HELM("fedora", None,
346      1, 0,           0,  0, 0,  3,  1, 10, 0, CLOTH, CLR_BROWN),
347 HELM("cornuthaum", "conical hat",
348      0, 1, CLAIRVOYANT,  3, 1,  4, 80, 10, 1, CLOTH, CLR_BLUE),
349         /* name coined by devteam; confers clairvoyance for wizards,
350            blocks clairvoyance if worn by role other than wizard */
351 HELM("dunce cap", "conical hat",
352      0, 1,           0,  3, 1,  4,  1, 10, 0, CLOTH, CLR_BLUE),
353 HELM("dented pot", None,
354      1, 0,           0,  2, 0, 10,  8,  9, 0, IRON, CLR_BLACK),
355 /* with shuffled appearances... */
356 HELM("helmet", "plumed helmet",
357      0, 0,           0, 10, 1, 30, 10,  9, 0, IRON, HI_METAL),
358 HELM("helm of brilliance", "etched helmet",
359      0, 1,           0,  6, 1, 50, 50,  9, 0, IRON, CLR_GREEN),
360 HELM("helm of opposite alignment", "crested helmet",
361      0, 1,           0,  6, 1, 50, 50,  9, 0, IRON, HI_METAL),
362 HELM("helm of telepathy", "visored helmet",
363      0, 1,     TELEPAT,  2, 1, 50, 50,  9, 0, IRON, HI_METAL),
364
365 /* suits of armor */
366 /*
367  * There is code in polyself.c that assumes (1) and (2).
368  * There is code in obj.h, objnam.c, mon.c, read.c that assumes (2).
369  *      (1) The dragon scale mails and the dragon scales are together.
370  *      (2) That the order of the dragon scale mail and dragon scales
371  *          is the the same as order of dragons defined in monst.c.
372  */
373 #define DRGN_ARMR(name,mgc,power,cost,ac,color)  \
374     ARMOR(name, None, 1, mgc, 1, power, 0, 5, 40,  \
375           cost, ac, 0, ARM_SUIT, DRAGON_HIDE, color)
376 /* 3.4.1: dragon scale mail reclassified as "magic" since magic is
377    needed to create them */
378 DRGN_ARMR("gray dragon scale mail",    1, ANTIMAGIC,  1200, 1, CLR_GRAY),
379 DRGN_ARMR("silver dragon scale mail",  1, REFLECTING, 1200, 1, DRAGON_SILVER),
380 #if 0 /* DEFERRED */
381 DRGN_ARMR("shimmering dragon scale mail", 1, DISPLACED, 1200, 1, CLR_CYAN),
382 #endif
383 DRGN_ARMR("red dragon scale mail",     1, FIRE_RES,    900, 1, CLR_RED),
384 DRGN_ARMR("white dragon scale mail",   1, COLD_RES,    900, 1, CLR_WHITE),
385 DRGN_ARMR("orange dragon scale mail",  1, SLEEP_RES,   900, 1, CLR_ORANGE),
386 DRGN_ARMR("black dragon scale mail",   1, DISINT_RES, 1200, 1, CLR_BLACK),
387 DRGN_ARMR("blue dragon scale mail",    1, SHOCK_RES,   900, 1, CLR_BLUE),
388 DRGN_ARMR("green dragon scale mail",   1, POISON_RES,  900, 1, CLR_GREEN),
389 DRGN_ARMR("yellow dragon scale mail",  1, ACID_RES,    900, 1, CLR_YELLOW),
390 /* For now, only dragons leave these. */
391 /* 3.4.1: dragon scales left classified as "non-magic"; they confer
392    magical properties but are produced "naturally" */
393 DRGN_ARMR("gray dragon scales",        0, ANTIMAGIC,   700, 7, CLR_GRAY),
394 DRGN_ARMR("silver dragon scales",      0, REFLECTING,  700, 7, DRAGON_SILVER),
395 #if 0 /* DEFERRED */
396 DRGN_ARMR("shimmering dragon scales",  0, DISPLACED,   700, 7, CLR_CYAN),
397 #endif
398 DRGN_ARMR("red dragon scales",         0, FIRE_RES,    500, 7, CLR_RED),
399 DRGN_ARMR("white dragon scales",       0, COLD_RES,    500, 7, CLR_WHITE),
400 DRGN_ARMR("orange dragon scales",      0, SLEEP_RES,   500, 7, CLR_ORANGE),
401 DRGN_ARMR("black dragon scales",       0, DISINT_RES,  700, 7, CLR_BLACK),
402 DRGN_ARMR("blue dragon scales",        0, SHOCK_RES,   500, 7, CLR_BLUE),
403 DRGN_ARMR("green dragon scales",       0, POISON_RES,  500, 7, CLR_GREEN),
404 DRGN_ARMR("yellow dragon scales",      0, ACID_RES,    500, 7, CLR_YELLOW),
405 #undef DRGN_ARMR
406 /* other suits */
407 ARMOR("plate mail", None,
408       1, 0, 1,  0, 44, 5, 450, 600,  3, 2,  ARM_SUIT, IRON, HI_METAL),
409 ARMOR("crystal plate mail", None,
410       1, 0, 1,  0, 10, 5, 450, 820,  3, 2,  ARM_SUIT, GLASS, CLR_WHITE),
411 ARMOR("bronze plate mail", None,
412       1, 0, 1,  0, 25, 5, 450, 400,  4, 1,  ARM_SUIT, COPPER, HI_COPPER),
413 ARMOR("splint mail", None,
414       1, 0, 1,  0, 62, 5, 400,  80,  4, 1,  ARM_SUIT, IRON, HI_METAL),
415 ARMOR("banded mail", None,
416       1, 0, 1,  0, 72, 5, 350,  90,  4, 1,  ARM_SUIT, IRON, HI_METAL),
417 ARMOR("dwarvish mithril-coat", None,
418       1, 0, 0,  0, 10, 1, 150, 240,  4, 2,  ARM_SUIT, MITHRIL, HI_SILVER),
419 ARMOR("elven mithril-coat", None,
420       1, 0, 0,  0, 15, 1, 150, 240,  5, 2,  ARM_SUIT, MITHRIL, HI_SILVER),
421 ARMOR("chain mail", None,
422       1, 0, 0,  0, 72, 5, 300,  75,  5, 1,  ARM_SUIT, IRON, HI_METAL),
423 ARMOR("orcish chain mail", "crude chain mail",
424       0, 0, 0,  0, 20, 5, 300,  75,  6, 1,  ARM_SUIT, IRON, CLR_BLACK),
425 ARMOR("scale mail", None,
426       1, 0, 0,  0, 72, 5, 250,  45,  6, 1,  ARM_SUIT, IRON, HI_METAL),
427 ARMOR("studded leather armor", None,
428       1, 0, 0,  0, 72, 3, 200,  15,  7, 1,  ARM_SUIT, LEATHER, HI_LEATHER),
429 ARMOR("ring mail", None,
430       1, 0, 0,  0, 72, 5, 250, 100,  7, 1,  ARM_SUIT, IRON, HI_METAL),
431 ARMOR("orcish ring mail", "crude ring mail",
432       0, 0, 0,  0, 20, 5, 250,  80,  8, 1,  ARM_SUIT, IRON, CLR_BLACK),
433 ARMOR("leather armor", None,
434       1, 0, 0,  0, 82, 3, 150,   5,  8, 1,  ARM_SUIT, LEATHER, HI_LEATHER),
435 ARMOR("leather jacket", None,
436       1, 0, 0,  0, 12, 0,  30,  10,  9, 0,  ARM_SUIT, LEATHER, CLR_BLACK),
437
438 /* shirts */
439 ARMOR("Hawaiian shirt", None,
440       1, 0, 0,  0,  8, 0,   5,   3, 10, 0,  ARM_SHIRT, CLOTH, CLR_MAGENTA),
441 ARMOR("T-shirt", None,
442       1, 0, 0,  0,  2, 0,   5,   2, 10, 0,  ARM_SHIRT, CLOTH, CLR_WHITE),
443
444 /* cloaks */
445 CLOAK("mummy wrapping", None,
446       1, 0,          0,  0, 0,  3,  2, 10, 1,  CLOTH, CLR_GRAY),
447         /* worn mummy wrapping blocks invisibility */
448 CLOAK("elven cloak", "faded pall",
449       0, 1,    STEALTH,  8, 0, 10, 60,  9, 1,  CLOTH, CLR_BLACK),
450 CLOAK("orcish cloak", "coarse mantelet",
451       0, 0,          0,  8, 0, 10, 40, 10, 1,  CLOTH, CLR_BLACK),
452 CLOAK("dwarvish cloak", "hooded cloak",
453       0, 0,          0,  8, 0, 10, 50, 10, 1,  CLOTH, HI_CLOTH),
454 CLOAK("oilskin cloak", "slippery cloak",
455       0, 0,          0,  8, 0, 10, 50,  9, 2,  CLOTH, HI_CLOTH),
456 CLOAK("robe", None,
457       1, 1,          0,  3, 0, 15, 50,  8, 2,  CLOTH, CLR_RED),
458         /* robe was adopted from slash'em, where it's worn as a suit
459            rather than as a cloak and there are several variations */
460 CLOAK("alchemy smock", "apron",
461       0, 1, POISON_RES,  9, 0, 10, 50,  9, 1,  CLOTH, CLR_WHITE),
462 CLOAK("leather cloak", None,
463       1, 0,          0,  8, 0, 15, 40,  9, 1,  LEATHER, CLR_BROWN),
464 /* with shuffled appearances... */
465 CLOAK("cloak of protection", "tattered cape",
466       0, 1, PROTECTION,  9, 0, 10, 50,  7, 3,  CLOTH, HI_CLOTH),
467         /* cloak of protection is now the only item conferring MC 3 */
468 CLOAK("cloak of invisibility", "opera cloak",
469       0, 1,      INVIS, 10, 0, 10, 60,  9, 1,  CLOTH, CLR_BRIGHT_MAGENTA),
470 CLOAK("cloak of magic resistance", "ornamental cope",
471       0, 1,  ANTIMAGIC,  2, 0, 10, 60,  9, 1,  CLOTH, CLR_WHITE),
472         /*  'cope' is not a spelling mistake... leave it be */
473 CLOAK("cloak of displacement", "piece of cloth",
474       0, 1,  DISPLACED, 10, 0, 10, 50,  9, 1,  CLOTH, HI_CLOTH),
475
476 /* shields */
477 SHIELD("small shield", None,
478        1, 0, 0,          0, 6, 0,  30,  3, 9, 0,  WOOD, HI_WOOD),
479 SHIELD("elven shield", "blue and green shield",
480        0, 0, 0,          0, 2, 0,  40,  7, 8, 0,  WOOD, CLR_GREEN),
481 SHIELD("Uruk-hai shield", "white-handed shield",
482        0, 0, 0,          0, 2, 0,  50,  7, 9, 0,  IRON, HI_METAL),
483 SHIELD("orcish shield", "red-eyed shield",
484        0, 0, 0,          0, 2, 0,  50,  7, 9, 0,  IRON, CLR_RED),
485 SHIELD("large shield", None,
486        1, 0, 1,          0, 7, 0, 100, 10, 8, 0,  IRON, HI_METAL),
487 SHIELD("dwarvish roundshield", "large round shield",
488        0, 0, 0,          0, 4, 0, 100, 10, 8, 0,  IRON, HI_METAL),
489 SHIELD("shield of reflection", "polished silver shield",
490        0, 1, 0, REFLECTING, 3, 0,  50, 50, 8, 0,  SILVER, HI_SILVER),
491
492 /* gloves */
493 /* These have their color but not material shuffled, so the IRON must
494  * stay CLR_BROWN (== HI_LEATHER) even though it's normally either
495  * HI_METAL or CLR_BLACK.  All have shuffled descriptions.
496  */
497 GLOVES("leather gloves", "old gloves",
498        0, 0,        0, 16, 1, 10,  8, 9, 0,  LEATHER, HI_LEATHER),
499 GLOVES("gauntlets of fumbling", "padded gloves",
500        0, 1, FUMBLING,  8, 1, 10, 50, 9, 0,  LEATHER, HI_LEATHER),
501 GLOVES("gauntlets of power", "riding gloves",
502        0, 1,        0,  8, 1, 30, 50, 9, 0,  IRON, CLR_BROWN),
503 GLOVES("gauntlets of dexterity", "fencing gloves",
504        0, 1,        0,  8, 1, 10, 50, 9, 0,  LEATHER, HI_LEATHER),
505
506 /* boots */
507 BOOTS("low boots", "walking shoes",
508       0, 0,          0, 25, 2, 10,  8, 9, 0, LEATHER, HI_LEATHER),
509 BOOTS("iron shoes", "hard shoes",
510       0, 0,          0,  7, 2, 50, 16, 8, 0, IRON, HI_METAL),
511 BOOTS("high boots", "jackboots",
512       0, 0,          0, 15, 2, 20, 12, 8, 0, LEATHER, HI_LEATHER),
513 /* with shuffled appearances... */
514 BOOTS("speed boots", "combat boots",
515       0, 1,       FAST, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER),
516 BOOTS("water walking boots", "jungle boots",
517       0, 1,   WWALKING, 12, 2, 15, 50, 9, 0, LEATHER, HI_LEATHER),
518 BOOTS("jumping boots", "hiking boots",
519       0, 1,    JUMPING, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER),
520 BOOTS("elven boots", "mud boots",
521       0, 1,    STEALTH, 12, 2, 15,  8, 9, 0, LEATHER, HI_LEATHER),
522 BOOTS("kicking boots", "buckled boots",
523       0, 1,          0, 12, 2, 50,  8, 9, 0, IRON, CLR_BROWN),
524         /* CLR_BROWN for same reason as gauntlets of power */
525 BOOTS("fumble boots", "riding boots",
526       0, 1,   FUMBLING, 12, 2, 20, 30, 9, 0, LEATHER, HI_LEATHER),
527 BOOTS("levitation boots", "snow boots",
528       0, 1, LEVITATION, 12, 2, 15, 30, 9, 0, LEATHER, HI_LEATHER),
529 #undef HELM
530 #undef CLOAK
531 #undef SHIELD
532 #undef GLOVES
533 #undef BOOTS
534 #undef ARMOR
535
536 /* rings ... */
537 #define RING(name,stone,power,cost,mgc,spec,mohs,metal,color) \
538     OBJECT(OBJ(name, stone),                                          \
539            BITS(0, 0, spec, 0, mgc, spec, 0, 0, 0,                    \
540                 HARDGEM(mohs), 0, P_NONE, metal),                     \
541            power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color)
542 RING("adornment", "wooden",
543      ADORNED,                  100, 1, 1, 2, WOOD, HI_WOOD),
544 RING("gain strength", "granite",
545      0,                        150, 1, 1, 7, MINERAL, HI_MINERAL),
546 RING("gain constitution", "opal",
547      0,                        150, 1, 1, 7, MINERAL, HI_MINERAL),
548 RING("increase accuracy", "clay",
549      0,                        150, 1, 1, 4, MINERAL, CLR_RED),
550 RING("increase damage", "coral",
551      0,                        150, 1, 1, 4, MINERAL, CLR_ORANGE),
552 RING("protection", "black onyx",
553      PROTECTION,               100, 1, 1, 7, MINERAL, CLR_BLACK),
554         /* 'PROTECTION' intrinsic enhances MC from worn armor by +1,
555            regardless of ring's enchantment; wearing a second ring of
556            protection (or even one ring of protection combined with
557            cloak of protection) doesn't give a second MC boost */
558 RING("regeneration", "moonstone",
559      REGENERATION,             200, 1, 0,  6, MINERAL, HI_MINERAL),
560 RING("searching", "tiger eye",
561      SEARCHING,                200, 1, 0,  6, GEMSTONE, CLR_BROWN),
562 RING("stealth", "jade",
563      STEALTH,                  100, 1, 0,  6, GEMSTONE, CLR_GREEN),
564 RING("sustain ability", "bronze",
565      FIXED_ABIL,               100, 1, 0,  4, COPPER, HI_COPPER),
566 RING("levitation", "agate",
567      LEVITATION,               200, 1, 0,  7, GEMSTONE, CLR_RED),
568 RING("hunger", "topaz",
569      HUNGER,                   100, 1, 0,  8, GEMSTONE, CLR_CYAN),
570 RING("aggravate monster", "sapphire",
571      AGGRAVATE_MONSTER,        150, 1, 0,  9, GEMSTONE, CLR_BLUE),
572 RING("conflict", "ruby",
573      CONFLICT,                 300, 1, 0,  9, GEMSTONE, CLR_RED),
574 RING("warning", "diamond",
575      WARNING,                  100, 1, 0, 10, GEMSTONE, CLR_WHITE),
576 RING("poison resistance", "pearl",
577      POISON_RES,               150, 1, 0,  4, BONE, CLR_WHITE),
578 RING("fire resistance", "iron",
579      FIRE_RES,                 200, 1, 0,  5, IRON, HI_METAL),
580 RING("cold resistance", "brass",
581      COLD_RES,                 150, 1, 0,  4, COPPER, HI_COPPER),
582 RING("shock resistance", "copper",
583      SHOCK_RES,                150, 1, 0,  3, COPPER, HI_COPPER),
584 RING("free action", "twisted",
585      FREE_ACTION,              200, 1, 0,  6, IRON, HI_METAL),
586 RING("slow digestion", "steel",
587      SLOW_DIGESTION,           200, 1, 0,  8, IRON, HI_METAL),
588 RING("teleportation", "silver",
589      TELEPORT,                 200, 1, 0,  3, SILVER, HI_SILVER),
590 RING("teleport control", "gold",
591      TELEPORT_CONTROL,         300, 1, 0,  3, GOLD, HI_GOLD),
592 RING("polymorph", "ivory",
593      POLYMORPH,                300, 1, 0,  4, BONE, CLR_WHITE),
594 RING("polymorph control", "emerald",
595      POLYMORPH_CONTROL,        300, 1, 0,  8, GEMSTONE, CLR_BRIGHT_GREEN),
596 RING("invisibility", "wire",
597      INVIS,                    150, 1, 0,  5, IRON, HI_METAL),
598 RING("see invisible", "engagement",
599      SEE_INVIS,                150, 1, 0,  5, IRON, HI_METAL),
600 RING("protection from shape changers", "shiny",
601      PROT_FROM_SHAPE_CHANGERS, 100, 1, 0,  5, IRON, CLR_BRIGHT_CYAN),
602 #undef RING
603
604 /* amulets ... - THE Amulet comes last because it is special */
605 #define AMULET(name,desc,power,prob) \
606     OBJECT(OBJ(name, desc),                                            \
607            BITS(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, P_NONE, IRON),        \
608            power, AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL)
609 AMULET("amulet of ESP",                "circular", TELEPAT, 175),
610 AMULET("amulet of life saving",       "spherical", LIFESAVED, 75),
611 AMULET("amulet of strangulation",          "oval", STRANGLED, 135),
612 AMULET("amulet of restful sleep",    "triangular", SLEEPY, 135),
613 AMULET("amulet versus poison",        "pyramidal", POISON_RES, 165),
614 AMULET("amulet of change",               "square", 0, 130),
615 AMULET("amulet of unchanging",          "concave", UNCHANGING, 45),
616 AMULET("amulet of reflection",        "hexagonal", REFLECTING, 75),
617 AMULET("amulet of magical breathing", "octagonal", MAGICAL_BREATHING, 65),
618 /* fixed descriptions; description duplication is deliberate;
619  * fake one must come before real one because selection for
620  * description shuffling stops when a non-magic amulet is encountered
621  */
622 OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor",
623            "Amulet of Yendor"),
624        BITS(0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, PLASTIC),
625        0, AMULET_CLASS, 0, 0, 20, 0, 0, 0, 0, 0, 1, HI_METAL),
626 OBJECT(OBJ("Amulet of Yendor", /* note: description == name */
627            "Amulet of Yendor"),
628        BITS(0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, MITHRIL),
629        0, AMULET_CLASS, 0, 0, 20, 30000, 0, 0, 0, 0, 20, HI_METAL),
630 #undef AMULET
631
632 /* tools ... */
633 /* tools with weapon characteristics come last */
634 #define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,mat,color) \
635     OBJECT(OBJ(name, desc),                                             \
636            BITS(kn, mrg, chg, 0, mgc, chg, 0, 0, 0, 0, 0, P_NONE, mat), \
637            0, TOOL_CLASS, prob, 0, wt, cost, 0, 0, 0, 0, wt, color)
638 #define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,mat,color) \
639     OBJECT(OBJ(name, desc),                                             \
640            BITS(kn, 0, chg, 1, mgc, chg, 0, 0, 0, 0, 0, P_NONE, mat),   \
641            0, TOOL_CLASS, prob, 0, wt, cost, 0, 0, 0, 0, wt, color)
642 #define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,sub,mat,clr)\
643     OBJECT(OBJ(name, desc),                                             \
644            BITS(kn, 0, 1, 0, mgc, 1, 0, 0, bi, 0, hitbon, sub, mat),    \
645            0, TOOL_CLASS, prob, 0, wt, cost, sdam, ldam, hitbon, 0, wt, clr)
646 /* containers */
647 CONTAINER("large box",       None, 1, 0, 0, 40, 350,   8, WOOD, HI_WOOD),
648 CONTAINER("chest",           None, 1, 0, 0, 35, 600,  16, WOOD, HI_WOOD),
649 CONTAINER("ice box",         None, 1, 0, 0,  5, 900,  42, PLASTIC, CLR_WHITE),
650 CONTAINER("sack",           "bag", 0, 0, 0, 35,  15,   2, CLOTH, HI_CLOTH),
651 CONTAINER("oilskin sack",   "bag", 0, 0, 0,  5,  15, 100, CLOTH, HI_CLOTH),
652 CONTAINER("bag of holding", "bag", 0, 1, 0, 20,  15, 100, CLOTH, HI_CLOTH),
653 CONTAINER("bag of tricks",  "bag", 0, 1, 1, 20,  15, 100, CLOTH, HI_CLOTH),
654 #undef CONTAINER
655
656 /* lock opening tools */
657 TOOL("skeleton key",       "key", 0, 0, 0, 0, 80,  3, 10, IRON, HI_METAL),
658 TOOL("lock pick",           None, 1, 0, 0, 0, 60,  4, 20, IRON, HI_METAL),
659 TOOL("credit card",         None, 1, 0, 0, 0, 15,  1, 10, PLASTIC, CLR_WHITE),
660 /* light sources */
661 TOOL("tallow candle",   "candle", 0, 1, 0, 0, 20,  2, 10, WAX, CLR_WHITE),
662 TOOL("wax candle",      "candle", 0, 1, 0, 0,  5,  2, 20, WAX, CLR_WHITE),
663 TOOL("brass lantern",       None, 1, 0, 0, 0, 30, 30, 12, COPPER, CLR_YELLOW),
664 TOOL("oil lamp",          "lamp", 0, 0, 0, 0, 45, 20, 10, COPPER, CLR_YELLOW),
665 TOOL("magic lamp",        "lamp", 0, 0, 1, 0, 15, 20, 50, COPPER, CLR_YELLOW),
666 /* other tools */
667 TOOL("expensive camera",    None, 1, 0, 0, 1, 15, 12,200, PLASTIC, CLR_BLACK),
668 TOOL("mirror",   "looking glass", 0, 0, 0, 0, 45, 13, 10, GLASS, HI_SILVER),
669 TOOL("crystal ball", "glass orb", 0, 0, 1, 1, 15,150, 60, GLASS, HI_GLASS),
670 TOOL("lenses",              None, 1, 0, 0, 0,  5,  3, 80, GLASS, HI_GLASS),
671 TOOL("blindfold",           None, 1, 0, 0, 0, 50,  2, 20, CLOTH, CLR_BLACK),
672 TOOL("towel",               None, 1, 0, 0, 0, 50,  2, 50, CLOTH, CLR_MAGENTA),
673 TOOL("saddle",              None, 1, 0, 0, 0,  5,200,150, LEATHER, HI_LEATHER),
674 TOOL("leash",               None, 1, 0, 0, 0, 65, 12, 20, LEATHER, HI_LEATHER),
675 TOOL("stethoscope",         None, 1, 0, 0, 0, 25,  4, 75, IRON, HI_METAL),
676 TOOL("tinning kit",         None, 1, 0, 0, 1, 15,100, 30, IRON, HI_METAL),
677 TOOL("tin opener",          None, 1, 0, 0, 0, 35,  4, 30, IRON, HI_METAL),
678 TOOL("can of grease",       None, 1, 0, 0, 1, 15, 15, 20, IRON, HI_METAL),
679 TOOL("figurine",            None, 1, 0, 1, 0, 25, 50, 80, MINERAL, HI_MINERAL),
680         /* monster type specified by obj->corpsenm */
681 TOOL("magic marker",        None, 1, 0, 1, 1, 15,  2, 50, PLASTIC, CLR_RED),
682 /* traps */
683 TOOL("land mine",           None, 1, 0, 0, 0, 0, 300,180, IRON, CLR_RED),
684 TOOL("beartrap",            None, 1, 0, 0, 0, 0, 200, 60, IRON, HI_METAL),
685 /* instruments;
686    "If tin whistles are made out of tin, what do they make foghorns out of?" */
687 TOOL("tin whistle",    "whistle", 0, 0, 0, 0,100, 3, 10, METAL, HI_METAL),
688 TOOL("magic whistle",  "whistle", 0, 0, 1, 0, 30, 3, 10, METAL, HI_METAL),
689 TOOL("wooden flute",     "flute", 0, 0, 0, 0,  4, 5, 12, WOOD, HI_WOOD),
690 TOOL("magic flute",      "flute", 0, 0, 1, 1,  2, 5, 36, WOOD, HI_WOOD),
691 TOOL("tooled horn",       "horn", 0, 0, 0, 0,  5, 18, 15, BONE, CLR_WHITE),
692 TOOL("frost horn",        "horn", 0, 0, 1, 1,  2, 18, 50, BONE, CLR_WHITE),
693 TOOL("fire horn",         "horn", 0, 0, 1, 1,  2, 18, 50, BONE, CLR_WHITE),
694 TOOL("horn of plenty",    "horn", 0, 0, 1, 1,  2, 18, 50, BONE, CLR_WHITE),
695         /* horn, but not an instrument */
696 TOOL("wooden harp",       "harp", 0, 0, 0, 0,  4, 30, 50, WOOD, HI_WOOD),
697 TOOL("magic harp",        "harp", 0, 0, 1, 1,  2, 30, 50, WOOD, HI_WOOD),
698 TOOL("bell",                None, 1, 0, 0, 0,  2, 30, 50, COPPER, HI_COPPER),
699 TOOL("bugle",               None, 1, 0, 0, 0,  4, 10, 15, COPPER, HI_COPPER),
700 TOOL("leather drum",      "drum", 0, 0, 0, 0,  4, 25, 25, LEATHER, HI_LEATHER),
701 TOOL("drum of earthquake","drum", 0, 0, 1, 1,  2, 25, 25, LEATHER, HI_LEATHER),
702 /* tools useful as weapons */
703 WEPTOOL("pick-axe", None,
704         1, 0, 0, 20, 100,  50,  6,  3, WHACK,  P_PICK_AXE, IRON, HI_METAL),
705 WEPTOOL("grappling hook", "iron hook",
706         0, 0, 0,  5,  30,  50,  2,  6, WHACK,  P_FLAIL,    IRON, HI_METAL),
707 WEPTOOL("unicorn horn", None,
708         1, 1, 1,  0,  20, 100, 12, 12, PIERCE, P_UNICORN_HORN,
709                                                            BONE, CLR_WHITE),
710         /* 3.4.1: unicorn horn left classified as "magic" */
711 /* two unique tools;
712  * not artifacts, despite the comment which used to be here
713  */
714 OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"),
715        BITS(0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, P_NONE, GOLD),
716        0, TOOL_CLASS, 0, 0, 10, 5000, 0, 0, 0, 0, 200, HI_GOLD),
717 OBJECT(OBJ("Bell of Opening", "silver bell"),
718        BITS(0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, P_NONE, SILVER),
719        0, TOOL_CLASS, 0, 0, 10, 5000, 0, 0, 0, 0, 50, HI_SILVER),
720 #undef TOOL
721 #undef WEPTOOL
722
723 /* Comestibles ... */
724 #define FOOD(name, prob, delay, wt, unk, tin, nutrition, color)         \
725     OBJECT(OBJ(name, None),                                       \
726            BITS(1, 1, unk, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, tin), 0,     \
727            FOOD_CLASS, prob, delay, wt, nutrition / 20 + 5, 0, 0, 0, 0, \
728            nutrition, color)
729 /* All types of food (except tins & corpses) must have a delay of at least 1.
730  * Delay on corpses is computed and is weight dependant.
731  * Domestic pets prefer tripe rations above all others.
732  * Fortune cookies can be read, using them up without ingesting them.
733  * Carrots improve your vision.
734  * +0 tins contain monster meat.
735  * +1 tins (of spinach) make you stronger (like Popeye).
736  * Meatballs/sticks/rings are only created from objects via stone to flesh.
737  */
738 /* meat */
739 FOOD("tripe ration",        140,  2, 10, 0, FLESH, 200, CLR_BROWN),
740 FOOD("corpse",                0,  1,  0, 0, FLESH,   0, CLR_BROWN),
741 FOOD("egg",                  85,  1,  1, 1, FLESH,  80, CLR_WHITE),
742 FOOD("meatball",              0,  1,  1, 0, FLESH,   5, CLR_BROWN),
743 FOOD("meat stick",            0,  1,  1, 0, FLESH,   5, CLR_BROWN),
744 FOOD("huge chunk of meat",    0, 20,400, 0, FLESH,2000, CLR_BROWN),
745 /* special case because it's not mergable */
746 OBJECT(OBJ("meat ring", None),
747        BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, FLESH),
748        0, FOOD_CLASS, 0, 1, 5, 1, 0, 0, 0, 0, 5, CLR_BROWN),
749 /* pudding 'corpses' will turn into these and combine;
750    must be in same order as the pudding monsters */
751 FOOD("glob of gray ooze",     0,  2, 20, 0, FLESH,  20, CLR_GRAY),
752 FOOD("glob of brown pudding", 0,  2, 20, 0, FLESH,  20, CLR_BROWN),
753 FOOD("glob of green slime",   0,  2, 20, 0, FLESH,  20, CLR_GREEN),
754 FOOD("glob of black pudding", 0,  2, 20, 0, FLESH,  20, CLR_BLACK),
755
756 /* fruits & veggies */
757 FOOD("kelp frond",            0,  1,  1, 0, VEGGY,  30, CLR_GREEN),
758 FOOD("eucalyptus leaf",       3,  1,  1, 0, VEGGY,  30, CLR_GREEN),
759 FOOD("apple",                15,  1,  2, 0, VEGGY,  50, CLR_RED),
760 FOOD("orange",               10,  1,  2, 0, VEGGY,  80, CLR_ORANGE),
761 FOOD("pear",                 10,  1,  2, 0, VEGGY,  50, CLR_BRIGHT_GREEN),
762 FOOD("melon",                10,  1,  5, 0, VEGGY, 100, CLR_BRIGHT_GREEN),
763 FOOD("banana",               10,  1,  2, 0, VEGGY,  80, CLR_YELLOW),
764 FOOD("carrot",               15,  1,  2, 0, VEGGY,  50, CLR_ORANGE),
765 FOOD("sprig of wolfsbane",    7,  1,  1, 0, VEGGY,  40, CLR_GREEN),
766 FOOD("clove of garlic",       7,  1,  1, 0, VEGGY,  40, CLR_WHITE),
767 /* name of slime mold is changed based on player's OPTION=fruit:something
768    and bones data might have differently named ones from prior games */
769 FOOD("slime mold",           75,  1,  5, 0, VEGGY, 250, HI_ORGANIC),
770
771 /* people food */
772 FOOD("lump of royal jelly",   0,  1,  2, 0, VEGGY, 200, CLR_YELLOW),
773 FOOD("cream pie",            25,  1, 10, 0, VEGGY, 100, CLR_WHITE),
774 FOOD("candy bar",            13,  1,  2, 0, VEGGY, 100, CLR_BROWN),
775 FOOD("fortune cookie",       55,  1,  1, 0, VEGGY,  40, CLR_YELLOW),
776 FOOD("pancake",              25,  2,  2, 0, VEGGY, 200, CLR_YELLOW),
777 FOOD("lembas wafer",         20,  2,  5, 0, VEGGY, 800, CLR_WHITE),
778 FOOD("cram ration",          20,  3, 15, 0, VEGGY, 600, HI_ORGANIC),
779 FOOD("food ration",         380,  5, 20, 0, VEGGY, 800, HI_ORGANIC),
780 FOOD("K-ration",              0,  1, 10, 0, VEGGY, 400, HI_ORGANIC),
781 FOOD("C-ration",              0,  1, 10, 0, VEGGY, 300, HI_ORGANIC),
782 /* tins have type specified by obj->spe (+1 for spinach, other implies
783    flesh; negative specifies preparation method {homemade,boiled,&c})
784    and by obj->corpsenm (type of monster flesh) */
785 FOOD("tin",                  75,  0, 10, 1, METAL,   0, HI_METAL),
786 #undef FOOD
787
788 /* potions ... */
789 #define POTION(name,desc,mgc,power,prob,cost,color) \
790     OBJECT(OBJ(name, desc),                                             \
791            BITS(0, 1, 0, 0, mgc, 0, 0, 0, 0, 0, 0, P_NONE, GLASS),      \
792            power, POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color)
793 POTION("gain ability",           "ruby",  1, 0, 42, 300, CLR_RED),
794 POTION("restore ability",        "pink",  1, 0, 40, 100, CLR_BRIGHT_MAGENTA),
795 POTION("confusion",            "orange",  1, CONFUSION, 42, 100, CLR_ORANGE),
796 POTION("blindness",            "yellow",  1, BLINDED, 40, 150, CLR_YELLOW),
797 POTION("paralysis",           "emerald",  1, 0, 42, 300, CLR_BRIGHT_GREEN),
798 POTION("speed",            "dark green",  1, FAST, 42, 200, CLR_GREEN),
799 POTION("levitation",             "cyan",  1, LEVITATION, 42, 200, CLR_CYAN),
800 POTION("hallucination",      "sky blue",  1, HALLUC, 40, 100, CLR_CYAN),
801 POTION("invisibility", "brilliant blue",  1, INVIS, 40, 150, CLR_BRIGHT_BLUE),
802 POTION("see invisible",       "magenta",  1, SEE_INVIS, 42, 50, CLR_MAGENTA),
803 POTION("healing",          "purple-red",  1, 0, 57, 100, CLR_MAGENTA),
804 POTION("extra healing",          "puce",  1, 0, 47, 100, CLR_RED),
805 POTION("gain level",            "milky",  1, 0, 20, 300, CLR_WHITE),
806 POTION("enlightenment",        "swirly",  1, 0, 20, 200, CLR_BROWN),
807 POTION("monster detection",    "bubbly",  1, 0, 40, 150, CLR_WHITE),
808 POTION("object detection",      "smoky",  1, 0, 42, 150, CLR_GRAY),
809 POTION("gain energy",          "cloudy",  1, 0, 42, 150, CLR_WHITE),
810 POTION("sleeping",       "effervescent",  1, 0, 42, 100, CLR_GRAY),
811 POTION("full healing",          "black",  1, 0, 10, 200, CLR_BLACK),
812 POTION("polymorph",            "golden",  1, 0, 10, 200, CLR_YELLOW),
813 POTION("booze",                 "brown",  0, 0, 42,  50, CLR_BROWN),
814 POTION("sickness",              "fizzy",  0, 0, 42,  50, CLR_CYAN),
815 POTION("fruit juice",            "dark",  0, 0, 42,  50, CLR_BLACK),
816 POTION("acid",                  "white",  0, 0, 10, 250, CLR_WHITE),
817 POTION("oil",                   "murky",  0, 0, 30, 250, CLR_BROWN),
818 /* fixed description
819  */
820 POTION("water",                 "clear",  0, 0, 92, 100, CLR_CYAN),
821 #undef POTION
822
823 /* scrolls ... */
824 #define SCROLL(name,text,mgc,prob,cost) \
825     OBJECT(OBJ(name, text),                                           \
826            BITS(0, 1, 0, 0, mgc, 0, 0, 0, 0, 0, 0, P_NONE, PAPER),    \
827            0, SCROLL_CLASS, prob, 0, 5, cost, 0, 0, 0, 0, 6, HI_PAPER)
828 SCROLL("enchant armor",              "ZELGO MER",  1,  63,  80),
829 SCROLL("destroy armor",         "JUYED AWK YACC",  1,  45, 100),
830 SCROLL("confuse monster",                 "NR 9",  1,  53, 100),
831 SCROLL("scare monster",   "XIXAXA XOXAXA XUXAXA",  1,  35, 100),
832 SCROLL("remove curse",             "PRATYAVAYAH",  1,  65,  80),
833 SCROLL("enchant weapon",         "DAIYEN FOOELS",  1,  80,  60),
834 SCROLL("create monster",       "LEP GEX VEN ZEA",  1,  45, 200),
835 SCROLL("taming",                   "PRIRUTSENIE",  1,  15, 200),
836 SCROLL("genocide",                  "ELBIB YLOH",  1,  15, 300),
837 SCROLL("light",                 "VERR YED HORRE",  1,  90,  50),
838 SCROLL("teleportation",        "VENZAR BORGAVVE",  1,  55, 100),
839 SCROLL("gold detection",                 "THARR",  1,  33, 100),
840 SCROLL("food detection",               "YUM YUM",  1,  25, 100),
841 SCROLL("identify",                  "KERNOD WEL",  1, 180,  20),
842 SCROLL("magic mapping",              "ELAM EBOW",  1,  45, 100),
843 SCROLL("amnesia",                   "DUAM XNAHT",  1,  35, 200),
844 SCROLL("fire",                  "ANDOVA BEGARIN",  1,  30, 100),
845 SCROLL("earth",                          "KIRJE",  1,  18, 200),
846 SCROLL("punishment",            "VE FORBRYDERNE",  1,  15, 300),
847 SCROLL("charging",                "HACKEM MUCHE",  1,  15, 300),
848 SCROLL("stinking cloud",             "VELOX NEB",  1,  15, 300),
849     /* Extra descriptions, shuffled into use at start of new game.
850      * Code in win/share/tilemap.c depends on SCR_STINKING_CLOUD preceding
851      * these and on how many of them there are.  If a real scroll gets added
852      * after stinking cloud or the number of extra descriptions changes,
853      * tilemap.c must be modified to match.
854      */
855 SCROLL(None,      "FOOBIE BLETCH",  1,   0, 100),
856 SCROLL(None,              "TEMOV",  1,   0, 100),
857 SCROLL(None,         "GARVEN DEH",  1,   0, 100),
858 SCROLL(None,            "READ ME",  1,   0, 100),
859 SCROLL(None,      "ETAOIN SHRDLU",  1,   0, 100),
860 SCROLL(None,        "LOREM IPSUM",  1,   0, 100),
861 SCROLL(None,              "FNORD",  1,   0, 100), /* Illuminati */
862 SCROLL(None,            "KO BATE",  1,   0, 100), /* Kurd Lasswitz */
863 SCROLL(None,      "ABRA KA DABRA",  1,   0, 100), /* traditional incantation */
864 SCROLL(None,       "ASHPD SODALG",  1,   0, 100), /* Portal */
865 SCROLL(None,            "ZLORFIK",  1,   0, 100), /* Zak McKracken */
866 SCROLL(None,      "GNIK SISI VLE",  1,   0, 100), /* Zak McKracken */
867 SCROLL(None,    "HAPAX LEGOMENON",  1,   0, 100),
868 SCROLL(None,  "EIRIS SAZUN IDISI",  1,   0, 100), /* Merseburg Incantations */
869 SCROLL(None,    "PHOL ENDE WODAN",  1,   0, 100), /* Merseburg Incantations */
870 SCROLL(None,              "GHOTI",  1,   0, 100), /* pronounced as 'fish',
871                                                         George Bernard Shaw */
872 SCROLL(None, "MAPIRO MAHAMA DIROMAT", 1, 0, 100), /* Wizardry */
873 SCROLL(None,  "VAS CORP BET MANI",  1,   0, 100), /* Ultima */
874 SCROLL(None,            "XOR OTA",  1,   0, 100), /* Aarne Haapakoski */
875 SCROLL(None, "STRC PRST SKRZ KRK",  1,   0, 100), /* Czech and Slovak
876                                                         tongue-twister */
877     /* These must come last because they have special fixed descriptions.
878      */
879 #ifdef MAIL
880 SCROLL("mail",          "stamped",  0,   0,   0),
881 #endif
882 SCROLL("blank paper", "unlabeled",  0,  28,  60),
883 #undef SCROLL
884
885 /* spellbooks ... */
886 /* expanding beyond 52 spells would require changes in spellcasting
887    or imposition of a limit on number of spells hero can know because
888    they are currently assigned successive letters, a-zA-Z, when learned */
889 #define SPELL(name,desc,sub,prob,delay,level,mgc,dir,color)  \
890     OBJECT(OBJ(name, desc),                                             \
891            BITS(0, 0, 0, 0, mgc, 0, 0, 0, 0, 0, dir, sub, PAPER),       \
892            0, SPBOOK_CLASS, prob, delay, 50, level * 100,               \
893            0, 0, 0, level, 20, color)
894 SPELL("dig",             "parchment",
895       P_MATTER_SPELL,      20,  6, 5, 1, RAY, HI_PAPER),
896 SPELL("magic missile",   "vellum",
897       P_ATTACK_SPELL,      45,  2, 2, 1, RAY, HI_PAPER),
898 SPELL("fireball",        "ragged",
899       P_ATTACK_SPELL,      20,  4, 4, 1, RAY, HI_PAPER),
900 SPELL("cone of cold",    "dog eared",
901       P_ATTACK_SPELL,      10,  7, 4, 1, RAY, HI_PAPER),
902 SPELL("sleep",           "mottled",
903       P_ENCHANTMENT_SPELL, 50,  1, 1, 1, RAY, HI_PAPER),
904 SPELL("finger of death", "stained",
905       P_ATTACK_SPELL,       5, 10, 7, 1, RAY, HI_PAPER),
906 SPELL("light",           "cloth",
907       P_DIVINATION_SPELL,  45,  1, 1, 1, NODIR, HI_CLOTH),
908 SPELL("detect monsters", "leathery",
909       P_DIVINATION_SPELL,  43,  1, 1, 1, NODIR, HI_LEATHER),
910 SPELL("healing",         "white",
911       P_HEALING_SPELL,     40,  2, 1, 1, IMMEDIATE, CLR_WHITE),
912 SPELL("knock",           "pink",
913       P_MATTER_SPELL,      35,  1, 1, 1, IMMEDIATE, CLR_BRIGHT_MAGENTA),
914 SPELL("force bolt",      "red",
915       P_ATTACK_SPELL,      35,  2, 1, 1, IMMEDIATE, CLR_RED),
916 SPELL("confuse monster", "orange",
917       P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_ORANGE),
918 SPELL("cure blindness",  "yellow",
919       P_HEALING_SPELL,     25,  2, 2, 1, IMMEDIATE, CLR_YELLOW),
920 SPELL("drain life",      "velvet",
921       P_ATTACK_SPELL,      10,  2, 2, 1, IMMEDIATE, CLR_MAGENTA),
922 SPELL("slow monster",    "light green",
923       P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_BRIGHT_GREEN),
924 SPELL("wizard lock",     "dark green",
925       P_MATTER_SPELL,      30,  3, 2, 1, IMMEDIATE, CLR_GREEN),
926 SPELL("create monster",  "turquoise",
927       P_CLERIC_SPELL,      35,  3, 2, 1, NODIR, CLR_BRIGHT_CYAN),
928 SPELL("detect food",     "cyan",
929       P_DIVINATION_SPELL,  30,  3, 2, 1, NODIR, CLR_CYAN),
930 SPELL("cause fear",      "light blue",
931       P_ENCHANTMENT_SPELL, 25,  3, 3, 1, NODIR, CLR_BRIGHT_BLUE),
932 SPELL("clairvoyance",    "dark blue",
933       P_DIVINATION_SPELL,  15,  3, 3, 1, NODIR, CLR_BLUE),
934 SPELL("cure sickness",   "indigo",
935       P_HEALING_SPELL,     32,  3, 3, 1, NODIR, CLR_BLUE),
936 SPELL("charm monster",   "magenta",
937       P_ENCHANTMENT_SPELL, 20,  3, 3, 1, IMMEDIATE, CLR_MAGENTA),
938 SPELL("haste self",      "purple",
939       P_ESCAPE_SPELL,      33,  4, 3, 1, NODIR, CLR_MAGENTA),
940 SPELL("detect unseen",   "violet",
941       P_DIVINATION_SPELL,  20,  4, 3, 1, NODIR, CLR_MAGENTA),
942 SPELL("levitation",      "tan",
943       P_ESCAPE_SPELL,      20,  4, 4, 1, NODIR, CLR_BROWN),
944 SPELL("extra healing",   "plaid",
945       P_HEALING_SPELL,     27,  5, 3, 1, IMMEDIATE, CLR_GREEN),
946 SPELL("restore ability", "light brown",
947       P_HEALING_SPELL,     25,  5, 4, 1, NODIR, CLR_BROWN),
948 SPELL("invisibility",    "dark brown",
949       P_ESCAPE_SPELL,      25,  5, 4, 1, NODIR, CLR_BROWN),
950 SPELL("detect treasure", "gray",
951       P_DIVINATION_SPELL,  20,  5, 4, 1, NODIR, CLR_GRAY),
952 SPELL("remove curse",    "wrinkled",
953       P_CLERIC_SPELL,      25,  5, 3, 1, NODIR, HI_PAPER),
954 SPELL("magic mapping",   "dusty",
955       P_DIVINATION_SPELL,  18,  7, 5, 1, NODIR, HI_PAPER),
956 SPELL("identify",        "bronze",
957       P_DIVINATION_SPELL,  20,  6, 3, 1, NODIR, HI_COPPER),
958 SPELL("turn undead",     "copper",
959       P_CLERIC_SPELL,      16,  8, 6, 1, IMMEDIATE, HI_COPPER),
960 SPELL("polymorph",       "silver",
961       P_MATTER_SPELL,      10,  8, 6, 1, IMMEDIATE, HI_SILVER),
962 SPELL("teleport away",   "gold",
963       P_ESCAPE_SPELL,      15,  6, 6, 1, IMMEDIATE, HI_GOLD),
964 SPELL("create familiar", "glittering",
965       P_CLERIC_SPELL,      10,  7, 6, 1, NODIR, CLR_WHITE),
966 SPELL("cancellation",    "shining",
967       P_MATTER_SPELL,      15,  8, 7, 1, IMMEDIATE, CLR_WHITE),
968 SPELL("protection",      "dull",
969       P_CLERIC_SPELL,      18,  3, 1, 1, NODIR, HI_PAPER),
970 SPELL("jumping",         "thin",
971       P_ESCAPE_SPELL,      20,  3, 1, 1, IMMEDIATE, HI_PAPER),
972 SPELL("stone to flesh",  "thick",
973       P_HEALING_SPELL,     15,  1, 3, 1, IMMEDIATE, HI_PAPER),
974 #if 0 /* DEFERRED */
975 /* from slash'em, create a tame critter which explodes when attacking,
976    damaging adjacent creatures--friend or foe--and dying in the process */
977 SPELL("flame sphere",    "canvas",
978       P_MATTER_SPELL,      20,  2, 1, 1, NODIR, CLR_BROWN),
979 SPELL("freeze sphere",   "hardcover",
980       P_MATTER_SPELL,      20,  2, 1, 1, NODIR, CLR_BROWN),
981 #endif
982 /* books with fixed descriptions
983  */
984 SPELL("blank paper", "plain", P_NONE, 18, 0, 0, 0, 0, HI_PAPER),
985 /* tribute book for 3.6 */
986 OBJECT(OBJ("novel", "paperback"),
987        BITS(0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, HI_PAPER),
988        0, SPBOOK_CLASS, 0, 0, 0, 20, 0, 0, 0, 1, 20, CLR_BRIGHT_BLUE),
989 /* a special, one of a kind, spellbook */
990 OBJECT(OBJ("Book of the Dead", "papyrus"),
991        BITS(0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, P_NONE, PAPER),
992        0, SPBOOK_CLASS, 0, 0, 20, 10000, 0, 0, 0, 7, 20, HI_PAPER),
993 #undef SPELL
994
995 /* wands ... */
996 #define WAND(name,typ,prob,cost,mgc,dir,metal,color) \
997     OBJECT(OBJ(name, typ),                                              \
998            BITS(0, 0, 1, 0, mgc, 1, 0, 0, 0, 0, dir, P_NONE, metal),    \
999            0, WAND_CLASS, prob, 0, 7, cost, 0, 0, 0, 0, 30, color)
1000 WAND("light",           "glass", 95, 100, 1, NODIR, GLASS, HI_GLASS),
1001 WAND("secret door detection",
1002                         "balsa", 50, 150, 1, NODIR, WOOD, HI_WOOD),
1003 WAND("enlightenment", "crystal", 15, 150, 1, NODIR, GLASS, HI_GLASS),
1004 WAND("create monster",  "maple", 45, 200, 1, NODIR, WOOD, HI_WOOD),
1005 WAND("wishing",          "pine",  5, 500, 1, NODIR, WOOD, HI_WOOD),
1006 WAND("nothing",           "oak", 25, 100, 0, IMMEDIATE, WOOD, HI_WOOD),
1007 WAND("striking",        "ebony", 75, 150, 1, IMMEDIATE, WOOD, HI_WOOD),
1008 WAND("make invisible", "marble", 45, 150, 1, IMMEDIATE, MINERAL, HI_MINERAL),
1009 WAND("slow monster",      "tin", 50, 150, 1, IMMEDIATE, METAL, HI_METAL),
1010 WAND("speed monster",   "brass", 50, 150, 1, IMMEDIATE, COPPER, HI_COPPER),
1011 WAND("undead turning", "copper", 50, 150, 1, IMMEDIATE, COPPER, HI_COPPER),
1012 WAND("polymorph",      "silver", 45, 200, 1, IMMEDIATE, SILVER, HI_SILVER),
1013 WAND("cancellation", "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE),
1014 WAND("teleportation", "iridium", 45, 200, 1, IMMEDIATE, METAL,
1015                                                              CLR_BRIGHT_CYAN),
1016 WAND("opening",          "zinc", 25, 150, 1, IMMEDIATE, METAL, HI_METAL),
1017 WAND("locking",      "aluminum", 25, 150, 1, IMMEDIATE, METAL, HI_METAL),
1018 WAND("probing",       "uranium", 30, 150, 1, IMMEDIATE, METAL, HI_METAL),
1019 WAND("digging",          "iron", 55, 150, 1, RAY, IRON, HI_METAL),
1020 WAND("magic missile",   "steel", 50, 150, 1, RAY, IRON, HI_METAL),
1021 WAND("fire",        "hexagonal", 40, 175, 1, RAY, IRON, HI_METAL),
1022 WAND("cold",            "short", 40, 175, 1, RAY, IRON, HI_METAL),
1023 WAND("sleep",           "runed", 50, 175, 1, RAY, IRON, HI_METAL),
1024 WAND("death",            "long",  5, 500, 1, RAY, IRON, HI_METAL),
1025 WAND("lightning",      "curved", 40, 175, 1, RAY, IRON, HI_METAL),
1026 /* extra descriptions, shuffled into use at start of new game */
1027 WAND(None,             "forked",  0, 150, 1, 0, WOOD, HI_WOOD),
1028 WAND(None,             "spiked",  0, 150, 1, 0, IRON, HI_METAL),
1029 WAND(None,            "jeweled",  0, 150, 1, 0, IRON, HI_MINERAL),
1030 #undef WAND
1031
1032 /* coins ... - so far, gold is all there is */
1033 #define COIN(name,prob,metal,worth) \
1034     OBJECT(OBJ(name, None),                                        \
1035            BITS(0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, metal),    \
1036            0, COIN_CLASS, prob, 0, 1, worth, 0, 0, 0, 0, 0, HI_GOLD)
1037 COIN("gold piece", 1000, GOLD, 1),
1038 #undef COIN
1039
1040 /* gems ... - includes stones and rocks but not boulders */
1041 #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) \
1042     OBJECT(OBJ(name, desc),                                             \
1043            BITS(0, 1, 0, 0, 0, 0, 0, 0, 0,                              \
1044                 HARDGEM(mohs), 0, -P_SLING, glass),                     \
1045            0, GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, 0, nutr, color)
1046 #define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) \
1047     OBJECT(OBJ(name, desc),                                             \
1048            BITS(kn, 1, 0, 0, mgc, 0, 0, 0, 0,                           \
1049                 HARDGEM(mohs), 0, -P_SLING, glass),                     \
1050            0, GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, 0, nutr, color)
1051 GEM("dilithium crystal", "white",  2, 1, 4500, 15,  5, GEMSTONE, CLR_WHITE),
1052 GEM("diamond",           "white",  3, 1, 4000, 15, 10, GEMSTONE, CLR_WHITE),
1053 GEM("ruby",                "red",  4, 1, 3500, 15,  9, GEMSTONE, CLR_RED),
1054 GEM("jacinth",          "orange",  3, 1, 3250, 15,  9, GEMSTONE, CLR_ORANGE),
1055 GEM("sapphire",           "blue",  4, 1, 3000, 15,  9, GEMSTONE, CLR_BLUE),
1056 GEM("black opal",        "black",  3, 1, 2500, 15,  8, GEMSTONE, CLR_BLACK),
1057 GEM("emerald",           "green",  5, 1, 2500, 15,  8, GEMSTONE, CLR_GREEN),
1058 GEM("turquoise",         "green",  6, 1, 2000, 15,  6, GEMSTONE, CLR_GREEN),
1059 GEM("citrine",          "yellow",  4, 1, 1500, 15,  6, GEMSTONE, CLR_YELLOW),
1060 GEM("aquamarine",        "green",  6, 1, 1500, 15,  8, GEMSTONE, CLR_GREEN),
1061 GEM("amber",   "yellowish brown",  8, 1, 1000, 15,  2, GEMSTONE, CLR_BROWN),
1062 GEM("topaz",   "yellowish brown", 10, 1,  900, 15,  8, GEMSTONE, CLR_BROWN),
1063 GEM("jet",               "black",  6, 1,  850, 15,  7, GEMSTONE, CLR_BLACK),
1064 GEM("opal",              "white", 12, 1,  800, 15,  6, GEMSTONE, CLR_WHITE),
1065 GEM("chrysoberyl",      "yellow",  8, 1,  700, 15,  5, GEMSTONE, CLR_YELLOW),
1066 GEM("garnet",              "red", 12, 1,  700, 15,  7, GEMSTONE, CLR_RED),
1067 GEM("amethyst",         "violet", 14, 1,  600, 15,  7, GEMSTONE, CLR_MAGENTA),
1068 GEM("jasper",              "red", 15, 1,  500, 15,  7, GEMSTONE, CLR_RED),
1069 GEM("fluorite",         "violet", 15, 1,  400, 15,  4, GEMSTONE, CLR_MAGENTA),
1070 GEM("obsidian",          "black",  9, 1,  200, 15,  6, GEMSTONE, CLR_BLACK),
1071 GEM("agate",            "orange", 12, 1,  200, 15,  6, GEMSTONE, CLR_ORANGE),
1072 GEM("jade",              "green", 10, 1,  300, 15,  6, GEMSTONE, CLR_GREEN),
1073 GEM("worthless piece of white glass", "white",
1074     77, 1, 0, 6, 5, GLASS, CLR_WHITE),
1075 GEM("worthless piece of blue glass", "blue",
1076     77, 1, 0, 6, 5, GLASS, CLR_BLUE),
1077 GEM("worthless piece of red glass", "red",
1078     77, 1, 0, 6, 5, GLASS, CLR_RED),
1079 GEM("worthless piece of yellowish brown glass", "yellowish brown",
1080     77, 1, 0, 6, 5, GLASS, CLR_BROWN),
1081 GEM("worthless piece of orange glass", "orange",
1082     76, 1, 0, 6, 5, GLASS, CLR_ORANGE),
1083 GEM("worthless piece of yellow glass", "yellow",
1084     77, 1, 0, 6, 5, GLASS, CLR_YELLOW),
1085 GEM("worthless piece of black glass", "black",
1086     76, 1, 0, 6, 5, GLASS, CLR_BLACK),
1087 GEM("worthless piece of green glass", "green",
1088     77, 1, 0, 6, 5, GLASS, CLR_GREEN),
1089 GEM("worthless piece of violet glass", "violet",
1090     77, 1, 0, 6, 5, GLASS, CLR_MAGENTA),
1091
1092 /* Placement note: there is a wishable subrange for
1093  * "gray stones" in the o_ranges[] array in objnam.c
1094  * that is currently everything between luckstones and flint
1095  * (inclusive).
1096  */
1097 ROCK("luckstone", "gray",  0,  10,  10, 60, 3, 3, 1, 10, 7, MINERAL, CLR_GRAY),
1098 ROCK("loadstone", "gray",  0,  10, 500,  1, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),
1099 ROCK("touchstone", "gray", 0,   8,  10, 45, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),
1100 ROCK("flint", "gray",      0,  10,  10,  1, 6, 6, 0, 10, 7, MINERAL, CLR_GRAY),
1101 ROCK("rock", None,         1, 100,  10,  0, 3, 3, 0, 10, 7, MINERAL, CLR_GRAY),
1102 #undef GEM
1103 #undef ROCK
1104
1105 /* miscellaneous ... */
1106 /* Note: boulders and rocks are not normally created at random; the
1107  * probabilities only come into effect when you try to polymorph them.
1108  * Boulders weigh more than MAX_CARR_CAP; statues use corpsenm to take
1109  * on a specific type and may act as containers (both affect weight).
1110  */
1111 OBJECT(OBJ("boulder", None),
1112        BITS(1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, P_NONE, MINERAL), 0,
1113        ROCK_CLASS, 100, 0, 6000, 0, 20, 20, 0, 0, 2000, HI_MINERAL),
1114 OBJECT(OBJ("statue", None),
1115        BITS(1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, P_NONE, MINERAL), 0,
1116        ROCK_CLASS, 900, 0, 2500, 0, 20, 20, 0, 0, 2500, CLR_WHITE),
1117
1118 OBJECT(OBJ("heavy iron ball", None),
1119        BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, WHACK, P_NONE, IRON), 0,
1120        BALL_CLASS, 1000, 0, 480, 10, 25, 25, 0, 0, 200, HI_METAL),
1121         /* +d4 when "very heavy" */
1122 OBJECT(OBJ("iron chain", None),
1123        BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, WHACK, P_NONE, IRON), 0,
1124        CHAIN_CLASS, 1000, 0, 120, 0, 4, 4, 0, 0, 200, HI_METAL),
1125         /* +1 both l & s */
1126
1127 /* Venom is normally a transitory missile (spit by various creatures)
1128  * but can be wished for in wizard mode so could occur in bones data.
1129  */
1130 OBJECT(OBJ("blinding venom", "splash of venom"),
1131        BITS(0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, P_NONE, LIQUID), 0,
1132        VENOM_CLASS, 500, 0, 1, 0, 0, 0, 0, 0, 0, HI_ORGANIC),
1133 OBJECT(OBJ("acid venom", "splash of venom"),
1134        BITS(0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, P_NONE, LIQUID), 0,
1135        VENOM_CLASS, 500, 0, 1, 0, 6, 6, 0, 0, 0, HI_ORGANIC),
1136         /* +d6 small or large */
1137
1138 /* fencepost, the deadly Array Terminator -- name [1st arg] *must* be NULL */
1139 OBJECT(OBJ(None, None),
1140        BITS(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, 0), 0,
1141        ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
1142 }; /* objects[] */
1143
1144 #ifndef OBJECTS_PASS_2_
1145
1146 /* perform recursive compilation for second structure */
1147 #undef OBJ
1148 #undef OBJECT
1149 #define OBJECTS_PASS_2_
1150 #include "objects.c"
1151
1152 /* clang-format on */
1153 /* *INDENT-ON* */
1154
1155 void NDECL(objects_init);
1156
1157 /* dummy routine used to force linkage */
1158 void
1159 objects_init()
1160 {
1161     return;
1162 }
1163
1164 #endif /* !OBJECTS_PASS_2_ */
1165
1166 /*objects.c*/