]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - hack/def.objclass.h
1 /* $NetBSD: def.objclass.h,v 1.4 1997/10/19 16:57:12 christos Exp $ */
4 * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
6 #ifndef _DEF_OBJCLASS_H_
7 #define _DEF_OBJCLASS_H_
8 /* definition of a class of objects */
11 char *oc_name
; /* actual name */
12 char *oc_descr
; /* description when name unknown */
13 char *oc_uname
; /* called by user */
14 Bitfield(oc_name_known
,1);
15 Bitfield(oc_merge
,1); /* merge otherwise equal objects */
17 schar oc_prob
; /* probability for mkobj() */
18 schar oc_delay
; /* delay when using such an object */
22 #define nutrition oc_oi /* for foods */
23 #define a_ac oc_oc1 /* for armors - only used in ARM_BONUS */
24 #define ARM_BONUS(obj) ((10 - objects[obj->otyp].a_ac) + obj->spe)
25 #define a_can oc_oc2 /* for armors */
26 #define bits oc_oc1 /* for wands and rings */
32 #define SPEC 1 /* +n is meaningful */
33 #define wldam oc_oc1 /* for weapons and PICK_AXE */
34 #define wsdam oc_oc2 /* for weapons and PICK_AXE */
35 #define g_val oc_oi /* for gems: value on exit */
38 extern struct objclass objects
[];
40 /* definitions of all object-symbols */
42 #define ILLOBJ_SYM '\\'
43 #define AMULET_SYM '"'
45 #define WEAPON_SYM ')'
51 #define POTION_SYM '!'
52 #define SCROLL_SYM '?'
56 /* Other places with explicit knowledge of object symbols:
57 * ....shk.c: char shtypes[] = "=/)%?![";
58 * mklev.c: "=/)%?![<>"
59 * hack.mkobj.c: char mkobjstr[] = "))[[!!!!????%%%%/=**";
60 * hack.apply.c: otmp = getobj("0#%", "put in");
61 * hack.eat.c: otmp = getobj("%", "eat");
62 * hack.invent.c: if(index("!%?[)=*(0/\"", sym)){
63 * hack.invent.c: || index("%?!*",otmp->olet))){
65 #endif /* _DEF_OBJCLASS_H_ */