Apply the new ground_level method.
[crawl.git] / crawl-ref / source / mon-behv.h
blob8ced20962faba4b6947a1e9711d978feb7b68a1b
1 /*
2 * File: mon-behv.h
3 * Summary: Monster behaviour functions.
4 * Written by: Linley Henzell
5 */
7 #ifndef MONBEHV_H
8 #define MONBEHV_H
10 #include "enum.h"
12 enum mon_event_type
14 ME_EVAL, // 0, evaluate monster AI state
15 ME_DISTURB, // noisy
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
23 class monster;
24 struct coord_def;
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
45 // on the ground.
46 #define PLAYER_POS (crawl_state.game_is_zotdef() ? zotdef_target() : you.pos())
48 coord_def zotdef_target();
50 #endif