3 * Summary: Monster behaviour functions.
4 * Written by: Linley Henzell
14 ME_EVAL
, // 0, evaluate monster AI state
16 ME_ANNOY
, // annoy at range
17 ME_ALERT
, // alert to presence
18 ME_WHACK
, // physical attack
19 ME_SCARE
, // frighten monster
20 ME_CORNERED
, // cannot flee
26 void behaviour_event(monster
* mon
, mon_event_type event_type
,
27 int src
= MHITNOT
, coord_def src_pos
= coord_def(),
28 bool allow_shout
= true);
30 // This function is somewhat low level; you should probably use
31 // behaviour_event(mon, ME_EVAL) instead.
32 void handle_behaviour(monster
* mon
);
34 void make_mons_stop_fleeing(monster
* mon
);
36 void set_random_target(monster
* mon
);
38 void make_mons_leave_level(monster
* mon
);
40 bool monster_can_hit_monster(monster
* mons
, const monster
* targ
);
42 // For Zotdef: the target position of MHITYOU monsters is
43 // the orb, if it's on the ground. Note that zotdef_target()
44 // returns the orb position, or you.pos if the orb's not
46 #define PLAYER_POS (crawl_state.game_is_zotdef() ? zotdef_target() : you.pos())
48 coord_def
zotdef_target();