Source:NetHack 3.1.0/objects.c

From NetHackWiki
Revision as of 07:00, 4 March 2008 by Kernigh bot (talk | contribs) (NetHack 3.1.0/objects.c moved to Source:NetHack 3.1.0/objects.c: Robot: moved page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Below is the full text to objects.c from the source code of NetHack 3.1.0. To link to a particular line, write [[NetHack 3.1.0/objects.c#line123]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

1.    /*	SCCS Id: @(#)objects.c	3.1	92/12/13	*/
2.    /*	Copyright (c) Mike Threepoint, 1989 (890110) */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #ifndef OBJECTS_PASS_2_
6.    /* first pass */
7.    # include "config.h"
8.    # include "obj.h"
9.    # include "objclass.h"
10.   # include "prop.h"
11.   
12.   #else	/* !OBJECTS_PASS_2_ */
13.   /* second pass */
14.   # ifdef TEXTCOLOR
15.   #include "color.h"
16.   # endif
17.   #endif	/* !OBJECTS_PASS_2_ */
18.   
19.   /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */
20.   
21.   #ifndef OBJECTS_PASS_2_
22.   /* first pass -- object descriptive text */
23.   # define OBJ(name,desc) name,desc
24.   # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
25.   	{obj}
26.   /* note:  OBJ and BITS macros used to get around compiler argument limits */
27.   /*	the ctnr field of BITS currently does not map into struct objclass,
28.    *	and is ignored in the expansion */
29.   
30.   struct objdescr NEARDATA obj_descr[] = {
31.   #else
32.   /* second pass -- object definitions */
33.   
34.   # define BITS(nmkn,mrg,uskn,ctnr,mgc,chrg,uniq,big,dir,mtrl) nmkn,mrg,uskn,mgc,chrg,uniq,big,dir,mtrl /* SCO ODT 1.1 cpp fodder */
35.   /* SCO's version of MSC 5.x barfs on the line above without a trailing space */
36.   
37.   #ifdef TEXTCOLOR
38.   # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
39.   	{0, 0, NULL, bits, prp, sym, dly, color,\
40.   	 prob, wt, cost, sdam, ldam, oc1, oc2, nut}
41.   #else
42.   # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
43.   	{0, 0, NULL, bits, prp, sym, dly,\
44.   	 prob, wt, cost, sdam, ldam, oc1, oc2, nut}
45.   #endif
46.   
47.   struct objclass NEARDATA objects[] = {
48.   #endif
49.   /* dummy object[0] -- description [2nd arg] *must* be NULL */
50.   	OBJECT(OBJ("strange object",NULL), BITS(1,0,0,0,0,0,0,0,0,0), 0,
51.   			ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
52.   
53.   /* weapons ... */
54.   #define WEAPON(name,app,kn,mg,bi,prob,wt,cost,sdam,ldam,hitbon,metal,color) OBJECT( \
55.   		OBJ(name,app), BITS(kn,mg,1,0,0,1,0,bi,0,metal), 0, \
56.   		WEAPON_CLASS, prob, 0, \
57.   		wt, cost, sdam, ldam, hitbon, 0, wt, color )
58.   #define PROJECTILE(name,app,kn,prob,wt,cost,sdam,ldam,hitbon,metal,prop,color) OBJECT( \
59.   		OBJ(name,app), BITS(kn,1,1,0,0,1,0,0,0,metal), 0, \
60.   		WEAPON_CLASS, prob, 0, \
61.   		wt, cost, sdam, ldam, hitbon, prop, wt, color )
62.   #define BOW(name,app,kn,prob,wt,cost,sdam,ldam,hitbon,metal,prop,color) OBJECT( \
63.   		OBJ(name,app), BITS(kn,0,1,0,0,1,0,0,0,metal), 0, \
64.   		WEAPON_CLASS, prob, 0, \
65.   		wt, cost, sdam, ldam, hitbon, -(prop), wt, color )
66.   
67.   /* Note: for weapons that don't do an even die of damage (ex. 2-7 or 3-18)
68.    * the extra damage is added on in weapon.c, not here! */
69.   
70.   /* missiles */
71.   PROJECTILE("arrow",             NULL,           1,  42, 1,  2, 6, 6, 0,
72.   		   IRON, WP_BOW, HI_METAL),
73.   PROJECTILE("elven arrow",       "runed arrow",  0,  10, 1,  2, 7, 6, 0,
74.   		   IRON, WP_BOW, HI_METAL),
75.   PROJECTILE("orcish arrow",      "crude arrow",  0,  11, 1,  2, 5, 6, 0,
76.   		   IRON, WP_BOW, BLACK),
77.   PROJECTILE("silver arrow",      NULL,           1,   8, 1,  2, 6, 6, 0,
78.   		   SILVER, WP_BOW, HI_SILVER),
79.   PROJECTILE("ya",                "bamboo arrow", 0,   5, 1,  4, 7, 7, 1,
80.   		   METAL, WP_BOW, HI_METAL),
81.   PROJECTILE("crossbow bolt",     NULL,           1,  50, 1,  2, 4, 6, 0,
82.   		   IRON, WP_CROSSBOW, HI_METAL),
83.   
84.   WEAPON("dart",          NULL,           1, 1, 0, 60,  1,  2, 3, 2, 0, IRON, HI_METAL),
85.   WEAPON("shuriken",      "throwing star",0, 1, 0, 35,  1,  5, 8, 6, 2, IRON, HI_METAL),
86.   WEAPON("boomerang",     NULL,           1, 1, 0, 15,  5, 20, 9, 9, 0, WOOD, HI_WOOD),
87.   
88.   /* spears */
89.   WEAPON("spear",         NULL,           1, 1, 0, 50, 30,  3, 6, 8, 0, IRON, HI_METAL),
90.   WEAPON("elven spear",   "runed spear",  0, 1, 0, 10, 30,  3, 7, 8, 0, IRON, HI_METAL),
91.   WEAPON("orcish spear",  "crude spear",  0, 1, 0, 13, 30,  3, 5, 8, 0, IRON, BLACK),
92.   WEAPON("dwarvish spear", "stout spear", 0, 1, 0, 12, 35,  3, 8, 8, 0, IRON, HI_METAL),
93.   WEAPON("javelin",       "throwing spear",0,1, 0, 10, 20,  3, 6, 6, 0, IRON, HI_METAL),
94.   WEAPON("trident",       NULL,           1, 0, 0,  8, 25,  5, 6, 4, 0, IRON, HI_METAL),
95.   						/* +1 small, +2d4 large */
96.   WEAPON("lance",         NULL,           1, 0, 0,  8,180, 10, 6, 8, 0, IRON, HI_METAL),
97.   
98.   /* blades */
99.   WEAPON("dagger",        NULL,           1, 1, 0, 25, 10,  4,  4,  3, 2, IRON, HI_METAL),
100.  WEAPON("elven dagger",  "runed dagger", 0, 1, 0,  8, 10,  4,  5,  3, 2, IRON, HI_METAL),
101.  WEAPON("orcish dagger", "crude dagger", 0, 1, 0, 10, 10,  4,  3,  3, 2, IRON, BLACK),
102.  WEAPON("athame",        NULL,           1, 1, 0,  0, 10,  4,  4,  3, 2, IRON, HI_METAL),
103.  WEAPON("scalpel",       NULL,           1, 1, 0,  0,  5,  4,  3,  3, 2, IRON, HI_METAL),
104.  WEAPON("knife",         NULL,           1, 1, 0, 20,  5,  4,  3,  2, 0, IRON, HI_METAL),
105.  WEAPON("stiletto",      NULL,           1, 1, 0,  5,  5,  4,  3,  2, 0, IRON, HI_METAL),
106.  WEAPON("worm tooth",    NULL,           1, 0, 0,  0, 20,  2,  2,  2, 0, 0, WHITE),
107.  WEAPON("crysknife",     NULL,           1, 0, 0,  0, 20,100, 10, 10, 3, MINERAL, WHITE),
108.  WEAPON("dwarvish mattock",      "heavy pick",
109.  					0, 0, 1, 13,120, 50,12, 8,-1, IRON, HI_METAL),
110.  WEAPON("axe",           NULL,           1, 0, 0, 40, 60,  8,  6,  4, 0, IRON, HI_METAL),
111.  WEAPON("battle-axe","double-headed axe",0, 0, 1, 10,120, 40,  8,  6, 0, IRON, HI_METAL),
112.  						/* "double-bitted" ? */
113.  
114.  /* swords */
115.  WEAPON("short sword",           NULL,   1, 0, 0,  8, 30, 10,  6,  8, 0, IRON, HI_METAL),
116.  WEAPON("elven short sword",     "runed short sword",
117.  					0, 0, 0,  2, 30, 10,  8,  8, 0, IRON, HI_METAL),
118.  WEAPON("orcish short sword", "crude short sword",
119.  					0, 0, 0,  3, 30, 10,  5,  8, 0, IRON, BLACK),
120.  WEAPON("dwarvish short sword", "broad short sword",
121.  					0, 0, 0,  2, 30, 10,  7,  8, 0, IRON, HI_METAL),
122.  WEAPON("scimitar", "curved sword",	0, 0, 0, 15, 40, 15,  8,  8, 0, IRON, HI_METAL),
123.  WEAPON("silver saber", NULL,		1, 0, 0,  6, 40, 75,  8,  8, 0, SILVER, HI_SILVER),
124.  WEAPON("broadsword", NULL,		1, 0, 0,  8, 70, 10,  4,  6, 0, IRON, HI_METAL),
125.  						/* +d4 small, +1 large */
126.  WEAPON("elven broadsword", "runed broadsword",
127.  					0, 0, 0,  4, 70, 10,  6,  6, 0, IRON, HI_METAL),
128.  						/* +d4 small, +1 large */
129.  WEAPON("long sword", NULL,		1, 0, 0, 50, 40, 15,  8, 12, 0, IRON, HI_METAL),
130.  WEAPON("two-handed sword", NULL,	1, 0, 1, 22,150, 50, 12,  6, 0, IRON, HI_METAL),
131.  						/* +2d6 large */
132.  WEAPON("katana", "samurai sword",	0, 0, 0,  4, 40, 80, 10, 12, 1, IRON, HI_METAL),
133.  /* two set-up-for-artifacts swords */
134.  						/* +2d6 large */
135.  WEAPON("tsurugi", "long samurai sword", 0, 0, 1,  0, 60,500, 16,  8, 2, METAL, HI_METAL),
136.  						/* +5 */
137.  WEAPON("runesword", "runed broadsword", 0, 0, 0,  0, 40,300,  4,  6, 0, IRON, BLACK),
138.  						/* +d4 small, +1 large */
139.  						/* +5d2 +d8 from level drain */
140.  
141.  /* polearms */
142.  /* spear-type */
143.  WEAPON("partisan", "vulgar polearm",    0, 0, 1, 10, 80, 10,  6, 6, 0, IRON, HI_METAL),
144.  						/* +1 large */
145.  WEAPON("ranseur", "hilted polearm",     0, 0, 1, 10, 50,  6,  4, 4, 0, IRON, HI_METAL),
146.  						/* +d4 both */
147.  WEAPON("spetum", "forked polearm",      0, 0, 1, 10, 50,  5,  6, 6, 0, IRON, HI_METAL),
148.  						/* +1 small, +d6 large */
149.  WEAPON("glaive", "single-edged polearm",0, 0, 1, 15, 75,  6,  6,10, 0, IRON, HI_METAL),
150.  /* axe-type */
151.  WEAPON("halberd", "angled poleaxe",     0, 0, 1, 16,150, 10, 10, 6, 0, IRON, HI_METAL),
152.  						/* +1d6 large */
153.  WEAPON("bardiche", "long poleaxe",      0, 0, 1,  8,120,  7,  4, 4, 0, IRON, HI_METAL),
154.  						/* +1d4 small, +2d4 large */
155.  WEAPON("voulge", "pole cleaver",        0, 0, 1,  8,125,  5,  4, 4, 0, IRON, HI_METAL),
156.  						/* +d4 both */
157.  /* curved/hooked */
158.  WEAPON("fauchard",      "pole sickle",  0, 0, 1, 11, 60,  5,  6, 8, 0, IRON, HI_METAL),
159.  WEAPON("guisarme",      "pruning hook", 0, 0, 1, 11, 80,  5,  4, 8, 0, IRON, HI_METAL),
160.  						/* +1d4 small */
161.  WEAPON("bill-guisarme", "hooked polearm",0,0, 1,  8,120,  7,  4,10, 0, IRON, HI_METAL),
162.  						/* +1d4 small */
163.  /* other */
164.  WEAPON("lucern hammer", "pronged polearm",0,0,1, 10,150,  7,  4, 6, 0, IRON, HI_METAL),
165.  						/* +1d4 small */
166.  WEAPON("bec de corbin", "beaked polearm",0,0, 1,  8,100,  8,  8, 6, 0, IRON, HI_METAL),
167.  
168.  /* blunt */
169.  WEAPON("mace",          NULL,           1, 0, 0, 40, 30,  5,  6, 6, 0, IRON, HI_METAL),
170.  						/* +1 small */
171.  WEAPON("morning star",  NULL,           1, 0, 0, 12,120, 10,  4, 6, 0, IRON, HI_METAL),
172.  						/* +d4 small, +1 large */
173.  WEAPON("war hammer",    NULL,           1, 0, 0, 15, 50,  5,  4, 4, 0, IRON, HI_METAL),
174.  						/* +1 small */
175.  WEAPON("club",          NULL,           1, 0, 0, 12, 30,  3,  6, 3, 0, WOOD, HI_WOOD),
176.  #ifdef KOPS
177.  WEAPON("rubber hose",   NULL,           1, 0, 0,  0, 20,  3,  4, 3, 0, 0, BROWN),
178.  #endif
179.  WEAPON("quarterstaff",  "staff",        0, 0, 1, 11, 40,  5,  6, 6, 0, WOOD, HI_WOOD),
180.  /* two-piece */
181.  WEAPON("aklys",         "thonged club", 0, 0, 0,  8, 15,  4,  6, 3, 0, IRON, HI_METAL),
182.  WEAPON("flail",         NULL,           1, 0, 0, 40, 15,  4,  6, 4, 0, IRON, HI_METAL),
183.  						/* +1 small, +1d4 large */
184.  /* whip */
185.  WEAPON("bullwhip",      NULL,           1, 0, 0,  2, 20,  4,  2, 1, 0, LEATHER, BROWN),
186.  
187.  /* bows */
188.  BOW("bow",        NULL,         1,  24, 30,  60, 30, 6, 0, WOOD, WP_BOW, HI_WOOD),
189.  BOW("elven bow",  "runed bow",  0,  12, 30,  60, 35, 6, 0, WOOD, WP_BOW, HI_WOOD),
190.  BOW("orcish bow", "crude bow",  0,  12, 30,  60, 25, 6, 0, WOOD, WP_BOW, BLACK),
191.  BOW("yumi",       "long bow",   0,   0, 30,  60, 35, 6, 0, WOOD, WP_BOW, HI_WOOD),
192.  BOW("sling",      NULL,         1,  40,  3,  20,  4, 6, 0, WOOD, WP_SLING, HI_WOOD),
193.  BOW("crossbow",   NULL,         1,  45, 50,  40, 35, 6, 0, WOOD, WP_CROSSBOW, HI_WOOD),
194.  #undef WEAPON
195.  #undef PROJECTILE
196.  #undef BOW
197.  
198.  /* armor ... */
199.  /* IRON denotes ferrous metals, including steel.
200.   * Only IRON weapons and armor can rust.
201.   * Only COPPER (including brass) corrodes.
202.   * Some creatures are vulnerable to SILVER.
203.   */
204.  #define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,metal,c) OBJECT( \
205.  		OBJ(name,desc), BITS(kn,0,1,0,mgc,1,0,blk,0,metal), power, \
206.  		ARMOR_CLASS, prob, delay, wt, cost, \
207.  		0, 0, 10 - ac, can, wt, c )
208.  
209.  /* helmets */
210.  ARMOR("elven leather helm", "leather hat",
211.  		0, 0, 0, 0,  6, 1,  3,	 8, 9, 0, LEATHER, HI_LEATHER),
212.  ARMOR("orcish helm", "iron skull cap",
213.  		0, 0, 0, 0,  6, 1, 30,	10, 9, 0, IRON, BLACK),
214.  ARMOR("dwarvish iron helm", "hard hat",
215.  		0, 0, 0, 0,  6, 1, 40,	20, 8, 0, IRON, HI_METAL),
216.  ARMOR("fedora", NULL,
217.  		1, 0, 0, 0,  0, 0,  3,	 1,10, 0, CLOTH, BROWN),
218.  ARMOR("dented pot", NULL,
219.  		1, 0, 0, 0,  2, 0, 10,	 8, 9, 0, IRON, BLACK),
220.  ARMOR("helmet", "plumed helmet",
221.  		0, 0, 0, 0, 10, 1, 30,	10, 9, 0, IRON, HI_METAL),
222.  ARMOR("helm of brilliance", "etched helmet",
223.  		0, 1, 0, 0,  6, 1, 50,	50, 9, 0, IRON, GREEN),
224.  ARMOR("helm of opposite alignment", "crested helmet",
225.  		0, 1, 0, 0,  6, 1, 50,	50, 9, 0, IRON, HI_METAL),
226.  ARMOR("helm of telepathy", "visored helmet",
227.  		0, 1, 0, TELEPAT, 2, 1, 50, 50, 9, 0, IRON, HI_METAL),
228.  
229.  /* suits of armor */
230.  /*
231.   * There is code in polyself.c that assumes (1) and (2).
232.   * There is code in objnam.c, mon.c, read.c that assumes (2).
233.   *
234.   *	(1) The dragon scale mails and the dragon scales are together.
235.   *	(2) That the order of the dragon scale mail and dragon scales is the
236.   *	    the same defined in monst.c.
237.   */
238.  #define DRGN_ARMR(name,power,cost,ac,color) \
239.  	ARMOR(name,NULL,1,0,1,power,0,5,40,cost,ac,0,DRAGON_HIDE,color)
240.  DRGN_ARMR("gray dragon scale mail",   ANTIMAGIC,  1200, 1, GRAY),
241.  DRGN_ARMR("red dragon scale mail",    FIRE_RES,    900, 1, RED),
242.  DRGN_ARMR("white dragon scale mail",  COLD_RES,    900, 1, WHITE),
243.  DRGN_ARMR("orange dragon scale mail", SLEEP_RES,   900, 1, ORANGE_COLORED),
244.  DRGN_ARMR("black dragon scale mail",  DISINT_RES, 1200, 1, BLACK),
245.  DRGN_ARMR("blue dragon scale mail",   SHOCK_RES,   900, 1, BLUE),
246.  DRGN_ARMR("green dragon scale mail",  POISON_RES,  900, 1, GREEN),
247.  DRGN_ARMR("yellow dragon scale mail", 0,           900, 1, YELLOW),
248.  
249.  /* For now, only dragons leave these. */
250.  DRGN_ARMR("gray dragon scales",   ANTIMAGIC,  700, 7, GRAY),
251.  DRGN_ARMR("red dragon scales",    FIRE_RES,   500, 7, RED),
252.  DRGN_ARMR("white dragon scales",  COLD_RES,   500, 7, WHITE),
253.  DRGN_ARMR("orange dragon scales", SLEEP_RES,  500, 7, ORANGE_COLORED),
254.  DRGN_ARMR("black dragon scales",  DISINT_RES, 700, 7, BLACK),
255.  DRGN_ARMR("blue dragon scales",   SHOCK_RES,  500, 7, BLUE),
256.  DRGN_ARMR("green dragon scales",  POISON_RES, 500, 7, GREEN),
257.  DRGN_ARMR("yellow dragon scales", 0,          500, 7, YELLOW),
258.  #undef DRGN_ARMR
259.  
260.  ARMOR("plate mail", NULL,
261.  		1, 0, 1, 0,	44, 5, 450, 600,  3, 2, IRON, HI_METAL),
262.  ARMOR("crystal plate mail", NULL,
263.  		1, 0, 1, 0,	10, 5, 450, 820,  3, 2, GLASS, WHITE),
264.  #ifdef TOURIST
265.  ARMOR("bronze plate mail", NULL,
266.  		1, 0, 1, 0,	25, 5, 450, 400,  4, 0, COPPER, HI_COPPER),
267.  #else
268.  ARMOR("bronze plate mail", NULL,
269.  		1, 0, 1, 0,	35, 5, 450, 400,  4, 0, COPPER, HI_COPPER),
270.  #endif
271.  ARMOR("splint mail", NULL,
272.  		1, 0, 1, 0,	66, 5, 400,  80,  4, 1, IRON, HI_METAL),
273.  ARMOR("banded mail", NULL,
274.  		1, 0, 1, 0,	76, 5, 350,  90,  4, 0, IRON, HI_METAL),
275.  ARMOR("dwarvish mithril-coat", NULL,
276.  		1, 0, 0, 0,	10, 1, 150, 240,  4, 3, MITHRIL, HI_METAL),
277.  ARMOR("elven mithril-coat", NULL,
278.  		1, 0, 0, 0,	15, 1, 150, 240,  5, 3, MITHRIL, HI_METAL),
279.  ARMOR("chain mail", NULL,
280.  		1, 0, 0, 0,	76, 5, 300,  75,  5, 1, IRON, HI_METAL),
281.  ARMOR("orcish chain mail", "crude chain mail",
282.  		0, 0, 0, 0,	20, 5, 300,  75,  5, 1, IRON, BLACK),
283.  ARMOR("scale mail", NULL,
284.  		1, 0, 0, 0,	76, 5, 250,  45,  6, 0, IRON, HI_METAL),
285.  ARMOR("studded leather armor", NULL,
286.  		1, 0, 0, 0,	76, 3, 200,  15,  7, 1, LEATHER, HI_LEATHER),
287.  ARMOR("ring mail", NULL,
288.  		1, 0, 0, 0,	76, 5, 250, 100,  7, 0, IRON, HI_METAL),
289.  ARMOR("orcish ring mail", "crude ring mail",
290.  		0, 0, 0, 0,	20, 5, 250,  80,  8, 1, IRON, BLACK),
291.  ARMOR("leather armor", NULL,
292.  		1, 0, 0, 0,	85, 3, 150,   5,  8, 0, LEATHER, HI_LEATHER),
293.  ARMOR("leather jacket", NULL,
294.  		1, 0, 0, 0,	12, 0,  30,  10,  9, 0, LEATHER, BLACK),
295.  
296.  /* cloaks */
297.  /*  'cope' is not a spelling mistake... leave it be */
298.  ARMOR("mummy wrapping", NULL,
299.  		1, 0, 0, 0,		0, 0,  3,   2, 10, 1, CLOTH, GRAY),
300.  ARMOR("elven cloak", "faded pall",
301.  		0, 1, 0, STEALTH,      10, 0, 10,  60,	9, 3, CLOTH, BLACK),
302.  ARMOR("orcish cloak", "coarse mantelet",
303.  		0, 0, 0, 0,	       10, 0, 10,  40, 10, 2, CLOTH, BLACK),
304.  ARMOR("dwarvish cloak", "hooded cloak",
305.  		0, 0, 0, 0,	       10, 0, 10,  50, 10, 2, CLOTH, HI_CLOTH),
306.  ARMOR("oilskin cloak", "slippery cloak",
307.  		0, 0, 0, 0,	       10, 0, 10,  50,  9, 3, CLOTH, HI_CLOTH),
308.  ARMOR("cloak of protection", "tattered cape",
309.  		0, 1, 0, PROTECTION,   10, 0, 10,  50,	7, 3, CLOTH, HI_CLOTH),
310.  ARMOR("cloak of invisibility", "opera cloak",
311.  		0, 1, 0, INVIS,        11, 0, 10,  60,	9, 2, CLOTH, BRIGHT_MAGENTA),
312.  ARMOR("cloak of magic resistance", "ornamental cope",
313.  		0, 1, 0, ANTIMAGIC,	2, 0, 10,  60,	9, 3, CLOTH, WHITE),
314.  ARMOR("cloak of displacement", "piece of cloth",
315.  		0, 1, 0, DISPLACED,    11, 0, 10,  50,	9, 2, CLOTH, HI_CLOTH),
316.  
317.  /* shields */
318.  ARMOR("small shield", NULL,
319.  			1, 0, 0, 0,	6, 0, 30,   3,	9, 0, WOOD, HI_WOOD),
320.  /* TODO: these shield descriptions should be changed,
321.   * because you can't see colors when blind.
322.   */
323.  ARMOR("elven shield", "blue and green shield",
324.  			0, 0, 0, 0,	2, 0, 50,   7,	8, 0, IRON, GREEN),
325.  ARMOR("Uruk-hai shield", "white-handed shield",
326.  			0, 0, 0, 0,	2, 0, 50,   7,	9, 0, IRON, HI_METAL),
327.  ARMOR("orcish shield", "red-eyed shield",
328.  			0, 0, 0, 0,	2, 0, 50,   7,	9, 0, IRON, RED),
329.  ARMOR("large shield", NULL,
330.  			1, 0, 1, 0,	7, 0,100,  10,	8, 0, IRON, HI_METAL),
331.  ARMOR("dwarvish roundshield", "large round shield",
332.  			0, 0, 0, 0,	4, 0,100,  10,	8, 0, IRON, HI_METAL),
333.  ARMOR("shield of reflection", "polished silver shield",
334.  		0, 1, 0, REFLECTING,	3, 0, 50,  50,	8, 0, SILVER,  HI_SILVER),
335.  
336.  #ifdef TOURIST
337.  /* shirt */
338.  ARMOR("Hawaiian shirt", NULL,
339.  		1, 0, 0, 0,	       10, 0,  5,   3, 10, 0, CLOTH,   MAGENTA),
340.  #endif
341.  
342.  /* gloves */
343.  ARMOR("leather gloves", "old gloves",
344.  	0, 0, 0, 0,	       16, 1, 10,   8,	9, 0, LEATHER, HI_LEATHER),
345.  ARMOR("gauntlets of fumbling", "padded gloves",
346.  	0, 1, 0, FUMBLING,	8, 1, 10,  50,	9, 0, LEATHER, HI_LEATHER),
347.  ARMOR("gauntlets of power", "riding gloves",
348.  	0, 1, 0, 0,		8, 1, 30,  50,	9, 0, IRON,    BROWN),
349.  ARMOR("gauntlets of dexterity", "fencing gloves",
350.  	0, 1, 0, 0,		8, 1, 10,  50,	9, 0, LEATHER, HI_LEATHER),
351.  
352.  /* boots */
353.  ARMOR("low boots", "walking shoes",
354.  	0, 0, 0, 0,	       25, 2, 10,   8,	9, 0, LEATHER, HI_LEATHER),
355.  ARMOR("iron shoes", "hard shoes",
356.  	0, 0, 0, 0,		7, 2, 50,  16,	8, 0, IRON,    HI_METAL),
357.  ARMOR("high boots", "jackboots",
358.  	0, 0, 0, 0,	       15, 2, 20,  12,	8, 0, LEATHER, HI_LEATHER),
359.  ARMOR("speed boots", "combat boots",
360.  	0, 1, 0, FAST,	       12, 2, 20,  50,	9, 0, LEATHER, HI_LEATHER),
361.  ARMOR("water walking boots", "jungle boots",
362.  	0, 1, 0, WWALKING,     12, 2, 20,  50,	9, 0, LEATHER, HI_LEATHER),
363.  ARMOR("jumping boots", "hiking boots",
364.  	0, 1, 0, JUMPING,      12, 2, 20,  50,	9, 0, LEATHER, HI_LEATHER),
365.  ARMOR("elven boots", "mud boots",
366.  	0, 1, 0, STEALTH,      12, 2, 15,   8,	9, 0, LEATHER, HI_LEATHER),
367.  ARMOR("fumble boots", "riding boots",
368.  	0, 1, 0, FUMBLING,     12, 2, 20,  30,	9, 0, LEATHER, HI_LEATHER),
369.  ARMOR("levitation boots", "snow boots",
370.  	0, 1, 0, LEVITATION,   12, 2, 15,  30,	9, 0, LEATHER, HI_LEATHER),
371.  #undef ARMOR
372.  
373.  /* rings ... */
374.  #define RING(name,stone,power,cost,mgc,spec,metal,color) OBJECT( \
375.  		OBJ(name,stone), BITS(0,0,spec,0,mgc,spec,0,0,0,metal), \
376.  		power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color )
377.  RING("adornment",         "wooden",     ADORNED,        100, 0, 1, WOOD,     HI_WOOD),
378.  RING("gain strength",     "granite",    0,              150, 1, 1, MINERAL,  HI_MINERAL),
379.  RING("increase damage",   "coral",      0,              150, 1, 1, MINERAL,  ORANGE_COLORED),
380.  RING("protection",        "black onyx", PROTECTION,     100, 1, 1, MINERAL,  BLACK),
381.  RING("regeneration",      "moonstone",  REGENERATION,   200, 1, 0, MINERAL,  HI_MINERAL),
382.  RING("searching",         "tiger eye",  SEARCHING,      200, 1, 0, GEMSTONE, BROWN),
383.  RING("stealth",           "jade",       STEALTH,        100, 1, 0, GEMSTONE, GREEN),
384.  RING("levitation",        "agate",      LEVITATION,     200, 1, 0, GEMSTONE, RED),
385.  RING("hunger",            "topaz",      HUNGER,         100, 1, 0, GEMSTONE, CYAN),
386.  RING("aggravate monster", "sapphire",   AGGRAVATE_MONSTER,
387.  							150, 1, 0, GEMSTONE, BLUE),
388.  RING("conflict",          "ruby",       CONFLICT,       300, 1, 0, GEMSTONE, RED),
389.  RING("warning",           "diamond",    WARNING,        100, 1, 0, GEMSTONE, WHITE),
390.  RING("poison resistance", "pearl",      POISON_RES,     150, 1, 0, IRON,     WHITE),
391.  RING("fire resistance",   "iron",       FIRE_RES,       200, 1, 0, IRON,     HI_METAL),
392.  RING("cold resistance",   "brass",      COLD_RES,       150, 1, 0, COPPER,   HI_COPPER),
393.  RING("shock resistance",  "copper",     SHOCK_RES,      150, 1, 0, COPPER,   HI_COPPER),
394.  RING("teleportation",     "silver",     TELEPORT,       200, 1, 0, SILVER,   HI_SILVER),
395.  RING("teleport control",  "gold",       TELEPORT_CONTROL,
396.  							300, 1, 0, GOLD,     HI_GOLD),
397.  #ifdef POLYSELF
398.  RING("polymorph",         "ivory",      POLYMORPH,      300, 1, 0, 0,        WHITE),
399.  RING("polymorph control", "emerald",    POLYMORPH_CONTROL,
400.  							300, 1, 0, GEMSTONE, BRIGHT_GREEN),
401.  #endif
402.  RING("invisibility",      "wire",       INVIS,          150, 1, 0, IRON,     HI_METAL),
403.  RING("see invisible",     "engagement", SEE_INVIS,      150, 1, 0, IRON,     HI_METAL),
404.  RING("protection from shape changers", "shiny", PROT_FROM_SHAPE_CHANGERS,
405.  							100, 1, 0, IRON,     BRIGHT_CYAN),
406.  #undef RING
407.  
408.  /* amulets ... - THE Amulet comes last because it is special */
409.  #define AMULET(name,desc,power,prob) OBJECT( \
410.  		OBJ(name,desc), BITS(0,0,0,0,1,0,0,0,0,IRON), power, \
411.  		AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL )
412.  
413.  AMULET("amulet of ESP",           "circular",   TELEPAT,    180),
414.  AMULET("amulet of life saving",   "spherical",  LIFESAVED,   80),
415.  AMULET("amulet of strangulation", "oval",       STRANGLED,  140),
416.  AMULET("amulet of restful sleep", "triangular", SLEEPING,   140),
417.  AMULET("amulet versus poison",    "pyramidal",  POISON_RES, 170),
418.  AMULET("amulet of change",        "square",     0,          140),
419.  						/* POLYMORPH */
420.  AMULET("amulet of reflection",    "hexagonal",  REFLECTING,  80),
421.  AMULET("amulet of magical breathing", "octagonal",	MAGICAL_BREATHING, 70),
422.  OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor",
423.  	"Amulet of Yendor"), BITS(0,0,1,0,0,0,0,0,0,PLASTIC), 0,
424.  	AMULET_CLASS, 0, 0, 20,    0, 0, 0, 0, 0,  1, HI_METAL),
425.  OBJECT(OBJ("Amulet of Yendor",NULL), BITS(1,0,1,0,1,0,1,0,0,MITHRIL), 0,
426.  	AMULET_CLASS, 0, 0, 20, 3500, 0, 0, 0, 0, 20, HI_METAL),
427.  #undef AMULET
428.  
429.  /* tools ... */
430.  /* tools with weapon characteristics come last */
431.  #define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,material,color) OBJECT( \
432.  		OBJ(name,desc), BITS(kn,mrg,chg,0,mgc,chg,0,0,0,material), 0, \
433.  		TOOL_CLASS, prob, 0, \
434.  		wt, cost, 0, 0, 0, 0, wt, color )
435.  #define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,material,color) OBJECT( \
436.  		OBJ(name,desc), BITS(kn,0,chg,1,mgc,chg,0,0,0,material), 0, \
437.  		TOOL_CLASS, prob, 0, \
438.  		wt, cost, 0, 0, 0, 0, wt, color )
439.  #define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,material,color) OBJECT( \
440.  		OBJ(name,desc), BITS(kn,0,1,0,mgc,1,0,bi,0,material), 0, \
441.  		TOOL_CLASS, prob, 0, \
442.  		wt, cost, sdam, ldam, hitbon, 0, wt, color )
443.  /* containers */
444.  CONTAINER("large box",	    NULL,   1, 0, 0,  40,350,   8, WOOD, HI_WOOD),
445.  CONTAINER("chest",	    NULL,   1, 0, 0,  35,600,  16, WOOD, HI_WOOD),
446.  CONTAINER("ice box",	    NULL,   1, 0, 0,   5,900,  42, PLASTIC, WHITE),
447.  CONTAINER("sack",	    "bag",  0, 0, 0,  35, 15,   2, CLOTH, HI_CLOTH),
448.  CONTAINER("oilskin sack",   "bag",  0, 0, 0,   5, 15, 100, CLOTH, HI_CLOTH),
449.  CONTAINER("bag of holding", "bag",  0, 1, 0,  20, 15, 100, CLOTH, HI_CLOTH),
450.  CONTAINER("bag of tricks",  "bag",  0, 1, 1,  20, 15, 100, CLOTH, HI_CLOTH),
451.  #undef CONTAINER
452.  /* lock opening tools */
453.  TOOL("skeleton key",    "key",  0, 0, 0, 0,  80,  3,    10, IRON, HI_METAL),
454.  #ifdef TOURIST
455.  TOOL("lock pick",       NULL,   1, 0, 0, 0,  60,  4,    20, IRON, HI_METAL),
456.  TOOL("credit card",     NULL,   1, 0, 0, 0,  15,  1,    10, PLASTIC, WHITE),
457.  #else
458.  TOOL("lock pick",       NULL,   1, 0, 0, 0,  75,  4,    20, IRON, HI_METAL),
459.  #endif
460.  /* light sources */
461.  TOOL("tallow candle", "candle", 0, 1, 0, 0,  20,  2,    10, WAX, WHITE),
462.  TOOL("wax candle",    "candle", 0, 1, 0, 0,   5,  2,    20, WAX, WHITE),
463.  #ifdef WALKIES
464.  TOOL("brass lantern",   NULL,   1, 0, 0, 0,  30,100,    10, COPPER, YELLOW),
465.  TOOL("oil lamp",        "lamp", 0, 0, 0, 0,  45, 80,    10, COPPER, YELLOW),
466.  #else
467.  TOOL("brass lantern",   NULL,   1, 0, 0, 0,  45,100,    10, COPPER, YELLOW),
468.  TOOL("oil lamp",        "lamp", 0, 0, 0, 0,  75, 80,    10, COPPER, YELLOW),
469.  #endif
470.  TOOL("magic lamp",      "lamp", 0, 0, 1, 0,  15, 80,    50, COPPER, YELLOW),
471.  /* other tools */
472.  #ifdef TOURIST
473.  TOOL("expensive camera", NULL,  1, 0, 0, 0,  15, 30,   200, PLASTIC, BLACK),
474.  TOOL("mirror", "looking glass", 0, 0, 0, 0,  45, 13,    10, GLASS, SILVER),
475.  #else
476.  TOOL("mirror", "looking glass", 0, 0, 0, 0,  60, 13,    10, GLASS, SILVER),
477.  #endif
478.  TOOL("crystal ball", "glass orb",
479.  				0, 0, 1, 1,  15,150,	60, GLASS, HI_GLASS),
480.  TOOL("blindfold",       NULL,   1, 0, 0, 0,  55,  2,    20, CLOTH, BLACK),
481.  #ifdef WALKIES
482.  TOOL("towel",           NULL,   1, 0, 0, 0,  50,  2,    50, CLOTH, MAGENTA),
483.  TOOL("leash",           NULL,   1, 0, 0, 0,  70, 12,    20, LEATHER, HI_LEATHER),
484.  #else
485.  TOOL("towel",           NULL,   1, 0, 0, 0,  75,  3,    50, CLOTH, MAGENTA),
486.  #endif
487.  TOOL("stethoscope",     NULL,   1, 0, 0, 0,  25,  4,    75, IRON, HI_METAL),
488.  TOOL("tinning kit",     NULL,   1, 0, 0, 0,  15,100,    30, IRON, HI_METAL),
489.  TOOL("tin opener",      NULL,   1, 0, 0, 0,  35,  4,    30, IRON, HI_METAL),
490.  TOOL("can of grease",   NULL,   1, 0, 0, 1,  15, 15,    20, IRON, HI_METAL),
491.  TOOL("figurine",        NULL,   1, 0, 1, 0,  25, 50,    80, MINERAL, HI_MINERAL),
492.  TOOL("magic marker",    NULL,   1, 0, 1, 1,  15,  2,    50, PLASTIC, RED),
493.  /* instruments */
494.  TOOL("tin whistle",   "whistle",
495.  				0, 0, 0, 0, 105,  3,	10, METAL, HI_METAL),
496.  TOOL("magic whistle", "whistle",
497.  				0, 0, 1, 0,  30,  3,	10, METAL, HI_METAL),
498.  /* "If tin whistles are made out of tin, what do they make foghorns out of?" */
499.  TOOL("wooden flute",   "flute", 0, 0, 0, 0,   4,  5,    12, WOOD, HI_WOOD),
500.  TOOL("magic flute",    "flute", 0, 0, 1, 1,   2,  5,    36, WOOD, HI_WOOD),
501.  TOOL("tooled horn",     "horn", 0, 0, 0, 0,   5, 18,    15, BONE, WHITE),
502.  TOOL("frost horn",      "horn", 0, 0, 1, 1,   2, 18,    50, BONE, WHITE),
503.  TOOL("fire horn",       "horn", 0, 0, 1, 1,   2, 18,    50, BONE, WHITE),
504.  TOOL("horn of plenty",  "horn", 0, 0, 1, 1,   2, 18,    50, BONE, WHITE),
505.  TOOL("wooden harp",     "harp", 0, 0, 1, 0,   4, 30,    50, WOOD, HI_WOOD),
506.  TOOL("magic harp",      "harp", 0, 0, 1, 1,   2, 30,    50, WOOD, HI_WOOD),
507.  TOOL("bell",            NULL,   1, 0, 0, 0,   2, 30,    50, COPPER, HI_COPPER),
508.  TOOL("bugle",           NULL,   1, 0, 0, 0,   4, 10,    15, COPPER, HI_COPPER),
509.  TOOL("leather drum",    "drum", 0, 0, 0, 0,   4, 25,    25, LEATHER, HI_LEATHER),
510.  TOOL("drum of earthquake", "drum",
511.  				0, 0, 1, 1,   2, 25,	25, LEATHER, HI_LEATHER),
512.  /* tools useful as weapons */
513.  WEPTOOL("pick-axe",     NULL,   1, 0, 1,        20, 100,  50,
514.  			 6,  3, 0,	IRON, HI_METAL),
515.  WEPTOOL("unicorn horn", NULL,   1, 1, 1,         0,  20, 100,
516.  			12, 12, 0,	BONE, WHITE),
517.  /* two special, one of each kind, "tools" */
518.  OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"),
519.  		BITS(0,0,1,0,1,0,1,0,0,GOLD), 0,
520.  		TOOL_CLASS, 0, 0,10, 3000, 0, 0, 0, 0, 200, HI_GOLD),
521.  OBJECT(OBJ("Bell of Opening", "silver bell"),
522.  		BITS(0,0,1,0,1,0,1,0,0,SILVER), 0,
523.  		TOOL_CLASS, 0, 0,10, 1000, 0, 0, 0, 0, 50, HI_SILVER),
524.  #undef TOOL
525.  #undef WEPTOOL
526.  
527.  /* comestibles ... */
528.  #define FOOD(name,prob,delay,wt,uk,tin,nutrition,color) OBJECT( \
529.  		OBJ(name,NULL), BITS(1,1,uk,0,0,0,0,0,0,tin), 0, \
530.  		FOOD_CLASS, prob, delay, \
531.  		wt, nutrition/20 + 5, 0, 0, 0, 0, nutrition, color )
532.  /* all types of food (except tins & corpses) must have a delay of at least 1. */
533.  /* delay on corpses is computed and is weight dependant */
534.  /* dog eats foods 0-4 but prefers tripe rations above all others */
535.  /* fortune cookies can be read */
536.  /* carrots improve your vision */
537.  /* +0 tins contain monster meat */
538.  /* +1 tins (of spinach) make you stronger (like Popeye) */
539.  /* food CORPSE is a cadaver of some type */
540.  
541.  	/* meat */
542.  	FOOD("tripe ration",       142, 2, 10, 0, FLESH, 200, BROWN),
543.  	FOOD("corpse",               0, 1,  0, 0, FLESH,   0, BROWN),
544.  	FOOD("egg",                 85, 1,  1, 1, FLESH,  80, WHITE),
545.  	/* fruits & veggies */
546.  	FOOD("apple",               15, 1,  2, 0, VEGGY,  50, RED),
547.  	FOOD("orange",              10, 1,  2, 0, VEGGY,  80, ORANGE_COLORED),
548.  	FOOD("pear",                10, 1,  2, 0, VEGGY,  50, BRIGHT_GREEN),
549.  	FOOD("melon",               10, 1,  5, 0, VEGGY, 100, BRIGHT_GREEN),
550.  	FOOD("banana",              10, 1,  2, 0, VEGGY,  80, YELLOW),
551.  	FOOD("carrot",              15, 1,  2, 0, VEGGY,  50, ORANGE_COLORED),
552.  	FOOD("sprig of wolfsbane",   7, 1,  1, 0, VEGGY,  40, GREEN),
553.  	FOOD("clove of garlic",      7, 1,  1, 0, VEGGY,  40, WHITE),
554.  #ifdef TUTTI_FRUTTI
555.  	FOOD("slime mold",          75, 1,  5, 0, VEGGY, 250, HI_ORGANIC),
556.  #else
557.  	FOOD("slice of pizza",      75, 1,  3, 0, VEGGY, 250, RED),
558.  #endif
559.  	/* human food */
560.  	FOOD("lump of royal jelly",  0, 1,  2, 0, VEGGY, 200, YELLOW),
561.  	FOOD("cream pie",           25, 1, 10, 0, VEGGY, 100, WHITE),
562.  	FOOD("candy bar",           13, 1,  2, 0, VEGGY, 100, BROWN),
563.  	FOOD("fortune cookie",      55, 1,  1, 0, VEGGY,  40, BROWN),
564.  	FOOD("pancake",             25, 2,  2, 0, VEGGY, 200, BROWN),
565.  	FOOD("lembas wafer",        20, 2,  5, 0, VEGGY, 800, WHITE),
566.  	FOOD("cram ration",         20, 3, 15, 0, VEGGY, 600, HI_ORGANIC),
567.  	FOOD("food ration",        381, 5, 20, 0, VEGGY, 800, HI_ORGANIC),
568.  #ifdef ARMY
569.  	FOOD("K-ration",             0, 1, 10, 0, VEGGY, 400, HI_ORGANIC),
570.  	FOOD("C-ration",             0, 1, 10, 0, VEGGY, 300, HI_ORGANIC),
571.  #endif
572.  	FOOD("tin",                 75, 0, 10, 1, METAL,   0, HI_METAL),
573.  #undef FOOD
574.  
575.  /* potions ... */
576.  #define POTION(name,desc,mgc,power,prob,cost,color) OBJECT( \
577.  		OBJ(name,desc), BITS(0,1,0,0,mgc,0,0,0,0,GLASS), power, \
578.  		POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color )
579.  POTION("gain ability",      "ruby",           1, 0,          45, 300, RED),
580.  POTION("restore ability",   "pink",           1, 0,          45, 100, BRIGHT_MAGENTA),
581.  POTION("confusion",         "orange",         1, CONFUSION,  45, 100, ORANGE_COLORED),
582.  POTION("blindness",         "yellow",         1, BLINDED,    45, 150, YELLOW),
583.  POTION("paralysis",         "emerald",        1, 0,          45, 300, BRIGHT_GREEN),
584.  POTION("speed",             "dark green",     1, FAST,       45, 200, GREEN),
585.  POTION("levitation",        "cyan",           1, LEVITATION, 45, 200, CYAN),
586.  POTION("hallucination",     "sky blue",       1, HALLUC,     45, 100, CYAN),
587.  POTION("invisibility",      "brilliant blue", 1, INVIS,      45, 150, BRIGHT_BLUE),
588.  POTION("see invisible",     "magenta",        1, SEE_INVIS,  45,  50, MAGENTA),
589.  POTION("healing",           "purple-red",     1, 0,          65, 100, MAGENTA),
590.  POTION("extra healing",     "puce",           1, 0,          50, 100, RED),
591.  POTION("gain level",        "milky",          1, 0,          20, 300, WHITE),
592.  POTION("enlightenment",     "swirly",         1, 0,          20, 200, BROWN),
593.  POTION("monster detection", "bubbly",         1, 0,          45, 150, WHITE),
594.  POTION("object detection",  "smoky",          1, 0,          45, 150, GRAY),
595.  POTION("gain energy",       "cloudy",         1, 0,          45, 150, WHITE),
596.  POTION("booze",             "brown",          0, 0,          45,  50, BROWN),
597.  POTION("sickness",          "fizzy",          0, 0,          45,  50, CYAN),
598.  POTION("fruit juice",       "dark",           0, 0,          45,  50, BLACK),
599.  POTION("water",             "clear",          0, 0,         125, 100, CYAN),
600.  #undef POTION
601.  
602.  /* scrolls ... */
603.  #define SCROLL(name,text,mgc,prob,cost) OBJECT( \
604.  		OBJ(name,text), BITS(0,1,0,0,mgc,0,0,0,0,PAPER), 0, \
605.  		SCROLL_CLASS, prob, 0, 5, cost, 0, 0, 0, 0, 6, HI_PAPER )
606.  	SCROLL("enchant armor",         "ZELGO MER",            1,  63,  80),
607.  	SCROLL("destroy armor",         "JUYED AWK YACC",       1,  45, 100),
608.  	SCROLL("confuse monster",       "NR 9",                 1,  53, 100),
609.  	SCROLL("scare monster",         "XIXAXA XOXAXA XUXAXA", 1,  35, 100),
610.  	SCROLL("remove curse",          "PRATYAVAYAH",          1,  65,  80),
611.  	SCROLL("enchant weapon",        "DAIYEN FOOELS",        1,  85,  60),
612.  	SCROLL("create monster",        "LEP GEX VEN ZEA",      1,  45, 200),
613.  	SCROLL("taming",                "PRIRUTSENIE",          1,  15, 200),
614.  	SCROLL("genocide",              "ELBIB YLOH",           1,  15, 300),
615.  	SCROLL("light",                 "VERR YED HORRE",       1,  95,  50),
616.  	SCROLL("teleportation",         "VENZAR BORGAVVE",      1,  55, 100),
617.  	SCROLL("gold detection",        "THARR",                1,  33, 100),
618.  	SCROLL("food detection",        "YUM YUM",              1,  25, 100),
619.  	SCROLL("identify",              "KERNOD WEL",           1, 185,  20),
620.  	SCROLL("magic mapping",         "ELAM EBOW",            1,  45, 100),
621.  	SCROLL("amnesia",               "DUAM XNAHT",           1,  35, 200),
622.  	SCROLL("fire",                  "ANDOVA BEGARIN",       1,  48, 100),
623.  	SCROLL("punishment",            "VE FORBRYDERNE",       1,  15, 300),
624.  	SCROLL("charging",              "HACKEM MUCHE",         1,  15, 300),
625.  	SCROLL(NULL,			"VELOX NEB",            1,   0, 100),
626.  	SCROLL(NULL,			"FOOBIE BLETCH",        1,   0, 100),
627.  	SCROLL(NULL,			"TEMOV",                1,   0, 100),
628.  	SCROLL(NULL,			"GARVEN DEH",           1,   0, 100),
629.  	SCROLL(NULL,			"READ ME",              1,   0, 100),
630.  	SCROLL(NULL,			"KIRJE",                1,   0, 100),
631.  	/* these must come last because they have special descriptions */
632.  #ifdef MAIL
633.  	SCROLL("mail",                  "stamped",          0,   0,   0),
634.  #endif
635.  	SCROLL("blank paper",           "unlabeled",        0,  28,  60),
636.  #undef SCROLL
637.  
638.  /* spellbooks ... */
639.  #define SPELL(name,desc,prob,delay,level,mgc,dir,color) OBJECT( \
640.  		OBJ(name,desc), BITS(0,1,0,0,mgc,0,0,0,dir,PAPER), 0, \
641.  		SPBOOK_CLASS, prob, delay, \
642.  		50, level*100, 0, 0, 0, level, 20, color )
643.  SPELL("dig",             "parchment",   22,  6, 5, 1, RAY,       HI_PAPER),
644.  SPELL("magic missile",   "vellum",      45,  3, 2, 1, RAY,       HI_PAPER),
645.  SPELL("fireball",        "ragged",      20,  6, 4, 1, RAY,       HI_PAPER),
646.  SPELL("cone of cold",    "dog eared",   10,  8, 5, 1, RAY,       HI_PAPER),
647.  SPELL("sleep",           "mottled",     50,  1, 1, 1, RAY,       HI_PAPER),
648.  SPELL("finger of death", "stained",      5, 10, 7, 1, RAY,       HI_PAPER),
649.  SPELL("light",           "cloth",       45,  1, 1, 1, NODIR,     HI_CLOTH),
650.  SPELL("detect monsters", "leather",     45,  1, 1, 1, NODIR,     HI_LEATHER),
651.  SPELL("healing",         "white",       40,  2, 1, 1, NODIR,     WHITE),
652.  SPELL("knock",           "pink",        36,  1, 1, 1, IMMEDIATE, BRIGHT_MAGENTA),
653.  SPELL("force bolt",      "red",         35,  2, 1, 1, IMMEDIATE, RED),
654.  SPELL("confuse monster", "orange",      37,  2, 2, 1, IMMEDIATE, ORANGE_COLORED),
655.  SPELL("cure blindness",  "yellow",      27,  2, 2, 1, IMMEDIATE, YELLOW),
656.  SPELL("slow monster",    "light green", 37,  2, 2, 1, IMMEDIATE, BRIGHT_GREEN),
657.  SPELL("wizard lock",     "dark green",  35,  3, 2, 1, IMMEDIATE, GREEN),
658.  SPELL("create monster",  "turquoise",   37,  3, 2, 1, NODIR,     BRIGHT_CYAN),
659.  SPELL("detect food",     "cyan",        37,  3, 2, 1, NODIR,     CYAN),
660.  SPELL("cause fear",      "light blue",  25,  3, 3, 1, NODIR,     BRIGHT_BLUE),
661.  SPELL("clairvoyance",    "dark blue",   15,  3, 3, 1, NODIR,     BLUE),
662.  SPELL("cure sickness",   "indigo",      32,  3, 3, 1, NODIR,     BLUE),
663.  SPELL("charm monster",   "magenta",     20,  3, 3, 1, IMMEDIATE, MAGENTA),
664.  SPELL("haste self",      "purple",      33,  4, 3, 1, NODIR,     MAGENTA),
665.  SPELL("detect unseen",   "violet",      20,  4, 3, 1, NODIR,     MAGENTA),
666.  SPELL("levitation",      "tan",         20,  4, 4, 1, NODIR,     BROWN),
667.  SPELL("extra healing",   "plaid",       35,  5, 3, 1, NODIR,     GREEN),
668.  SPELL("restore ability", "light brown", 25,  5, 4, 1, NODIR,     BROWN),
669.  SPELL("invisibility",    "dark brown",  32,  5, 4, 1, NODIR,     BROWN),
670.  SPELL("detect treasure", "gray",        25,  5, 4, 1, NODIR,     GRAY),
671.  SPELL("remove curse",    "white",       25,  5, 5, 1, NODIR,     WHITE),
672.  SPELL("magic mapping",   "dusty",       18,  7, 5, 1, NODIR,     HI_PAPER),
673.  SPELL("identify",        "bronze",      25,  8, 5, 1, NODIR,     HI_COPPER),
674.  SPELL("turn undead",     "copper",      17,  8, 6, 1, IMMEDIATE, HI_COPPER),
675.  SPELL("polymorph",       "silver",      10,  8, 6, 1, IMMEDIATE, HI_SILVER),
676.  SPELL("teleport away",   "gold",        15,  6, 6, 1, IMMEDIATE, HI_GOLD),
677.  SPELL("create familiar", "glittering",  10,  7, 6, 1, NODIR,     WHITE),
678.  SPELL("cancellation",    "shining",     15,  8, 7, 1, IMMEDIATE, WHITE),
679.  SPELL(NULL,		 "dull",         0,  0, 0, 1, 0,         HI_PAPER),
680.  SPELL(NULL,		 "thin",         0,  0, 0, 1, 0,         HI_PAPER),
681.  SPELL(NULL,		 "thick",        0,  0, 0, 1, 0,         HI_PAPER),
682.  /* blank spellbook must come last because it retains its description */
683.  SPELL("blank paper",     "plain",       20,  0, 0, 0, 0,         HI_PAPER),
684.  /* a special, one of a kind, spellbook */
685.  OBJECT(OBJ("Book of the Dead", "papyrus"), BITS(0,0,1,0,1,0,1,0,0,PAPER), 0,
686.  	SPBOOK_CLASS, 0, 0,20, 3500, 0, 0, 0, 7, 20, HI_PAPER),
687.  #undef SPELL
688.  
689.  /* wands ... */
690.  #define WAND(name,typ,prob,cost,mgc,dir,metal,color) OBJECT( \
691.  		OBJ(name,typ), BITS(0,0,1,0,mgc,1,0,0,dir,metal), 0, WAND_CLASS, \
692.  		prob, 0, 7, cost, 0, 0, 0, 0, 30, color )
693.  WAND("light",           "glass",        95, 100, 1, NODIR,     GLASS,    HI_GLASS),
694.  WAND("secret door detection", "balsa",  50, 150, 1, NODIR,     WOOD,     HI_WOOD),
695.  WAND("create monster",  "maple",        45, 200, 1, NODIR,     WOOD,     HI_WOOD),
696.  WAND("wishing",         "pine",          5, 500, 1, NODIR,     WOOD,     HI_WOOD),
697.  WAND("nothing",         "oak",          25, 100, 0, IMMEDIATE, WOOD,     HI_WOOD),
698.  WAND("striking",        "ebony",        75, 150, 1, IMMEDIATE, WOOD,     HI_WOOD),
699.  WAND("make invisible",  "marble",       45, 150, 1, IMMEDIATE, MINERAL,  HI_MINERAL),
700.  WAND("slow monster",    "tin",          55, 150, 1, IMMEDIATE, METAL,    HI_METAL),
701.  WAND("speed monster",   "brass",        55, 150, 1, IMMEDIATE, COPPER,   HI_COPPER),
702.  WAND("undead turning",  "copper",       55, 150, 1, IMMEDIATE, COPPER,   HI_COPPER),
703.  WAND("polymorph",       "silver",       45, 200, 1, IMMEDIATE, SILVER,   HI_SILVER),
704.  WAND("cancellation",    "platinum",     45, 200, 1, IMMEDIATE, PLATINUM, WHITE),
705.  WAND("teleportation",   "iridium",      45, 200, 1, IMMEDIATE, METAL,    BRIGHT_CYAN),
706.  WAND("opening",         "zinc",         25, 150, 1, IMMEDIATE, METAL,    HI_METAL),
707.  WAND("locking",         "aluminum",     25, 150, 1, IMMEDIATE, METAL,    HI_METAL),
708.  WAND("probing",         "uranium",      30, 150, 1, IMMEDIATE, METAL,    HI_METAL),
709.  WAND("digging",         "iron",         55, 150, 1, RAY,       IRON,     HI_METAL),
710.  WAND("magic missile",   "steel",        50, 150, 1, RAY,       IRON,     HI_METAL),
711.  WAND("fire",            "hexagonal",    40, 175, 1, RAY,       IRON,     HI_METAL),
712.  WAND("cold",            "short",        40, 175, 1, RAY,       IRON,     HI_METAL),
713.  WAND("sleep",           "runed",        50, 175, 1, RAY,       IRON,     HI_METAL),
714.  WAND("death",           "long",          5, 500, 1, RAY,       IRON,     HI_METAL),
715.  WAND("lightning",       "curved",       40, 175, 1, RAY,       IRON,     HI_METAL),
716.  WAND(NULL,		"forked",        0, 150, 1, 0,         WOOD,     HI_WOOD),
717.  WAND(NULL,		"spiked",        0, 150, 1, 0,         IRON,     HI_METAL),
718.  WAND(NULL,		"jeweled",       0, 150, 1, 0,         IRON,     HI_MINERAL),
719.  #undef WAND
720.  
721.  /* coins ... - so far, gold is all there is */
722.  #define COIN(name,prob,metal) OBJECT( \
723.  		OBJ(name,NULL), BITS(0,1,0,0,0,0,0,0,0,metal), 0, \
724.  		GOLD_CLASS, prob, 0, 1, 0, 0, 0, 0, 0, 0, HI_GOLD )
725.  	COIN("gold piece",      1000, GOLD),
726.  #undef COIN
727.  
728.  /* gems ... - includes stones but not boulders */
729.  #define GEM(name,desc,prob,wt,gval,nutr,glass,color) OBJECT( \
730.  		OBJ(name,desc), BITS(0,1,0,0,0,0,0,0,0,glass), 0, \
731.  		GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, WP_SLING, nutr, color )
732.  #define ROCK(name,desc,kn,prob,wt,gval,mgc,nutr,glass,color) OBJECT( \
733.  		OBJ(name,desc), BITS(kn,1,0,0,mgc,0,0,0,0,glass), 0, \
734.  		GEM_CLASS, prob, 0, wt, gval, 3, 3, 0, WP_SLING, nutr, color )
735.  GEM("dilithium crystal", "white",        3, 1, 4500, 15, GEMSTONE, WHITE),
736.  GEM("diamond", "white",                  4, 1, 4000, 15, GEMSTONE, WHITE),
737.  GEM("ruby", "red",                       5, 1, 3500, 15, GEMSTONE, RED),
738.  GEM("sapphire", "blue",                  6, 1, 3000, 15, GEMSTONE, BLUE),
739.  GEM("emerald", "green",                  7, 1, 2500, 15, GEMSTONE, GREEN),
740.  GEM("turquoise", "green",                8, 1, 2000, 15, GEMSTONE, GREEN),
741.  GEM("aquamarine", "green",              10, 1, 1500, 15, GEMSTONE, GREEN),
742.  GEM("amber", "yellowish brown",         11, 1, 1000, 15, GEMSTONE, BROWN),
743.  GEM("topaz", "yellowish brown",         13, 1,  900, 15, GEMSTONE, BROWN),
744.  GEM("opal", "white",                    15, 1,  800, 15, GEMSTONE, WHITE),
745.  GEM("garnet", "red",                    17, 1,  700, 15, GEMSTONE, RED),
746.  GEM("amethyst", "violet",               19, 1,  600, 15, GEMSTONE, MAGENTA),
747.  GEM("jasper", "red",                    21, 1,  500, 15, GEMSTONE, RED),
748.  GEM("fluorite", "violet",               22, 1,  400, 15, GEMSTONE, MAGENTA),
749.  GEM("jade", "green",                    23, 1,  300, 15, GEMSTONE, GREEN),
750.  GEM("worthless piece of white glass", "white",  116, 1, 0, 6, GLASS, WHITE),
751.  GEM("worthless piece of blue glass", "blue",    116, 1, 0, 6, GLASS, BLUE),
752.  GEM("worthless piece of red glass", "red",      116, 1, 0, 6, GLASS, RED),
753.  GEM("worthless piece of yellowish brown glass", "yellowish brown",
754.  						116, 1, 0, 6, GLASS, BROWN),
755.  GEM("worthless piece of green glass", "green",  116, 1, 0, 6, GLASS, GREEN),
756.  GEM("worthless piece of violet glass", "violet",116, 1, 0, 6, GLASS, MAGENTA),
757.  ROCK("luckstone", "gray",                0, 10, 10, 60, 1, 10, MINERAL, GRAY),
758.  ROCK("loadstone", "gray",                0, 10,500,  1, 1, 10, MINERAL, GRAY),
759.  ROCK("rock", NULL,                       1,100, 10,  0, 0, 10, MINERAL, GRAY),
760.  #undef GEM
761.  #undef ROCK
762.  
763.  /* miscellaneous ... */
764.  /* Note: boulders and rocks are not normally created at random; the
765.   * probabilities only come into effect when you try to polymorph them.
766.   * Boulders and statues weigh more than MAX_CARR_CAP.
767.   */
768.  OBJECT(OBJ("boulder",NULL), BITS(1,0,0,0,0,0,0,1,0,MINERAL), 0,
769.  		ROCK_CLASS,   100, 0, 6000,  0, 20, 20, 0, 0, 2000, HI_MINERAL),
770.  OBJECT(OBJ("statue", NULL), BITS(1,0,0,1,0,0,0,0,0,MINERAL), 0,
771.  		ROCK_CLASS,   900, 0, 2500,  0, 20, 20, 0, 0, 2500, HI_MINERAL),
772.  OBJECT(OBJ("heavy iron ball", NULL), BITS(1,0,0,0,0,0,0,0,0,IRON), 0,
773.  		BALL_CLASS,  1000, 0,  480, 10,  0,  0, 0, 0,  200, HI_METAL),
774.  OBJECT(OBJ("iron chain", NULL), BITS(1,0,0,0,0,0,0,0,0,IRON), 0,
775.  		CHAIN_CLASS, 1000, 0,  120,  0,  0,  0, 0, 0,  200, HI_METAL),
776.  OBJECT(OBJ("blinding venom", "splash of venom"),
777.  		BITS(0,1,0,0,0,0,0,0,0,LIQUID), 0,
778.  		VENOM_CLASS,  500, 0,	 1,  0,  0,  0, 0, 0,	 0, HI_ORGANIC),
779.  OBJECT(OBJ("acid venom", "splash of venom"),
780.  		BITS(0,1,0,0,0,0,0,0,0,LIQUID), 0,
781.  		VENOM_CLASS,  500, 0,	 1,  0,  6,  6, 0, 0,	 0, HI_ORGANIC),
782.  		/* +d6 small or large */
783.  
784.  /* fencepost -- name [1st arg] *must* be NULL */
785.  	OBJECT(OBJ(NULL,NULL), BITS(0,0,0,0,0,0,0,0,0,0), 0,
786.  		ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
787.  }; /* objects[] */
788.  
789.  #ifndef OBJECTS_PASS_2_
790.  
791.  /* perform recursive compilation for second structure */
792.  #  undef OBJ
793.  #  undef OBJECT
794.  #  define OBJECTS_PASS_2_
795.  #include "objects.c"
796.  
797.  void NDECL(objects_init);
798.  
799.  /* dummy routine used to force linkage */
800.  void
801.  objects_init()
802.  {
803.      return;
804.  }
805.  
806.  #endif	/* !OBJECTS_PASS_2_ */
807.  
808.  /*objects.c*/