Wikihack
Advertisement

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

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

Screenshots and source code from Hack are used under the CWI license.
1.    /*	SCCS Id: @(#)objects.h	2.2	87/11/29
2.    /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3.    
4.    /* objects have letter " % ) ( 0 _ ` [ ! ? / = * + */
5.    #include "config.h"
6.    #include "objclass.h"
7.    #define	NULL	(char *)0
8.    
9.    struct objclass objects[] = {
10.   
11.   	{ "strange object", NULL, NULL, 1, 0,
12.   		ILLOBJ_SYM, 0, 0, 0, 0, 0, 0 },
13.   	{ "amulet of Yendor", NULL, NULL, 1, 0,
14.   		AMULET_SYM, 100, 0, 2, 0, 0, 0 },
15.   
16.   #define	FOOD(name,prob,delay,weight,nutrition)	{ name, NULL, NULL, 1, 1,\
17.   		FOOD_SYM, prob, delay, weight, 0, 0, nutrition }
18.   
19.   /* dog eats foods 0-4 but prefers 1 above 0,2,3,4 */
20.   /* food 4 can be read */
21.   /* food 5 improves your vision */
22.   /* food 6 makes you stronger (like Popeye) */
23.   /* foods CORPSE up to CORPSE+52 are cadavers */
24.   
25.   	FOOD("food ration", 	46, 5, 4, 800),
26.   	FOOD("tripe ration",	16, 1, 2, 200),
27.   	FOOD("pancake",		3, 1, 1, 200),
28.   	FOOD("dead lizard",	3, 0, 1, 40),
29.   	FOOD("fortune cookie",	7, 0, 1, 40),
30.   	FOOD("carrot",		2, 0, 1, 50),
31.   	FOOD("slice of pizza",	5, 0, 1, 250),
32.   	FOOD("cream pie",	3, 0, 1, 100),
33.   	FOOD("tin",		7, 0, 1, 0),
34.   	FOOD("orange",		1, 0, 1, 80),
35.   	FOOD("apple",		1, 0, 1, 50),
36.   	FOOD("pear",		1, 0, 1, 50),
37.   	FOOD("melon",		1, 0, 1, 100),
38.   	FOOD("banana",		1, 0, 1, 80),
39.   	FOOD("candy bar",	1, 0, 1, 100),
40.   	FOOD("egg",		1, 0, 1, 80),
41.   	FOOD("clove of garlic",	1, 0, 1, 40),
42.   	FOOD("lump of royal jelly", 0, 0, 1, 200),
43.   
44.   	FOOD("dead human",	0, 4, 40, 400),
45.   	FOOD("dead giant ant",	0, 1, 3, 30),
46.   	FOOD("dead giant bat",	0, 1, 3, 30),
47.   	FOOD("dead centaur",	0, 5, 50, 500),
48.   	FOOD("dead dragon",	0, 15, 150, 1500),
49.   	FOOD("dead floating eye",	0, 1, 1, 10),
50.   	FOOD("dead freezing sphere",	0, 1, 1, 10),
51.   	FOOD("dead gnome",	0, 1, 10, 100),
52.   	FOOD("dead hobgoblin",	0, 2, 20, 200),
53.   	FOOD("dead stalker",	0, 4, 40, 400),
54.   	FOOD("dead jackal",	0, 1, 10, 100),
55.   	FOOD("dead kobold",	0, 1, 10, 100),
56.   	FOOD("dead leprechaun",	0, 4, 40, 400),
57.   	FOOD("dead mimic",	0, 4, 40, 400),
58.   	FOOD("dead nymph",	0, 4, 40, 400),
59.   	FOOD("dead orc",	0, 2, 20, 200),
60.   	FOOD("dead purple worm",	0, 7, 70, 700),
61.   	FOOD("dead quantum mechanic", 0, 2, 20, 200),
62.   	FOOD("dead rust monster",	0, 5, 50, 500),
63.   	FOOD("dead snake",	0, 1, 10, 100),
64.   	FOOD("dead troll",	0, 4, 40, 400),
65.   	FOOD("dead umber hulk",	0, 5, 50, 500),
66.   	FOOD("dead vampire",	0, 4, 40, 400),
67.   	FOOD("dead wraith",	0, 1, 1, 10),
68.   	FOOD("dead xorn",	0, 7, 70, 700),
69.   	FOOD("dead yeti",	0, 7, 70, 700),
70.   	FOOD("dead zombie",	0, 1, 3, 30),
71.   	FOOD("dead acid blob",	0, 1, 3, 30),
72.   	FOOD("dead giant beetle",	0, 1, 1, 10),
73.   	FOOD("dead cockatrice",	0, 1, 3, 30),
74.   	FOOD("dead dog",	0, 2, 20, 200),
75.   	FOOD("dead ettin",	0, 1, 3, 30),
76.   	FOOD("dead fog cloud",	0, 1, 1, 10),
77.   	FOOD("dead gelatinous cube",	0, 1, 10, 100),
78.   	FOOD("dead homunculus",	0, 2, 20, 200),
79.   	FOOD("dead imp",	0, 1, 1, 10),
80.   	FOOD("dead jaguar",	0, 3, 30, 300),
81.   	FOOD("dead killer bee",	0, 1, 1, 10),
82.   	FOOD("dead leocrotta",	0, 5, 50, 500),
83.   	FOOD("dead minotaur",	0, 7, 70, 700),
84.   	FOOD("dead nurse",	0, 4, 40, 400),
85.   	FOOD("dead owlbear",	0, 7, 70, 700),
86.   	FOOD("dead piercer",	0, 2, 20, 200),
87.   	FOOD("dead quivering blob",	0, 1, 10, 100),
88.   	FOOD("dead giant rat",	0, 1, 3, 30),
89.   	FOOD("dead giant scorpion",	0, 1, 10, 100),
90.   	FOOD("dead tengu",	0, 3, 30, 300),
91.   	FOOD("dead unicorn",	0, 3, 30, 300),
92.   	FOOD("dead violet fungus",	0, 1, 10, 100),
93.   	FOOD("dead long worm",	0, 5, 50, 500),
94.   /* %% wt of long worm should be proportional to its length */
95.   	FOOD("dead xan",	0, 3, 30, 300),
96.   	FOOD("dead yellow light",	0, 1, 1, 10),
97.   	FOOD("dead zruty",	0, 6, 60, 600),
98.   #ifdef SAC
99.   	FOOD("dead soldier",	0, 4, 40, 400),
100.  #endif /* SAC */
101.  	FOOD("dead giant",	0, 7, 70, 700),
102.  	FOOD("dead demon",	0, 8, 80, 800),
103.  
104.  /* weapons ... - ROCK come several at a time */
105.  /* weapons ... - (DART-1) are shot using idem+(BOW-ARROW) */
106.  /* weapons AXE, SWORD, KATANA, THSWORD are good for worm-cutting */
107.  /* weapons (PICK-)AXE, DAGGER, CRYSKNIFE are good for tin-opening */
108.  #define WEAPON(name,prob,wt,sdam,ldam)	{ name, NULL, NULL, 1, 0 /*%%*/,\
109.  		WEAPON_SYM, prob, 0, wt, sdam, ldam, 0 }
110.  
111.  /* Note: for weapons that don't do an even die of damage (i.e. 2-7 or 3-18)
112.   * the extra damage is added on in fight.c, not here! */
113.  
114.  	WEAPON("arrow",		6, 0, 6, 6),
115.  	WEAPON("sling bullet",	6, 0, 4, 6),
116.  	WEAPON("crossbow bolt",	6, 0, 4, 6),
117.  	WEAPON("dart",		6, 0, 3, 2),
118.  	WEAPON("shuriken",	3, 0, 8, 6),
119.  	WEAPON("rock",		4, 1, 3, 3),
120.  	WEAPON("boomerang",	1, 3, 9, 9),
121.  	WEAPON("mace",		6, 3, 6, 7), /* +1 small */
122.  	WEAPON("axe",		5, 3, 6, 4),
123.  	WEAPON("flail",		5, 3, 6, 5), /* +1 small, +1d4 large */
124.  	WEAPON("long sword",	5, 3, 8, 12),
125.  	WEAPON("two-handed sword",	4, 4, 12, 6), /* +2d6 large */
126.  	WEAPON("dagger",	4, 3, 4, 3),
127.  	WEAPON("worm tooth",	0, 4, 2, 2),
128.  	WEAPON("crysknife",	0, 3, 10, 10),
129.  	WEAPON("aklys",		1, 3, 6, 3), 
130.  	WEAPON("bardiche",	1, 3, 4, 4), /* +1d4 small, +2d4 large */
131.  	WEAPON("bec de corbin",	1, 3, 8, 6),
132.  	WEAPON("bill-guisarme",	1, 3, 4, 10), /* +1d4 small */
133.  	WEAPON("club",		1, 3, 6, 3),
134.  	WEAPON("fauchard",	1, 3, 6, 8),
135.  	WEAPON("glaive",	1, 3, 6, 10),
136.  	WEAPON("guisarme",	1, 3, 4, 8), /* +1d4 small */
137.  	WEAPON("halberd",	1, 3, 10, 6), /* +1d6 large */
138.  	WEAPON("lucern hammer",	1, 3, 4, 6), /* +1d4 small */
139.  	WEAPON("javelin",	1, 3, 6, 6),
140.  	WEAPON("katana",	1, 3, 12, 12),
141.  	WEAPON("lance",		1, 3, 6, 8),
142.  	WEAPON("morning star",	1, 3, 4, 6), /* +d4 small, +1 large */
143.  	WEAPON("partisan",	1, 3, 6, 6), /* +1 large */
144.  	WEAPON("ranseur",	1, 3, 4, 4), /* +d4 both */
145.  	WEAPON("scimitar",	1, 3, 8, 8), 
146.  	WEAPON("spetum",	1, 3, 6, 6), /* +1 small, +d6 large */
147.  	WEAPON("broad sword",	1, 3, 4, 6), /* +d4 small, +1 large */
148.  	WEAPON("short sword",	1, 3, 6, 8),
149.  	WEAPON("trident",	1, 3, 6, 4), /* +1 small, +2d4 large */
150.  	WEAPON("voulge",	1, 3, 4, 4), /* +d4 both */
151.  	WEAPON("spear",		4, 3, 6, 8),
152.  	WEAPON("bow",		4, 3, 4, 6),
153.  	WEAPON("sling",		4, 3, 6, 6),
154.  	WEAPON("crossbow",	5, 3, 4, 6),
155.  
156.  #ifdef WALKIES
157.  	{ "whistle", "whistle", NULL, 0, 0, TOOL_SYM, 55, 0, 2, 0, 0, 0 },
158.  	{ "leash", NULL, NULL, 1, 0, TOOL_SYM, 20, 0, 20, 0, 0, 0 },
159.  #else
160.  	{ "whistle", "whistle", NULL, 0, 0, TOOL_SYM, 75, 0, 2, 0, 0, 0 },
161.  	{ "leash", NULL, NULL, 1, 0, TOOL_SYM, 0, 0, 20, 0, 0, 0 },
162.  #endif
163.  	{ "magic whistle", "whistle", NULL, 0, 0, TOOL_SYM, 9, 0, 2, 0, 0, 0 },
164.  #ifdef RPH
165.  	{ "blindfold", "blindfold", NULL, 0, 0, TOOL_SYM, 5, 0, 2, 0, 0, 0 },
166.  	{ "mirror", "mirror", NULL, 0, 0, TOOL_SYM, 5, 0, 3, 0, 0, 0},
167.  #else
168.  	{ "blindfold", "blindfold", NULL, 0, 0, TOOL_SYM, 10, 0, 2, 0, 0, 0 },
169.  	{ "mirror", "mirror", NULL, 0, 0, TOOL_SYM, 0, 0, 3, 0, 0, 0},
170.  #endif
171.  	{ "expensive camera", NULL, NULL, 1, 1, TOOL_SYM, 1, 0, 3, 0, 0, 0 },
172.  	{ "ice box", "large box", NULL, 0, 0, TOOL_SYM, 1, 0, 40, 0, 0, 0 },
173.  	{ "pick-axe", NULL, NULL, 1, 1, TOOL_SYM, 1, 0, 5, 6, 3, 0 },
174.  	{ "magic marker", NULL, NULL, 1, 0, TOOL_SYM, 1, 0, 1, 0, 0, 0 },
175.  	{ "stethoscope", NULL, NULL, 1, 0, TOOL_SYM, 1, 0, 3, 0, 0, 0 },
176.  	{ "can opener", NULL, NULL, 1, 1, TOOL_SYM, 1, 0, 1, 0, 0, 0 },
177.  
178.  	{ "heavy iron ball", NULL, NULL, 1, 0,
179.  		BALL_SYM, 100, 0, 20, 0, 0, 0 },
180.  	{ "iron chain", NULL, NULL, 1, 0,
181.  		CHAIN_SYM, 100, 0, 20, 0, 0, 0 },
182.  	/* Because giants can throw rocks */
183.  #ifdef HARD
184.  # ifdef KAA
185.  	{ "enormous rock", NULL, NULL, 1, 0,
186.  		ROCK_SYM, 100, 0, 200 /* > MAX_CARR_CAP */, 0, 20, 20 },
187.  # else
188.  	{ "enormous rock", NULL, NULL, 1, 0,
189.  		ROCK_SYM, 100, 0, 250 /* > MAX_CARR_CAP */, 0, 0, 0 },
190.  # endif
191.  #else
192.  # ifdef KAA
193.  	{ "enormous rock", NULL, NULL, 1, 0,
194.  		ROCK_SYM, 100, 0, 400 /* > MAX_CARR_CAP */, 0, 20, 20 },
195.  # else
196.  	{ "enormous rock", NULL, NULL, 1, 0,
197.  		ROCK_SYM, 100, 0, 550 /* > MAX_CARR_CAP */, 0, 0, 0 },
198.  # endif
199.  #endif
200.  
201.  #define ARMOR(name,prob,delay,weight,ac,can)	{ name, NULL, NULL, 1, 0,\
202.  		ARMOR_SYM, prob, delay, weight, ac, can, 0 }
203.  /* Originally, weight was always 8, which is ridiculous.  (Plate mail weighs
204.     the same as a pair of gloves?) */
205.  	ARMOR("helmet",			 3, 1, 2, 9, 0),
206.  	ARMOR("plate mail",		 5, 5, 9, 3, 2),
207.  	ARMOR("splint mail",		 7, 5, 8, 4, 1),
208.  	ARMOR("banded mail",		 9, 5, 8, 4, 0),
209.  	ARMOR("chain mail",		10, 5, 6, 5, 1),
210.  	ARMOR("scale mail",		10, 5, 5, 6, 0),
211.  	ARMOR("ring mail",		12, 5, 3, 7, 0),
212.  	/* the armors below do not rust */
213.  	ARMOR("studded leather armor",	12, 3, 3, 7, 1),
214.  	ARMOR("elfin chain mail",	 1, 1, 2, 5, 3),
215.  	ARMOR("bronze plate mail",	 6, 5, 9, 4, 0),
216.  	ARMOR("crystal plate mail",	 1, 5, 9, 3, 2),
217.  	ARMOR("leather armor",		15, 3, 2, 8, 0),
218.  	ARMOR("elven cloak",		 5, 0, 2, 9, 3),
219.  	ARMOR("shield",			 3, 0, 2, 9, 0),
220.  	ARMOR("pair of gloves",		 1, 1, 2, 9, 0),
221.  
222.  #define POTION(name,color)	{ name, color, NULL, 0, 1,\
223.  		POTION_SYM, 0, 0, 2, 0, 0, 0 }
224.  
225.  	POTION("restore strength",	"orange"),
226.  	POTION("gain energy", "cyan"),
227.  	POTION("booze",		"bubbly"),
228.  	POTION("invisibility",	"glowing"),
229.  	POTION("fruit juice",	"smoky"),
230.  	POTION("healing",	"pink"),
231.  	POTION("paralysis",	"puce"),
232.  	POTION("monster detection",	"purple"),
233.  	POTION("object detection",	"yellow"),
234.  	POTION("sickness",	"white"),
235.  	POTION("confusion",	"swirly"),
236.  	POTION("gain strength",	"purple-red"),
237.  	POTION("speed",		"ruby"),
238.  	POTION("blindness",	"dark green"),
239.  	POTION("gain level",	"emerald"),
240.  	POTION("extra healing",	"sky blue"),
241.  	POTION("levitation",	"brown"),
242.  	POTION("hallucination",	"brilliant blue"),
243.  	POTION("holy water",	"clear"),
244.  	POTION(NULL,	"magenta"),
245.  	POTION(NULL,	"ebony"),
246.  
247.  #define SCROLL(name,text,prob) { name, text, NULL, 0, 1,\
248.  		SCROLL_SYM, prob, 0, 3, 0, 0, 0 }
249.  	SCROLL("mail",	"KIRJE", 0),
250.  	SCROLL("enchant armor", "ZELGO MER", 6),
251.  	SCROLL("destroy armor", "JUYED AWK YACC", 5),
252.  	SCROLL("confuse monster", "NR 9", 5),
253.  	SCROLL("scare monster", "XIXAXA XOXAXA XUXAXA", 4),
254.  	SCROLL("blank paper", "READ ME", 3),
255.  	SCROLL("remove curse", "PRATYAVAYAH", 6),
256.  	SCROLL("enchant weapon", "DAIYEN FOOELS", 6),
257.  	SCROLL("damage weapon", "HACKEM MUCHE", 5),
258.  	SCROLL("create monster", "LEP GEX VEN ZEA", 5),
259.  	SCROLL("taming", "PRIRUTSENIE", 1),
260.  	SCROLL("genocide", "ELBIB YLOH",2),
261.  	SCROLL("light", "VERR YED HORRE", 10),
262.  	SCROLL("teleportation", "VENZAR BORGAVVE", 5),
263.  	SCROLL("gold detection", "THARR", 4),
264.  	SCROLL("food detection", "YUM YUM", 1),
265.  	SCROLL("identify", "KERNOD WEL", 18),
266.  	SCROLL("magic mapping", "ELAM EBOW", 5),
267.  	SCROLL("amnesia", "DUAM XNAHT", 3),
268.  	SCROLL("fire", "ANDOVA BEGARIN", 5),
269.  	SCROLL("punishment", "VE FORBRYDERNE", 1),
270.  	SCROLL(NULL, "VELOX NEB", 0),
271.  	SCROLL(NULL, "FOOBIE BLETCH", 0),
272.  	SCROLL(NULL, "TEMOV", 0),
273.  	SCROLL(NULL, "GARVEN DEH", 0),
274.  
275.  #define	WAND(name,metal,prob,flags)	{ name, metal, NULL, 0, 0,\
276.  		WAND_SYM, prob, 0, 3, flags, 0, 0 }
277.  
278.  	WAND("light",	"iridium",		10,	NODIR),
279.  	WAND("secret door detection",	"tin",	5,	NODIR),
280.  	WAND("create monster",	"platinum",	5,	NODIR),
281.  	WAND("wishing",		"glass",	1,	NODIR),
282.  #ifdef KAA
283.  	WAND("striking",	"zinc",		7,	IMMEDIATE),
284.  	WAND("nothing",		"uranium",	2,	IMMEDIATE),
285.  #else
286.  	WAND("striking",	"zinc",		9,	IMMEDIATE),
287.  	WAND("nothing",		"uranium",	0,	IMMEDIATE),
288.  #endif 
289.  	WAND("slow monster",	"balsa",	5,	IMMEDIATE),
290.  	WAND("speed monster",	"copper",	5,	IMMEDIATE),
291.  	WAND("undead turning",	"silver",	5,	IMMEDIATE),
292.  	WAND("polymorph",	"brass",	5,	IMMEDIATE),
293.  	WAND("cancellation",	"maple",	5,	IMMEDIATE),
294.  	WAND("teleportation",	"pine",		5,	IMMEDIATE),
295.  #ifdef PROBING
296.  	WAND("make invisible",	"marble",	7,	IMMEDIATE),
297.  	WAND("probing",		"oak",		2,	IMMEDIATE),
298.  #else
299.  	WAND("make invisible",	"marble",	9,	IMMEDIATE),
300.  	WAND("probing",		"oak",		0,	IMMEDIATE),
301.  #endif
302.  	WAND("digging",		"iron",		5,	RAY),
303.  	WAND("magic missile",	"aluminum",	10,	RAY),
304.  	WAND("fire",		"steel",	5,	RAY),
305.  	WAND("sleep",		"curved",	5,	RAY),
306.  	WAND("cold",		"short",	5,	RAY),
307.  	WAND("death",		"long",		1,	RAY),
308.  	WAND(NULL,		"ebony",	0,	0),
309.  	WAND(NULL,		"runed",	0,	0),
310.  
311.  #ifdef SPELLS
312.  /* books */
313.  #define SPELL(name,desc,prob,delay,flags,level)	{ name, desc, NULL, 0, 0, SPBOOK_SYM, prob, delay, 5, flags, 0, level }
314.  	SPELL("magic missile", "parchment", 4, 3, RAY, 2),
315.  	SPELL("fireball", "shining", 2, 6, RAY, 4),
316.  	SPELL("sleep", "glowing", 6, 1, RAY, 1),
317.  	SPELL("cone of cold", "mottled", 1, 8, RAY, 5),
318.  	SPELL("finger of death", "ragged", 1, 10, RAY, 7),
319.  
320.  	SPELL("healing", "yellow", 6, 2, NODIR, 1),
321.  	SPELL("detect monsters", "light green", 5, 1, NODIR, 1),
322.  	SPELL("force bolt", "dark blue", 4, 2, IMMEDIATE, 1),
323.  	SPELL("light", "copper", 5, 1, NODIR, 1),
324.  	SPELL("confuse monster", "white", 5, 2, IMMEDIATE, 2),
325.  	SPELL("cure blindness", "red", 3, 2, IMMEDIATE, 2),
326.  	SPELL("slow monster", "dark brown", 4, 2, IMMEDIATE, 2),
327.  	SPELL("create monster", "light brown", 4, 3, NODIR, 2),
328.  	SPELL("detect food", "pink", 5, 3, NODIR, 2),
329.  	SPELL("haste self", "light blue", 3, 4, NODIR, 3),
330.  	SPELL("cause fear", "black", 4, 3, NODIR, 3),
331.  	SPELL("cure sickness", "rusty", 3, 3, NODIR, 3),
332.  	SPELL("detect unseen", "dark green", 4, 4, NODIR, 3),
333.  	SPELL("extra healing", "magenta", 3, 5, NODIR, 3),
334.  	SPELL("charm monster", "silver", 3, 3, IMMEDIATE, 3),
335.  	SPELL("levitation", "indigo", 3, 4, NODIR, 4),
336.  	SPELL("restore strength", "plaid", 2, 5, NODIR, 4),
337.  	SPELL("invisibility", "orange", 3, 5, NODIR, 4),
338.  	SPELL("detect treasure", "bronze", 3, 5, NODIR, 4),
339.  	SPELL("dig", "cloth", 2, 6, RAY, 5),
340.  	SPELL("remove curse", "grey", 2, 5, NODIR, 5),
341.  	SPELL("magic mapping", "purple", 2, 7, NODIR, 5),
342.  	SPELL("identify", "violet", 1, 8, NODIR, 5),
343.  	SPELL("turn undead", "turquoise", 1, 8, IMMEDIATE, 6),
344.  	SPELL("polymorph", "cyan", 1, 8, IMMEDIATE, 6),
345.  	SPELL("create familiar", "tan", 1, 7, NODIR, 6),
346.  	SPELL("teleport away", "paper", 2, 6, IMMEDIATE, 6),
347.  	SPELL("cancellation", "leather", 1, 8, IMMEDIATE, 7),
348.  	SPELL("genocide", "gold", 1, 10, NODIR, 7),
349.  /* randomization */
350.  	SPELL(NULL, "dog eared", 0, 0, 0, 0),
351.  	SPELL(NULL, "thick", 0, 0, 0, 0),
352.  	SPELL(NULL, "thin", 0, 0, 0, 0),
353.  	SPELL(NULL, "stained", 0, 0, 0, 0),
354.  #endif /* SPELLS /**/
355.  
356.  #define	RING(name,stone,spec)	{ name, stone, NULL, 0, 0,\
357.  		RING_SYM, 0, 0, 1, spec, 0, 0 }
358.  
359.  	RING("adornment",	"engagement",	0),
360.  	RING("teleportation",	"wooden",	0),
361.  	RING("regeneration",	"black onyx",	0),
362.  	RING("searching",	"topaz",	0),
363.  	RING("see invisible",	"pearl",	0),
364.  	RING("stealth",		"sapphire",	0),
365.  	RING("levitation",	"moonstone",	0),
366.  	RING("poison resistance", "agate",	0),
367.  	RING("aggravate monster", "tiger eye",	0),
368.  	RING("hunger",		"shining",	0),
369.  	RING("fire resistance",	"gold",		0),
370.  	RING("cold resistance",	"copper",	0),
371.  	RING("protection from shape changers", "diamond", 0),
372.  	RING("conflict",	"jade",		0),
373.  	RING("gain strength",	"ruby",		SPEC),
374.  	RING("increase damage",	"silver",	SPEC),
375.  	RING("protection",	"granite",	SPEC),
376.  	RING("warning",		"wire",		0),
377.  	RING("teleport control", "iron",	0),
378.  	RING("polymorph",	"ivory",	0),
379.  	RING("polymorph control","blackened",	0),
380.  	RING(NULL,		"hematite",	0),
381.  	RING(NULL,		"brass",	0),
382.  
383.  /* gems ************************************************************/
384.  #define	GEM(name,color,prob,gval)	{ name, color, NULL, 0, 1,\
385.  		GEM_SYM, prob, 0, 1, 0, 0, gval }
386.  	GEM("dilithium crystal", "lavender", 1, 4500),
387.  	GEM("diamond", "blue", 1, 4000),
388.  	GEM("ruby", "red", 1, 3500),
389.  	GEM("sapphire", "blue", 1, 3000),
390.  	GEM("emerald", "green", 1, 2500),
391.  	GEM("turquoise", "green", 1, 2000),
392.  	GEM("aquamarine", "blue", 1, 1500),
393.  	GEM("tourmaline", "green", 1, 1000),
394.  	GEM("topaz", "yellow", 1, 900),
395.  	GEM("opal", "yellow", 1, 800),
396.  	GEM("garnet", "dark", 1, 700),
397.  	GEM("amethyst", "violet", 1, 650),
398.  	GEM("agate", "green", 2, 600),
399.  	GEM("onyx", "white", 2, 550),
400.  	GEM("jasper", "yellowish brown", 2, 500),
401.  	GEM("jade", "green", 2, 450),
402.  	GEM("worthless piece of blue glass", "blue", 20, 0),
403.  	GEM("worthless piece of red glass", "red", 20, 0),
404.  	GEM("worthless piece of yellow glass", "yellow", 20, 0),
405.  	GEM("worthless piece of green glass", "green", 20, 0),
406.  	{ NULL, NULL, NULL, 0, 0, ILLOBJ_SYM, 0, 0, 0, 0, 0, 0 }
407.  };
408.  
409.  char obj_symbols[] = {
410.  	ILLOBJ_SYM, AMULET_SYM, FOOD_SYM, WEAPON_SYM, TOOL_SYM,
411.  	BALL_SYM, CHAIN_SYM, ROCK_SYM, ARMOR_SYM,
412.  	POTION_SYM, SCROLL_SYM, WAND_SYM,
413.  #ifdef SPELLS
414.  	SPBOOK_SYM,
415.  #endif
416.  	RING_SYM, GEM_SYM, 0 };
417.  int bases[sizeof(obj_symbols)];
Advertisement