attrib.h

Go to the documentation of this file.
00001 /*      SCCS Id: @(#)attrib.h   3.4     1990/22/02      */
00002 /* Copyright 1988, Mike Stephenson                                */
00003 /* NetHack may be freely redistributed.  See license for details. */
00004 
00005 /*      attrib.h - Header file for character class processing. */
00006 
00007 #ifndef ATTRIB_H
00008 #define ATTRIB_H
00009 
00010 #define A_STR   0
00011 #define A_INT   1
00012 #define A_WIS   2
00013 #define A_DEX   3
00014 #define A_CON   4
00015 #define A_CHA   5
00016 
00017 #define A_MAX   6       /* used in rn2() selection of attrib */
00018 
00019 #define ABASE(x)        (u.acurr.a[x])
00020 #define ABON(x)         (u.abon.a[x])
00021 #define AEXE(x)         (u.aexe.a[x])
00022 #define ACURR(x)        (acurr(x))
00023 #define ACURRSTR        (acurrstr())
00024 /* should be: */
00025 /* #define ACURR(x) (ABON(x) + ATEMP(x) + (Upolyd  ? MBASE(x) : ABASE(x)) */
00026 #define MCURR(x)        (u.macurr.a[x])
00027 #define AMAX(x)         (u.amax.a[x])
00028 #define MMAX(x)         (u.mamax.a[x])
00029 
00030 #define ATEMP(x)        (u.atemp.a[x])
00031 #define ATIME(x)        (u.atime.a[x])
00032 
00033 /* KMH -- Conveniences when dealing with strength constants */
00034 #define STR18(x)        (18+(x))        /* 18/xx */
00035 #define STR19(x)        (100+(x))       /* For 19 and above */
00036 
00037 struct  attribs {
00038         schar   a[A_MAX];
00039 };
00040 
00041 #define ATTRMAX(x) ((x == A_STR && Upolyd && strongmonst(youmonst.data)) ? STR18(100) : urace.attrmax[x])
00042 #define ATTRMIN(x) (urace.attrmin[x])
00043 
00044 #endif /* ATTRIB_H */