Source:SLASH'EM 0.0.7E7F2/attrib.h

From NetHackWiki
Revision as of 17:34, 7 March 2008 by Kernigh bot (talk | contribs) (SLASH'EM 0.0.7E7F2/attrib.h moved to Source:SLASH'EM 0.0.7E7F2/attrib.h: Robot: moved page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Below is the full text to attrib.h from the source code of SLASH'EM 0.0.7E7F2. To link to a particular line, write [[SLASH'EM 0.0.7E7F2/attrib.h#line123]], for example.

The latest source code for vanilla NetHack is at Source code.


The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

1.    /*	SCCS Id: @(#)attrib.h	3.4	1990/22/02	*/
2.    /* Copyright 1988, Mike Stephenson				  */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    /*	attrib.h - Header file for character class processing. */
6.    
7.    #ifndef ATTRIB_H
8.    #define ATTRIB_H
9.    
10.   #define A_STR	0
11.   #define A_INT	1
12.   #define A_WIS	2
13.   #define A_DEX	3
14.   #define A_CON	4
15.   #define A_CHA	5
16.   
17.   #define A_MAX	6	/* used in rn2() selection of attrib */
18.   
19.   #define ABASE(x)	(u.acurr.a[x])
20.   #define ABON(x)		(u.abon.a[x])
21.   #define AEXE(x)		(u.aexe.a[x])
22.   #define ACURR(x)	(acurr(x))
23.   #define ACURRSTR	(acurrstr())
24.   /* should be: */
25.   /* #define ACURR(x) (ABON(x) + ATEMP(x) + (Upolyd  ? MBASE(x) : ABASE(x)) */
26.   #define MCURR(x)	(u.macurr.a[x])
27.   #define AMAX(x)		(u.amax.a[x])
28.   #define MMAX(x)		(u.mamax.a[x])
29.   
30.   #define ATEMP(x)	(u.atemp.a[x])
31.   #define ATIME(x)	(u.atime.a[x])
32.   
33.   /* KMH -- Conveniences when dealing with strength constants */
34.   #define STR18(x)	(18+(x))	/* 18/xx */
35.   #define STR19(x)	(100+(x))	/* For 19 and above */
36.   
37.   
38.   struct	attribs {
39.   	schar	a[A_MAX];
40.   };
41.   
42.   #define ATTRMAX(x) ((x == A_STR && Upolyd && strongmonst(youmonst.data)) ? STR18(100) : urace.attrmax[x])
43.   #define ATTRMIN(x) (urace.attrmin[x])
44.   
45.   #endif /* ATTRIB.H */