Couple of extra nethack->anethack
[aNetHack.git] / include / attrib.h
blob533fc831df138ace6b31d5e7b6c8251f25bf7792
1 /* aNetHack 0.0.1 attrib.h $ANH-Date: 1432512779 2015/05/25 00:12:59 $ $ANH-Branch: master $:$ANH-Revision: 1.8 $ */
2 /* Copyright 1988, Mike Stephenson */
3 /* aNetHack may be freely redistributed. See license for details. */
5 /* attrib.h - Header file for character class processing. */
7 #ifndef ATTRIB_H
8 #define ATTRIB_H
10 enum attrib_types {
11 A_STR = 0,
12 A_INT,
13 A_WIS,
14 A_DEX,
15 A_CON,
16 A_CHA,
18 A_MAX /* used in rn2() selection of attrib */
21 #define ABASE(x) (u.acurr.a[x])
22 #define ABON(x) (u.abon.a[x])
23 #define AEXE(x) (u.aexe.a[x])
24 #define ACURR(x) (acurr(x))
25 #define ACURRSTR (acurrstr())
26 /* should be: */
27 /* #define ACURR(x) (ABON(x) + ATEMP(x) + (Upolyd ? MBASE(x) : ABASE(x)) */
28 #define MCURR(x) (u.macurr.a[x])
29 #define AMAX(x) (u.amax.a[x])
30 #define MMAX(x) (u.mamax.a[x])
32 #define ATEMP(x) (u.atemp.a[x])
33 #define ATIME(x) (u.atime.a[x])
35 /* KMH -- Conveniences when dealing with strength constants */
36 #define STR18(x) (18 + (x)) /* 18/xx */
37 #define STR19(x) (100 + (x)) /* For 19 and above */
39 struct attribs {
40 schar a[A_MAX];
43 #define ATTRMAX(x) \
44 ((x == A_STR && Upolyd && strongmonst(youmonst.data)) \
45 ? STR18(100) \
46 : urace.attrmax[x])
47 #define ATTRMIN(x) (urace.attrmin[x])
49 #endif /* ATTRIB_H */