domain: Nuke pfslowtimo.
[dragonfly.git] / games / hack / def.objclass.h
blobe3885549e3928ae30ef08a0023c2d0ed06317c90
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.3 2006/08/21 19:45:32 pavalos Exp $ */
5 #ifndef _DEF_OBJCLASS_H_
6 #define _DEF_OBJCLASS_H_
7 /* definition of a class of objects */
9 struct objclass {
10 const char *oc_name; /* actual name */
11 const char *oc_descr; /* description when name unknown */
12 char *oc_uname; /* called by user */
13 Bitfield(oc_name_known, 1);
14 Bitfield(oc_merge, 1); /* merge otherwise equal objects */
15 char oc_olet;
16 schar oc_prob; /* probability for mkobj() */
17 schar oc_delay; /* delay when using such an object */
18 uchar oc_weight;
19 schar oc_oc1, oc_oc2;
20 int oc_oi;
21 #define nutrition oc_oi /* for foods */
22 #define a_ac oc_oc1 /* for armors - only used in ARM_BONUS */
23 #define ARM_BONUS(obj) ((10 - objects[obj->otyp].a_ac) + obj->spe)
24 #define a_can oc_oc2 /* for armors */
25 #define bits oc_oc1 /* for wands and rings */
26 /* wands */
27 #define NODIR 1
28 #define IMMEDIATE 2
29 #define RAY 4
30 /* rings */
31 #define SPEC 1 /* +n is meaningful */
32 #define wldam oc_oc1 /* for weapons and PICK_AXE */
33 #define wsdam oc_oc2 /* for weapons and PICK_AXE */
34 #define g_val oc_oi /* for gems: value on exit */
37 extern struct objclass objects[];
39 /* definitions of all object-symbols */
41 #define ILLOBJ_SYM '\\'
42 #define AMULET_SYM '"'
43 #define FOOD_SYM '%'
44 #define WEAPON_SYM ')'
45 #define TOOL_SYM '('
46 #define BALL_SYM '0'
47 #define CHAIN_SYM '_'
48 #define ROCK_SYM '`'
49 #define ARMOR_SYM '['
50 #define POTION_SYM '!'
51 #define SCROLL_SYM '?'
52 #define WAND_SYM '/'
53 #define RING_SYM '='
54 #define GEM_SYM '*'
55 /* Other places with explicit knowledge of object symbols:
56 * hack.mklev.c: "=/)%?![<>"[rn2(9)];
57 * hack.mkobj.c: char mkobjstr[] = "))[[!!!!????%%%%/=**))[[!!!!????%%%%/=**(%";
58 * hack.apply.c: otmp = getobj("0#%", "put in");
59 * hack.eat.c: otmp = getobj("%", "eat");
60 * hack.invent.c: else if (strchr("!%?[()= /\"0", sym)) {
62 #endif /* _DEF_OBJCLASS_H_ */