]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - hack/def.objclass.h
1 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
2 /* def.objclass.h - version 1.0.3 */
4 /* definition of a class of objects */
7 char *oc_name
; /* actual name */
8 char *oc_descr
; /* description when name unknown */
9 char *oc_uname
; /* called by user */
10 Bitfield(oc_name_known
,1);
11 Bitfield(oc_merge
,1); /* merge otherwise equal objects */
13 schar oc_prob
; /* probability for mkobj() */
14 schar oc_delay
; /* delay when using such an object */
18 #define nutrition oc_oi /* for foods */
19 #define a_ac oc_oc1 /* for armors - only used in ARM_BONUS */
20 #define ARM_BONUS(obj) ((10 - objects[obj->otyp].a_ac) + obj->spe)
21 #define a_can oc_oc2 /* for armors */
22 #define bits oc_oc1 /* for wands and rings */
28 #define SPEC 1 /* +n is meaningful */
29 #define wldam oc_oc1 /* for weapons and PICK_AXE */
30 #define wsdam oc_oc2 /* for weapons and PICK_AXE */
31 #define g_val oc_oi /* for gems: value on exit */
34 extern struct objclass objects
[];
36 /* definitions of all object-symbols */
38 #define ILLOBJ_SYM '\\'
39 #define AMULET_SYM '"'
41 #define WEAPON_SYM ')'
47 #define POTION_SYM '!'
48 #define SCROLL_SYM '?'
52 /* Other places with explicit knowledge of object symbols:
53 * ....shk.c: char shtypes[] = "=/)%?![";
54 * mklev.c: "=/)%?![<>"
55 * hack.mkobj.c: char mkobjstr[] = "))[[!!!!????%%%%/=**";
56 * hack.apply.c: otmp = getobj("0#%", "put in");
57 * hack.eat.c: otmp = getobj("%", "eat");
58 * hack.invent.c: if(index("!%?[)=*(0/\"", sym)){
59 * hack.invent.c: || index("%?!*",otmp->olet))){