1 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
2 /* def.objclass.h - version 1.0.3 */
3 /* $DragonFly: src/games/hack/def.objclass.h,v 1.2 2005/05/22 03:37:05 y0netan1 Exp $ */
5 /* definition of a class of objects */
8 const char *oc_name; /* actual name */
9 const char *oc_descr; /* description when name unknown */
10 char *oc_uname; /* called by user */
11 Bitfield(oc_name_known,1);
12 Bitfield(oc_merge,1); /* merge otherwise equal objects */
14 schar oc_prob; /* probability for mkobj() */
15 schar oc_delay; /* delay when using such an object */
19 #define nutrition oc_oi /* for foods */
20 #define a_ac oc_oc1 /* for armors - only used in ARM_BONUS */
21 #define ARM_BONUS(obj) ((10 - objects[obj->otyp].a_ac) + obj->spe)
22 #define a_can oc_oc2 /* for armors */
23 #define bits oc_oc1 /* for wands and rings */
29 #define SPEC 1 /* +n is meaningful */
30 #define wldam oc_oc1 /* for weapons and PICK_AXE */
31 #define wsdam oc_oc2 /* for weapons and PICK_AXE */
32 #define g_val oc_oi /* for gems: value on exit */
35 extern struct objclass objects[];
37 /* definitions of all object-symbols */
39 #define ILLOBJ_SYM '\\'
40 #define AMULET_SYM '"'
42 #define WEAPON_SYM ')'
48 #define POTION_SYM '!'
49 #define SCROLL_SYM '?'
53 /* Other places with explicit knowledge of object symbols:
54 * ....shk.c: char shtypes[] = "=/)%?![";
55 * mklev.c: "=/)%?![<>"
56 * hack.mkobj.c: char mkobjstr[] = "))[[!!!!????%%%%/=**";
57 * hack.apply.c: otmp = getobj("0#%", "put in");
58 * hack.eat.c: otmp = getobj("%", "eat");
59 * hack.invent.c: if(index("!%?[)=*(0/\"", sym)){
60 * hack.invent.c: || index("%?!*",otmp->olet))){