xref: /csrg-svn/games/hack/def.objects.h (revision 41220)
1*41220Sbostic /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
2*41220Sbostic /* def.objects.h - version 1.0.3 */
3*41220Sbostic 
4*41220Sbostic /* objects have letter " % ) ( 0 _ ` [ ! ? / = * */
5*41220Sbostic #include "config.h"
6*41220Sbostic #include "def.objclass.h"
7*41220Sbostic #define	NULL	(char *)0
8*41220Sbostic 
9*41220Sbostic struct objclass objects[] = {
10*41220Sbostic 
11*41220Sbostic 	{ "strange object", NULL, NULL, 1, 0,
12*41220Sbostic 		ILLOBJ_SYM, 0, 0, 0, 0, 0, 0 },
13*41220Sbostic 	{ "amulet of Yendor", NULL, NULL, 1, 0,
14*41220Sbostic 		AMULET_SYM, 100, 0, 2, 0, 0, 0 },
15*41220Sbostic 
16*41220Sbostic #define	FOOD(name,prob,delay,weight,nutrition)	{ name, NULL, NULL, 1, 1,\
17*41220Sbostic 		FOOD_SYM, prob, delay, weight, 0, 0, nutrition }
18*41220Sbostic 
19*41220Sbostic /* dog eats foods 0-4 but prefers 1 above 0,2,3,4 */
20*41220Sbostic /* food 4 can be read */
21*41220Sbostic /* food 5 improves your vision */
22*41220Sbostic /* food 6 makes you stronger (like Popeye) */
23*41220Sbostic /* foods CORPSE up to CORPSE+52 are cadavers */
24*41220Sbostic 
25*41220Sbostic 	FOOD("food ration", 	50, 5, 4, 800),
26*41220Sbostic 	FOOD("tripe ration",	20, 1, 2, 200),
27*41220Sbostic 	FOOD("pancake",		3, 1, 1, 200),
28*41220Sbostic 	FOOD("dead lizard",	3, 0, 1, 40),
29*41220Sbostic 	FOOD("fortune cookie",	7, 0, 1, 40),
30*41220Sbostic 	FOOD("carrot",		2, 0, 1, 50),
31*41220Sbostic 	FOOD("tin",		7, 0, 1, 0),
32*41220Sbostic 	FOOD("orange",		1, 0, 1, 80),
33*41220Sbostic 	FOOD("apple",		1, 0, 1, 50),
34*41220Sbostic 	FOOD("pear",		1, 0, 1, 50),
35*41220Sbostic 	FOOD("melon",		1, 0, 1, 100),
36*41220Sbostic 	FOOD("banana",		1, 0, 1, 80),
37*41220Sbostic 	FOOD("candy bar",	1, 0, 1, 100),
38*41220Sbostic 	FOOD("egg",		1, 0, 1, 80),
39*41220Sbostic 	FOOD("clove of garlic",	1, 0, 1, 40),
40*41220Sbostic 	FOOD("lump of royal jelly", 0, 0, 1, 200),
41*41220Sbostic 
42*41220Sbostic 	FOOD("dead human",	0, 4, 40, 400),
43*41220Sbostic 	FOOD("dead giant ant",	0, 1, 3, 30),
44*41220Sbostic 	FOOD("dead giant bat",	0, 1, 3, 30),
45*41220Sbostic 	FOOD("dead centaur",	0, 5, 50, 500),
46*41220Sbostic 	FOOD("dead dragon",	0, 15, 150, 1500),
47*41220Sbostic 	FOOD("dead floating eye",	0, 1, 1, 10),
48*41220Sbostic 	FOOD("dead freezing sphere",	0, 1, 1, 10),
49*41220Sbostic 	FOOD("dead gnome",	0, 1, 10, 100),
50*41220Sbostic 	FOOD("dead hobgoblin",	0, 2, 20, 200),
51*41220Sbostic 	FOOD("dead stalker",	0, 4, 40, 400),
52*41220Sbostic 	FOOD("dead jackal",	0, 1, 10, 100),
53*41220Sbostic 	FOOD("dead kobold",	0, 1, 10, 100),
54*41220Sbostic 	FOOD("dead leprechaun",	0, 4, 40, 400),
55*41220Sbostic 	FOOD("dead mimic",	0, 4, 40, 400),
56*41220Sbostic 	FOOD("dead nymph",	0, 4, 40, 400),
57*41220Sbostic 	FOOD("dead orc",	0, 2, 20, 200),
58*41220Sbostic 	FOOD("dead purple worm",	0, 7, 70, 700),
59*41220Sbostic 	FOOD("dead quasit",	0, 2, 20, 200),
60*41220Sbostic 	FOOD("dead rust monster",	0, 5, 50, 500),
61*41220Sbostic 	FOOD("dead snake",	0, 1, 10, 100),
62*41220Sbostic 	FOOD("dead troll",	0, 4, 40, 400),
63*41220Sbostic 	FOOD("dead umber hulk",	0, 5, 50, 500),
64*41220Sbostic 	FOOD("dead vampire",	0, 4, 40, 400),
65*41220Sbostic 	FOOD("dead wraith",	0, 1, 1, 10),
66*41220Sbostic 	FOOD("dead xorn",	0, 7, 70, 700),
67*41220Sbostic 	FOOD("dead yeti",	0, 7, 70, 700),
68*41220Sbostic 	FOOD("dead zombie",	0, 1, 3, 30),
69*41220Sbostic 	FOOD("dead acid blob",	0, 1, 3, 30),
70*41220Sbostic 	FOOD("dead giant beetle",	0, 1, 1, 10),
71*41220Sbostic 	FOOD("dead cockatrice",	0, 1, 3, 30),
72*41220Sbostic 	FOOD("dead dog",	0, 2, 20, 200),
73*41220Sbostic 	FOOD("dead ettin",	0, 1, 3, 30),
74*41220Sbostic 	FOOD("dead fog cloud",	0, 1, 1, 10),
75*41220Sbostic 	FOOD("dead gelatinous cube",	0, 1, 10, 100),
76*41220Sbostic 	FOOD("dead homunculus",	0, 2, 20, 200),
77*41220Sbostic 	FOOD("dead imp",	0, 1, 1, 10),
78*41220Sbostic 	FOOD("dead jaguar",	0, 3, 30, 300),
79*41220Sbostic 	FOOD("dead killer bee",	0, 1, 1, 10),
80*41220Sbostic 	FOOD("dead leocrotta",	0, 5, 50, 500),
81*41220Sbostic 	FOOD("dead minotaur",	0, 7, 70, 700),
82*41220Sbostic 	FOOD("dead nurse",	0, 4, 40, 400),
83*41220Sbostic 	FOOD("dead owlbear",	0, 7, 70, 700),
84*41220Sbostic 	FOOD("dead piercer",	0, 2, 20, 200),
85*41220Sbostic 	FOOD("dead quivering blob",	0, 1, 10, 100),
86*41220Sbostic 	FOOD("dead giant rat",	0, 1, 3, 30),
87*41220Sbostic 	FOOD("dead giant scorpion",	0, 1, 10, 100),
88*41220Sbostic 	FOOD("dead tengu",	0, 3, 30, 300),
89*41220Sbostic 	FOOD("dead unicorn",	0, 3, 30, 300),
90*41220Sbostic 	FOOD("dead violet fungi",	0, 1, 10, 100),
91*41220Sbostic 	FOOD("dead long worm",	0, 5, 50, 500),
92*41220Sbostic /* %% wt of long worm should be proportional to its length */
93*41220Sbostic 	FOOD("dead xan",	0, 3, 30, 300),
94*41220Sbostic 	FOOD("dead yellow light",	0, 1, 1, 10),
95*41220Sbostic 	FOOD("dead zruty",	0, 6, 60, 600),
96*41220Sbostic 
97*41220Sbostic /* weapons ... - ROCK come several at a time */
98*41220Sbostic /* weapons ... - (ROCK-1) are shot using idem+(BOW-ARROW) */
99*41220Sbostic /* weapons AXE, SWORD, THSWORD are good for worm-cutting */
100*41220Sbostic /* weapons (PICK-)AXE, DAGGER, CRYSKNIFE are good for tin-opening */
101*41220Sbostic #define WEAPON(name,prob,wt,ldam,sdam)	{ name, NULL, NULL, 1, 0 /*%%*/,\
102*41220Sbostic 		WEAPON_SYM, prob, 0, wt, ldam, sdam, 0 }
103*41220Sbostic 
104*41220Sbostic 	WEAPON("arrow",		7, 0, 6, 6),
105*41220Sbostic 	WEAPON("sling bullet",	7, 0, 4, 6),
106*41220Sbostic 	WEAPON("crossbow bolt",	7, 0, 4, 6),
107*41220Sbostic 	WEAPON("dart",		7, 0, 3, 2),
108*41220Sbostic 	WEAPON("rock",		6, 1, 3, 3),
109*41220Sbostic 	WEAPON("boomerang",	2, 3, 9, 9),
110*41220Sbostic 	WEAPON("mace",		9, 3, 6, 7),
111*41220Sbostic 	WEAPON("axe",		6, 3, 6, 4),
112*41220Sbostic 	WEAPON("flail",		6, 3, 6, 5),
113*41220Sbostic 	WEAPON("long sword",	8, 3, 8, 12),
114*41220Sbostic 	WEAPON("two handed sword",	6, 4, 12, 6),
115*41220Sbostic 	WEAPON("dagger",	6, 3, 4, 3),
116*41220Sbostic 	WEAPON("worm tooth",	0, 4, 2, 2),
117*41220Sbostic 	WEAPON("crysknife",	0, 3, 10, 10),
118*41220Sbostic 	WEAPON("spear",		6, 3, 6, 8),
119*41220Sbostic 	WEAPON("bow",		6, 3, 4, 6),
120*41220Sbostic 	WEAPON("sling",		5, 3, 6, 6),
121*41220Sbostic 	WEAPON("crossbow",	6, 3, 4, 6),
122*41220Sbostic 
123*41220Sbostic 	{ "whistle", "whistle", NULL, 0, 0,
124*41220Sbostic 		TOOL_SYM, 90, 0, 2, 0, 0, 0 },
125*41220Sbostic 	{ "magic whistle", "whistle", NULL, 0, 0,
126*41220Sbostic 		TOOL_SYM, 10, 0, 2, 0, 0, 0 },
127*41220Sbostic 	{ "expensive camera", NULL, NULL, 1, 1,
128*41220Sbostic 		TOOL_SYM, 0, 0, 3, 0, 0, 0 },
129*41220Sbostic 	{ "ice box", "large box", NULL, 0, 0,
130*41220Sbostic 		TOOL_SYM, 0, 0, 40, 0, 0, 0 },
131*41220Sbostic 	{ "pick-axe", NULL, NULL, 1, 1,
132*41220Sbostic 		TOOL_SYM, 0, 0, 5, 6, 3, 0 },
133*41220Sbostic 	{ "can opener", NULL, NULL, 1, 1,
134*41220Sbostic 		TOOL_SYM, 0, 0, 1, 0, 0, 0 },
135*41220Sbostic 	{ "heavy iron ball", NULL, NULL, 1, 0,
136*41220Sbostic 		BALL_SYM, 100, 0, 20, 0, 0, 0 },
137*41220Sbostic 	{ "iron chain", NULL, NULL, 1, 0,
138*41220Sbostic 		CHAIN_SYM, 100, 0, 20, 0, 0, 0 },
139*41220Sbostic 	{ "enormous rock", NULL, NULL, 1, 0,
140*41220Sbostic 		ROCK_SYM, 100, 0, 200 /* > MAX_CARR_CAP */, 0, 0, 0 },
141*41220Sbostic 
142*41220Sbostic #define ARMOR(name,prob,delay,ac,can)	{ name, NULL, NULL, 1, 0,\
143*41220Sbostic 		ARMOR_SYM, prob, delay, 8, ac, can, 0 }
144*41220Sbostic 	ARMOR("helmet",		 3, 1, 9, 0),
145*41220Sbostic 	ARMOR("plate mail",		 5, 5, 3, 2),
146*41220Sbostic 	ARMOR("splint mail",	 8, 5, 4, 1),
147*41220Sbostic 	ARMOR("banded mail",	10, 5, 4, 0),
148*41220Sbostic 	ARMOR("chain mail",		10, 5, 5, 1),
149*41220Sbostic 	ARMOR("scale mail",		10, 5, 6, 0),
150*41220Sbostic 	ARMOR("ring mail",		15, 5, 7, 0),
151*41220Sbostic 	/* the armors below do not rust */
152*41220Sbostic 	ARMOR("studded leather armor", 13, 3, 7, 1),
153*41220Sbostic 	ARMOR("leather armor",	17, 3, 8, 0),
154*41220Sbostic 	ARMOR("elven cloak",	 5, 0, 9, 3),
155*41220Sbostic 	ARMOR("shield",		 3, 0, 9, 0),
156*41220Sbostic 	ARMOR("pair of gloves",	 1, 1, 9, 0),
157*41220Sbostic 
158*41220Sbostic #define POTION(name,color)	{ name, color, NULL, 0, 1,\
159*41220Sbostic 		POTION_SYM, 0, 0, 2, 0, 0, 0 }
160*41220Sbostic 
161*41220Sbostic 	POTION("restore strength",	"orange"),
162*41220Sbostic 	POTION("booze",		"bubbly"),
163*41220Sbostic 	POTION("invisibility",	"glowing"),
164*41220Sbostic 	POTION("fruit juice",	"smoky"),
165*41220Sbostic 	POTION("healing",	"pink"),
166*41220Sbostic 	POTION("paralysis",	"puce"),
167*41220Sbostic 	POTION("monster detection",	"purple"),
168*41220Sbostic 	POTION("object detection",	"yellow"),
169*41220Sbostic 	POTION("sickness",	"white"),
170*41220Sbostic 	POTION("confusion",	"swirly"),
171*41220Sbostic 	POTION("gain strength",	"purple-red"),
172*41220Sbostic 	POTION("speed",		"ruby"),
173*41220Sbostic 	POTION("blindness",	"dark green"),
174*41220Sbostic 	POTION("gain level",	"emerald"),
175*41220Sbostic 	POTION("extra healing",	"sky blue"),
176*41220Sbostic 	POTION("levitation",	"brown"),
177*41220Sbostic 	POTION(NULL,	"brilliant blue"),
178*41220Sbostic 	POTION(NULL,	"clear"),
179*41220Sbostic 	POTION(NULL,	"magenta"),
180*41220Sbostic 	POTION(NULL,	"ebony"),
181*41220Sbostic 
182*41220Sbostic #define SCROLL(name,text,prob) { name, text, NULL, 0, 1,\
183*41220Sbostic 		SCROLL_SYM, prob, 0, 3, 0, 0, 0 }
184*41220Sbostic 	SCROLL("mail",	"KIRJE", 0),
185*41220Sbostic 	SCROLL("enchant armor", "ZELGO MER", 6),
186*41220Sbostic 	SCROLL("destroy armor", "JUYED AWK YACC", 5),
187*41220Sbostic 	SCROLL("confuse monster", "NR 9", 5),
188*41220Sbostic 	SCROLL("scare monster", "XIXAXA XOXAXA XUXAXA", 4),
189*41220Sbostic 	SCROLL("blank paper", "READ ME", 3),
190*41220Sbostic 	SCROLL("remove curse", "PRATYAVAYAH", 6),
191*41220Sbostic 	SCROLL("enchant weapon", "DAIYEN FOOELS", 6),
192*41220Sbostic 	SCROLL("damage weapon", "HACKEM MUCHE", 5),
193*41220Sbostic 	SCROLL("create monster", "LEP GEX VEN ZEA", 5),
194*41220Sbostic 	SCROLL("taming", "PRIRUTSENIE", 1),
195*41220Sbostic 	SCROLL("genocide", "ELBIB YLOH",2),
196*41220Sbostic 	SCROLL("light", "VERR YED HORRE", 10),
197*41220Sbostic 	SCROLL("teleportation", "VENZAR BORGAVVE", 5),
198*41220Sbostic 	SCROLL("gold detection", "THARR", 4),
199*41220Sbostic 	SCROLL("food detection", "YUM YUM", 1),
200*41220Sbostic 	SCROLL("identify", "KERNOD WEL", 18),
201*41220Sbostic 	SCROLL("magic mapping", "ELAM EBOW", 5),
202*41220Sbostic 	SCROLL("amnesia", "DUAM XNAHT", 3),
203*41220Sbostic 	SCROLL("fire", "ANDOVA BEGARIN", 5),
204*41220Sbostic 	SCROLL("punishment", "VE FORBRYDERNE", 1),
205*41220Sbostic 	SCROLL(NULL, "VELOX NEB", 0),
206*41220Sbostic 	SCROLL(NULL, "FOOBIE BLETCH", 0),
207*41220Sbostic 	SCROLL(NULL, "TEMOV", 0),
208*41220Sbostic 	SCROLL(NULL, "GARVEN DEH", 0),
209*41220Sbostic 
210*41220Sbostic #define	WAND(name,metal,prob,flags)	{ name, metal, NULL, 0, 0,\
211*41220Sbostic 		WAND_SYM, prob, 0, 3, flags, 0, 0 }
212*41220Sbostic 
213*41220Sbostic 	WAND("light",	"iridium",		10,	NODIR),
214*41220Sbostic 	WAND("secret door detection",	"tin",	5,	NODIR),
215*41220Sbostic 	WAND("create monster",	"platinum",	5,	NODIR),
216*41220Sbostic 	WAND("wishing",		"glass",	1,	NODIR),
217*41220Sbostic 	WAND("striking",	"zinc",		9,	IMMEDIATE),
218*41220Sbostic 	WAND("slow monster",	"balsa",	5,	IMMEDIATE),
219*41220Sbostic 	WAND("speed monster",	"copper",	5,	IMMEDIATE),
220*41220Sbostic 	WAND("undead turning",	"silver",	5,	IMMEDIATE),
221*41220Sbostic 	WAND("polymorph",	"brass",	5,	IMMEDIATE),
222*41220Sbostic 	WAND("cancellation",	"maple",	5,	IMMEDIATE),
223*41220Sbostic 	WAND("teleportation",	"pine",		5,	IMMEDIATE),
224*41220Sbostic 	WAND("make invisible",	"marble",	9,	IMMEDIATE),
225*41220Sbostic 	WAND("digging",		"iron",		5,	RAY),
226*41220Sbostic 	WAND("magic missile",	"aluminium",	10,	RAY),
227*41220Sbostic 	WAND("fire",	"steel",	5,	RAY),
228*41220Sbostic 	WAND("sleep",	"curved",	5,	RAY),
229*41220Sbostic 	WAND("cold",	"short",	5,	RAY),
230*41220Sbostic 	WAND("death",	"long",		1,	RAY),
231*41220Sbostic 	WAND(NULL,	"oak",		0,	0),
232*41220Sbostic 	WAND(NULL,	"ebony",	0,	0),
233*41220Sbostic 	WAND(NULL,	"runed",	0,	0),
234*41220Sbostic 
235*41220Sbostic #define	RING(name,stone,spec)	{ name, stone, NULL, 0, 0,\
236*41220Sbostic 		RING_SYM, 0, 0, 1, spec, 0, 0 }
237*41220Sbostic 
238*41220Sbostic 	RING("adornment",	"engagement",	0),
239*41220Sbostic 	RING("teleportation",	"wooden",	0),
240*41220Sbostic 	RING("regeneration",	"black onyx",	0),
241*41220Sbostic 	RING("searching",	"topaz",	0),
242*41220Sbostic 	RING("see invisible",	"pearl",	0),
243*41220Sbostic 	RING("stealth",		"sapphire",	0),
244*41220Sbostic 	RING("levitation",	"moonstone",	0),
245*41220Sbostic 	RING("poison resistance", "agate",	0),
246*41220Sbostic 	RING("aggravate monster", "tiger eye",	0),
247*41220Sbostic 	RING("hunger",		"shining",	0),
248*41220Sbostic 	RING("fire resistance",	"gold",		0),
249*41220Sbostic 	RING("cold resistance",	"copper",	0),
250*41220Sbostic 	RING("protection from shape changers", "diamond", 0),
251*41220Sbostic 	RING("conflict",	"jade",		0),
252*41220Sbostic 	RING("gain strength",	"ruby",		SPEC),
253*41220Sbostic 	RING("increase damage",	"silver",	SPEC),
254*41220Sbostic 	RING("protection",	"granite",	SPEC),
255*41220Sbostic 	RING("warning",		"wire",		0),
256*41220Sbostic 	RING("teleport control", "iron",	0),
257*41220Sbostic 	RING(NULL,		"ivory",	0),
258*41220Sbostic 	RING(NULL,		"blackened",	0),
259*41220Sbostic 
260*41220Sbostic /* gems ************************************************************/
261*41220Sbostic #define	GEM(name,color,prob,gval)	{ name, color, NULL, 0, 1,\
262*41220Sbostic 		GEM_SYM, prob, 0, 1, 0, 0, gval }
263*41220Sbostic 	GEM("diamond", "blue", 1, 4000),
264*41220Sbostic 	GEM("ruby", "red", 1, 3500),
265*41220Sbostic 	GEM("sapphire", "blue", 1, 3000),
266*41220Sbostic 	GEM("emerald", "green", 1, 2500),
267*41220Sbostic 	GEM("turquoise", "green", 1, 2000),
268*41220Sbostic 	GEM("aquamarine", "blue", 1, 1500),
269*41220Sbostic 	GEM("tourmaline", "green", 1, 1000),
270*41220Sbostic 	GEM("topaz", "yellow", 1, 900),
271*41220Sbostic 	GEM("opal", "yellow", 1, 800),
272*41220Sbostic 	GEM("garnet", "dark", 1, 700),
273*41220Sbostic 	GEM("amethyst", "violet", 2, 650),
274*41220Sbostic 	GEM("agate", "green", 2, 600),
275*41220Sbostic 	GEM("onyx", "white", 2, 550),
276*41220Sbostic 	GEM("jasper", "yellowish brown", 2, 500),
277*41220Sbostic 	GEM("jade", "green", 2, 450),
278*41220Sbostic 	GEM("worthless piece of blue glass", "blue", 20, 0),
279*41220Sbostic 	GEM("worthless piece of red glass", "red", 20, 0),
280*41220Sbostic 	GEM("worthless piece of yellow glass", "yellow", 20, 0),
281*41220Sbostic 	GEM("worthless piece of green glass", "green", 20, 0),
282*41220Sbostic 	{ NULL, NULL, NULL, 0, 0, ILLOBJ_SYM, 0, 0, 0, 0, 0, 0 }
283*41220Sbostic };
284*41220Sbostic 
285*41220Sbostic char obj_symbols[] = {
286*41220Sbostic 	ILLOBJ_SYM, AMULET_SYM, FOOD_SYM, WEAPON_SYM, TOOL_SYM,
287*41220Sbostic 	BALL_SYM, CHAIN_SYM, ROCK_SYM, ARMOR_SYM, POTION_SYM, SCROLL_SYM,
288*41220Sbostic 	WAND_SYM, RING_SYM, GEM_SYM, 0 };
289*41220Sbostic int bases[sizeof(obj_symbols)];
290