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

Monster AI flags


Detailed Description

Possible values for monster::flags. These can be combined either with + (plus) or | (bitwise or).


Defines

#define MONST_PEACEFUL   1
 Monster is peaceful.

#define MONST_PET   2
 Monster is a pet.

#define MONST_FRIENDLY   4
 Monster is friendly.

#define MONST_ACTIVE   8
 Monster is active (senses player).

#define MONST_CUST_WHEN_ACTIVE   16
#define MONST_CUST_WHEN_IDLE   32
#define MONST_CUST_ANGER   64
#define MONST_WANDER_WHEN_IDLE   128
 Wander around when idle.

#define MONST_CONFUSED   256
 Confused.

#define MONST_SCARED   512
 Frightened.

#define MONST_MIMIC   1024
 Is a mimic.

#define MONST_SHOPKEEP   2048
 Is a shopkeeper.

#define MONST_PARALYZED   4096
 Is paralyzed.

#define AI_BRAINDEAD   (MONST_PEACEFUL)
#define AI_HOSTILE   (MONST_WANDER_WHEN_IDLE)
#define AI_CHASE   (AI_HOSTILE|MONST_ACTIVE)
#define AI_SCARED   (AI_CHASE|MONST_SCARED)
#define AI_CONFUSED   (AI_CHASE|MONST_CONFUSED)
#define AI_DONTCARE   (MONST_PEACEFUL|MONST_WANDER_WHEN_IDLE)
#define AI_PEACEFUL   (MONST_FRIENDLY|MONST_WANDER_WHEN_IDLE)
#define AI_SHOPKEEP   (MONST_FRIENDLY|MONST_SHOPKEEP|MONST_CUST_ANGER)
#define AI_PET   (MONST_PET|MONST_ACTIVE)
#define AI_MIMIC   (MONST_CUST_WHEN_IDLE|MONST_MIMIC)
#define AI_WEBSPINNER   (MONST_CUST_WHEN_IDLE|MONST_CUST_WHEN_ACTIVE)
#define AI_NPC_SIT   (MONST_FRIENDLY|MONST_CUST_WHEN_ACTIVE)


Define Documentation

#define AI_BRAINDEAD   (MONST_PEACEFUL)
 

Definition at line 167 of file monst.h.

#define AI_CHASE   (AI_HOSTILE|MONST_ACTIVE)
 

Definition at line 169 of file monst.h.

#define AI_CONFUSED   (AI_CHASE|MONST_CONFUSED)
 

Definition at line 171 of file monst.h.

#define AI_DONTCARE   (MONST_PEACEFUL|MONST_WANDER_WHEN_IDLE)
 

Definition at line 172 of file monst.h.

#define AI_HOSTILE   (MONST_WANDER_WHEN_IDLE)
 

Definition at line 168 of file monst.h.

#define AI_MIMIC   (MONST_CUST_WHEN_IDLE|MONST_MIMIC)
 

Definition at line 176 of file monst.h.

#define AI_NPC_SIT   (MONST_FRIENDLY|MONST_CUST_WHEN_ACTIVE)
 

Definition at line 178 of file monst.h.

#define AI_PEACEFUL   (MONST_FRIENDLY|MONST_WANDER_WHEN_IDLE)
 

Definition at line 173 of file monst.h.

#define AI_PET   (MONST_PET|MONST_ACTIVE)
 

Definition at line 175 of file monst.h.

#define AI_SCARED   (AI_CHASE|MONST_SCARED)
 

Definition at line 170 of file monst.h.

#define AI_SHOPKEEP   (MONST_FRIENDLY|MONST_SHOPKEEP|MONST_CUST_ANGER)
 

Definition at line 174 of file monst.h.

#define AI_WEBSPINNER   (MONST_CUST_WHEN_IDLE|MONST_CUST_WHEN_ACTIVE)
 

Definition at line 177 of file monst.h.

#define MONST_ACTIVE   8
 

Monster is active (senses player).

Definition at line 137 of file monst.h.

Referenced by monst_anger(), and monstmove().

#define MONST_CONFUSED   256
 

Confused.

Definition at line 157 of file monst.h.

Referenced by confuse_monster(), and monstmove().

#define MONST_CUST_ANGER   64
 

Use a custom function when angered

The routine used is monstdesc::ai_anger. It is called once when the monster becomes angry, and is not called again after that.

See also:
monstdesc::ai_anger

Definition at line 153 of file monst.h.

Referenced by monst_anger().

#define MONST_CUST_WHEN_ACTIVE   16
 

Use a custom routine when active

The routine used is monstdesc::ai_active.

See also:
monstdesc::ai_active

Definition at line 142 of file monst.h.

Referenced by monstmove().

#define MONST_CUST_WHEN_IDLE   32
 

Use a custom routine when idle

The routine used is monstdesc::ai_idle.

See also:
monstdesc::ai_idle

Definition at line 147 of file monst.h.

Referenced by monstmove().

#define MONST_FRIENDLY   4
 

Monster is friendly.

Definition at line 135 of file monst.h.

Referenced by monst_anger(), monst_is_peaceful(), and monstmove().

#define MONST_MIMIC   1024
 

Is a mimic.

Definition at line 161 of file monst.h.

Referenced by monst_anger().

#define MONST_PARALYZED   4096
 

Is paralyzed.

Definition at line 165 of file monst.h.

Referenced by monstmove().

#define MONST_PEACEFUL   1
 

Monster is peaceful.

Definition at line 131 of file monst.h.

Referenced by monst_anger(), and monstmove().

#define MONST_PET   2
 

Monster is a pet.

Definition at line 133 of file monst.h.

Referenced by monst_is_peaceful(), monst_is_pet(), and monstmove().

#define MONST_SCARED   512
 

Frightened.

Definition at line 159 of file monst.h.

Referenced by monstmove(), and scare_monster_force().

#define MONST_SHOPKEEP   2048
 

Is a shopkeeper.

Definition at line 163 of file monst.h.

#define MONST_WANDER_WHEN_IDLE   128
 

Wander around when idle.

Definition at line 155 of file monst.h.

Referenced by monstmove().


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