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