00001
00002
00003
00004
00005
00006
00007 #ifndef MONBEHV_H
00008 #define MONBEHV_H
00009
00010 #include "enum.h"
00011
00012 enum mon_event_type
00013 {
00014 ME_EVAL,
00015 ME_DISTURB,
00016 ME_ANNOY,
00017 ME_ALERT,
00018 ME_WHACK,
00019 ME_SCARE,
00020 ME_CORNERED,
00021 };
00022
00023 class monster;
00024 struct coord_def;
00025
00026 void behaviour_event(monster* mon, mon_event_type event_type,
00027 int src = MHITNOT, coord_def src_pos = coord_def(),
00028 bool allow_shout = true);
00029
00030
00031
00032 void handle_behaviour(monster* mon);
00033
00034 void make_mons_stop_fleeing(monster* mon);
00035
00036 void set_random_target(monster* mon);
00037
00038 void make_mons_leave_level(monster* mon);
00039
00040 bool monster_can_hit_monster(monster* mons, const monster* targ);
00041
00042
00043
00044
00045
00046 #define PLAYER_POS (crawl_state.game_is_zotdef() ? zotdef_target() : you.pos())
00047
00048 coord_def zotdef_target();
00049
00050 #endif