1 /**
2  * @file
3  * @brief Monsters doing stuff (monsters acting).
4 **/
5 
6 #pragma once
7 
8 #include <map>
9 
10 #include "coord-def.h"
11 
12 using std::pair;
13 
14 class monster;
15 struct bolt;
16 
17 class MonsterActionQueueCompare
18 {
19 public:
operator()20     bool operator() (pair<monster*, int> m1, pair<monster*, int> m2)
21     {
22         return m1.second < m2.second;
23     }
24 };
25 
26 void mons_set_just_seen(monster *mon);
27 void mons_reset_just_seen();
28 
29 bool mon_can_move_to_pos(const monster* mons, const coord_def& delta,
30                          bool just_check = false);
31 bool mons_can_move_towards_target(const monster* mon);
32 
33 bool handle_throw(monster* mons, bolt &beem, bool teleport, bool check_only);
34 
35 void handle_monsters(bool with_noise = false);
36 void handle_monster_move(monster* mon);
37 
38 void queue_monster_for_action(monster* mons);
39 
40 #define ENERGY_SUBMERGE(entry) (max(entry->energy_usage.swim / 2, 1))
41