Source:NetHack 3.4.3/include/permonst.h

From NetHackWiki
Jump to: navigation, search

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

  1. /*	SCCS Id: @(#)permonst.h 3.4	1999/07/02	*/
  2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  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. #ifndef PERMONST_H
  2. #define PERMONST_H
  3.  
  4. /*	This structure covers all attack forms.
  5. *	aatyp is the gross attack type (eg. claw, bite, breath, ...)
  6. *	adtyp is the damage type (eg. physical, fire, cold, spell, ...)
  7. *	damn is the number of hit dice of damage from the attack.
  8. *	damd is the number of sides on each die.
  9. *
  10. *	Some attacks can do no points of damage.  Additionally, some can
  11. *	have special effects *and* do damage as well.  If damn and damd
  12. *	are set, they may have a special meaning.  For example, if set
  13. *	for a blinding attack, they determine the amount of time blinded.
  14. */
  15.  
  16. struct attack {
  17. 	uchar		aatyp;
  18. 	uchar		adtyp, damn, damd;
  19. };
  20.  
  21. /*	Max # of attacks for any given monster.
  22. */
  23.  
  24. #define NATTK		6
  25.  
  26. /*	Weight of a human body
  27. */
  28.  
  29. #define WT_HUMAN	1450
  30.  
  31. #ifndef ALIGN_H
  32. #include "align.h"
  33. #endif
  34. #include "monattk.h"
  35. #include "monflag.h"
  36.  
  37. struct permonst {
  38. 	const char	*mname;			/* full name */
  39. 	char		mlet;			/* symbol */
  40. 	schar		mlevel,			/* base monster level */
  41. 			mmove,			/* move speed */
  42. 			ac,			/* (base) armor class */
  43. 			mr;			/* (base) magic resistance */
  44. 	aligntyp	maligntyp;		/* basic monster alignment */
  45. 	unsigned short	geno;			/* creation/geno mask value */
  46. 	struct	attack	mattk[NATTK];		/* attacks matrix */
  47. 	unsigned short	cwt,			/* weight of corpse */
  48. 			cnutrit;		/* its nutritional value */
  49. 	short		pxlth;			/* length of extension */
  50. 	uchar		msound;			/* noise it makes (6 bits) */
  51. 	uchar		msize;			/* physical size (3 bits) */
  52. 	uchar		mresists;		/* resistances */
  53. 	uchar		mconveys;		/* conveyed by eating */
  54. 	unsigned long	mflags1,		/* boolean bitflags */
  55. 			mflags2;		/* more boolean bitflags */
  56. 	unsigned short	mflags3;		/* yet more boolean bitflags */
  57. # ifdef TEXTCOLOR
  58. 	uchar		mcolor;			/* color to use */
  59. # endif
  60. };
  61.  
  62. extern NEARDATA struct permonst
  63. 		mons[];		/* the master list of monster types */
  64.  
  65. #define VERY_SLOW 3
  66. #define SLOW_SPEED 9
  67. #define NORMAL_SPEED 12 /* movement rates */
  68. #define FAST_SPEED 15
  69. #define VERY_FAST 24
  70.  
  71. #define NON_PM		PM_PLAYERMON		/* "not a monster" */
  72. #define LOW_PM		(NON_PM+1)		/* first monster in mons[] */
  73. #define SPECIAL_PM	PM_LONG_WORM_TAIL	/* [normal] < ~ < [special] */
  74. 	/* mons[SPECIAL_PM] through mons[NUMMONS-1], inclusive, are
  75. 	   never generated randomly and cannot be polymorphed into */
  76.  
  77. #endif /* PERMONST_H */