Source:NetHack 3.1.0/permonst.h
Revision as of 07:13, 4 March 2008 by Kernigh bot (talk | contribs) (NetHack 3.1.0/permonst.h moved to Source:NetHack 3.1.0/permonst.h: Robot: moved page)
Below is the full text to permonst.h from the source code of NetHack 3.1.0. To link to a particular line, write [[NetHack 3.1.0/permonst.h#line123]], for example.
Warning! This is the source code from an old release. For the latest release, see 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: @(#)permonst.h 3.1 92/11/21 */ 2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. /* NetHack may be freely redistributed. See license for details. */ 4. 5. #ifndef PERMONST_H 6. #define PERMONST_H 7. 8. /* This structure covers all attack forms. 9. * aatyp is the gross attack type (eg. claw, bite, breath, ...) 10. * adtyp is the damage type (eg. physical, fire, cold, spell, ...) 11. * damn is the number of hit dice of damage from the attack. 12. * damd is the number of sides on each die. 13. * 14. * Some attacks can do no points of damage. Additionally, some can 15. * have special effects *and* do damage as well. If damn and damd 16. * are set, they may have a special meaning. For example, if set 17. * for a blinding attack, they determine the amount of time blinded. 18. */ 19. 20. struct attack { 21. uchar aatyp; 22. uchar adtyp, damn, damd; 23. }; 24. 25. /* Max # of attacks for any given monster. 26. */ 27. 28. #define NATTK 6 29. 30. /* Weight of a human body 31. */ 32. 33. #define WT_HUMAN 1450 34. 35. #include "monattk.h" 36. #include "monflag.h" 37. #ifndef ALIGN_H 38. #include "align.h" 39. #endif 40. 41. struct permonst { 42. const char *mname; /* full name */ 43. char mlet; /* symbol */ 44. schar mlevel, /* base monster level */ 45. mmove, /* move speed */ 46. ac, /* (base) armor class */ 47. mr; /* (base) magic resistance */ 48. aligntyp maligntyp; /* basic monster alignment */ 49. unsigned geno; /* creation/geno mask value */ 50. struct attack mattk[NATTK]; /* attacks matrix */ 51. unsigned short cwt, /* weight of corpse */ 52. cnutrit; /* its nutritional value */ 53. short pxlth; /* length of extension */ 54. uchar msound; /* noise it makes (6 bits) */ 55. uchar msize; /* physical size (3 bits) */ 56. uchar mresists; /* resistances */ 57. uchar mconveys; /* conveyed by eating */ 58. long mflags1, /* boolean bitflags */ 59. mflags2; /* more boolean bitflags */ 60. uchar mflags3; /* yet more boolean bitflags */ 61. # ifdef TEXTCOLOR 62. uchar mcolor; /* color to use */ 63. # endif 64. }; 65. 66. extern struct permonst 67. NEARDATA mons[]; /* the master list of monster types */ 68. extern struct permonst NEARDATA playermon, NEARDATA *uasmon; 69. /* you in the same terms */ 70. 71. #endif /* PERMONST_H */