OSDN Git Service

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