Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

include/monst.h

Go to the documentation of this file.
00001 // monst.h
00004 
00005 #ifndef MONST_H
00006 #define MONST_H
00007 
00008 //{{{
00014 struct monstattack
00015 {
00019     struct filelink type;
00020 #ifndef DATA_FILE
00021 
00022     struct range damage;
00023 #endif
00024 
00025     schar tohit;
00031     uchar trigger;
00032 };
00033 TYPEDEF(struct monstattack monstattack)
00034 
00035     
00036 #define MTRIGGER_NORMAL       0
00038 #define MTRIGGER_RANGED       1
00039 
00040 #define MTRIGGER_DEFENSE      2
00041 
00042 #define MTRIGGER_DEATH        3
00045 #define MTRIGGER_SEEN         4
00048 #define MTRIGGER_PREEMPT      5
00049 //}}}
00050 //{{{
00055 struct monstdesc
00056 {
00057     struct filelink name;    
00058     uchar drawchar;   
00059     uchar level;      
00060     uchar dv;         
00061     uchar pv;         
00062     sint hps_max;     
00063     uchar speed;      
00064     uchar power_max;  
00065     
00069     ushort ai;
00070     
00071     struct filelink ai_active;  
00072     struct filelink ai_idle;    
00073     struct filelink ai_anger;   
00074     struct filelink deathfunc;  
00075     struct filelink chatfunc;   
00076     
00077     uchar numattacks;  
00078     
00081     uint xp;           
00082     
00088     uint flags;
00089     
00090 #ifdef SUPPORT_COLOR
00091     struct colorinfo color;   
00092 #endif
00093     
00094 #ifndef DATA_FILE
00095     monstattack attacks[1]; 
00096 #endif
00097 };
00098 TYPEDEF(struct monstdesc monstdesc)
00099 //}}}
00100 
00101 //{{{
00106 struct monster
00107 {
00108     struct filelink type; 
00109     sshort hps;
00110     uchar energy;  
00111     uchar power;   
00112     sshort x;
00113     sshort y;
00120     ushort flags;  
00121     
00122     ushort pad2; 
00123 };
00124 //}}}
00125  //{{{ Monster AI flags
00131 #define MONST_PEACEFUL          1
00132 
00133 #define MONST_PET               2
00134 
00135 #define MONST_FRIENDLY          4
00136 
00137 #define MONST_ACTIVE            8
00142 #define MONST_CUST_WHEN_ACTIVE  16
00147 #define MONST_CUST_WHEN_IDLE    32
00153 #define MONST_CUST_ANGER        64
00154 
00155 #define MONST_WANDER_WHEN_IDLE  128
00156 
00157 #define MONST_CONFUSED          256
00158 
00159 #define MONST_SCARED            512
00160 
00161 #define MONST_MIMIC             1024
00162 
00163 #define MONST_SHOPKEEP          2048
00164 
00165 #define MONST_PARALYZED         4096
00166 
00167 #define AI_BRAINDEAD    (MONST_PEACEFUL)
00168 #define AI_HOSTILE      (MONST_WANDER_WHEN_IDLE)
00169 #define AI_CHASE        (AI_HOSTILE|MONST_ACTIVE)
00170 #define AI_SCARED       (AI_CHASE|MONST_SCARED)
00171 #define AI_CONFUSED     (AI_CHASE|MONST_CONFUSED)
00172 #define AI_DONTCARE     (MONST_PEACEFUL|MONST_WANDER_WHEN_IDLE)
00173 #define AI_PEACEFUL     (MONST_FRIENDLY|MONST_WANDER_WHEN_IDLE)
00174 #define AI_SHOPKEEP     (MONST_FRIENDLY|MONST_SHOPKEEP|MONST_CUST_ANGER)
00175 #define AI_PET          (MONST_PET|MONST_ACTIVE)
00176 #define AI_MIMIC        (MONST_CUST_WHEN_IDLE|MONST_MIMIC)
00177 #define AI_WEBSPINNER   (MONST_CUST_WHEN_IDLE|MONST_CUST_WHEN_ACTIVE)
00178 #define AI_NPC_SIT      (MONST_FRIENDLY|MONST_CUST_WHEN_ACTIVE)
00179 
00180 //}}}
00181  //{{{ Monster flags
00189 #define MONSTFLAG_REGENERATE   1
00190 
00191 #define MONSTFLAG_INVISIBLE    2
00192 
00193 #define MONSTFLAG_FEARLESS     4
00194 
00195 #define MONSTFLAG_PASSWALL     8
00196 
00197 #define MONSTFLAG_GROUP        16
00198 
00199 #define MONSTFLAG_HASHANDS     32
00200 
00201 #define MONSTFLAG_VAMPIRIC     64
00202 
00203 //}}}
00204 //{{{
00205 #define FACING_FRONT 0
00206 #define FACING_FLANK 1
00207 #define FACING_BEHIND 2
00208 //}}}
00209 TYPEDEF(struct monster monster)
00210 
00211 #endif //MONST_H
00212 

Generated on Thu May 20 13:12:09 2004 for CalcRogue by doxygen 1.3.6