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