Source:NetHack 3.4.3/include/attrib.h

From NetHackWiki
Jump to: navigation, search

Below is the full text to include/attrib.h from NetHack 3.4.3. To link to a particular line, write [[attrib.h#line123]], for example.

  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. */

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