permonst.h

Go to the documentation of this file.
00001 /*      SCCS Id: @(#)permonst.h 3.4     1999/07/02      */
00002 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
00003 /* NetHack may be freely redistributed.  See license for details. */
00004 
00005 #ifndef PERMONST_H
00006 #define PERMONST_H
00007 
00008 /*      This structure covers all attack forms.
00009  *      aatyp is the gross attack type (eg. claw, bite, breath, ...)
00010  *      adtyp is the damage type (eg. physical, fire, cold, spell, ...)
00011  *      damn is the number of hit dice of damage from the attack.
00012  *      damd is the number of sides on each die.
00013  *
00014  *      Some attacks can do no points of damage.  Additionally, some can
00015  *      have special effects *and* do damage as well.  If damn and damd
00016  *      are set, they may have a special meaning.  For example, if set
00017  *      for a blinding attack, they determine the amount of time blinded.
00018  */
00019 
00020 struct attack {
00021         uchar           aatyp;
00022         uchar           adtyp, damn, damd;
00023 };
00024 
00025 /*      Max # of attacks for any given monster.
00026  */
00027 
00028 #define NATTK           6
00029 
00030 /*      Weight of a human body
00031  */
00032 
00033 #define WT_HUMAN        1450
00034 
00035 #ifndef ALIGN_H
00036 #include "align.h"
00037 #endif
00038 #include "monattk.h"
00039 #include "monflag.h"
00040 
00041 struct permonst {
00042         const char      *mname;                 /* full name */
00043         char            mlet;                   /* symbol */
00044         schar           mlevel,                 /* base monster level */
00045                         mmove,                  /* move speed */
00046                         ac,                     /* (base) armor class */
00047                         mr;                     /* (base) magic resistance */
00048         aligntyp        maligntyp;              /* basic monster alignment */
00049         unsigned short  geno;                   /* creation/geno mask value */
00050         struct  attack  mattk[NATTK];           /* attacks matrix */
00051         unsigned short  cwt,                    /* weight of corpse */
00052                         cnutrit;                /* its nutritional value */
00053         short           pxlth;                  /* length of extension */
00054         uchar           msound;                 /* noise it makes (6 bits) */
00055         uchar           msize;                  /* physical size (3 bits) */
00056         uchar           mresists;               /* resistances */
00057         uchar           mconveys;               /* conveyed by eating */
00058         unsigned long   mflags1,                /* boolean bitflags */
00059                         mflags2;                /* more boolean bitflags */
00060         unsigned short  mflags3;                /* yet more boolean bitflags */
00061 # ifdef TEXTCOLOR
00062         uchar           mcolor;                 /* color to use */
00063 # endif
00064 };
00065 
00066 extern NEARDATA struct permonst
00067                 mons[];         /* the master list of monster types */
00068 
00069 #define VERY_SLOW 3
00070 #define SLOW_SPEED 9
00071 #define NORMAL_SPEED 12 /* movement rates */
00072 #define FAST_SPEED 15
00073 #define VERY_FAST 24
00074 
00075 #define NON_PM          PM_PLAYERMON            /* "not a monster" */
00076 #define LOW_PM          (NON_PM+1)              /* first monster in mons[] */
00077 #define SPECIAL_PM      PM_LONG_WORM_TAIL       /* [normal] < ~ < [special] */
00078         /* mons[SPECIAL_PM] through mons[NUMMONS-1], inclusive, are
00079            never generated randomly and cannot be polymorphed into */
00080 
00081 #endif /* PERMONST_H */