summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.h
diff options
context:
space:
mode:
authorShmuale Mark <shm.mark@gmail.com>2014-06-19 16:05:04 -0400
committerShmuale Mark <shm.mark@gmail.com>2014-06-22 10:03:45 -0400
commit465957cba490a2a9d5444a64523572a90cfb837f (patch)
tree536c94ce0702e60217120aa2bb27325aff1b8f2d /crawl-ref/source/mon-util.h
parent393eda0d444702a7eda580e6c363bbdcaba8d54e (diff)
downloadcrawl-ref-465957cba490a2a9d5444a64523572a90cfb837f.tar.gz
crawl-ref-465957cba490a2a9d5444a64523572a90cfb837f.zip
The great mon-stuff migration.
A good deal of functions move to the two new files, mon-poly and mon-message. Of the others, some go to where they are used, some to mon-util, and a few are made member methods of monster. This probably breaks Xcode compilation, and I'm not able to test the changes I made to MSVC that will (hopefully) keep it working.
Diffstat (limited to 'crawl-ref/source/mon-util.h')
-rw-r--r--crawl-ref/source/mon-util.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h
index ddfdf83857..91a54e409c 100644
--- a/crawl-ref/source/mon-util.h
+++ b/crawl-ref/source/mon-util.h
@@ -280,11 +280,11 @@ mon_energy_usage mons_class_energy(monster_type mc);
int mons_class_zombie_base_speed(monster_type zombie_base_mc);
int mons_base_speed(const monster* mon);
+bool get_tentacle_head(const monster*& mon);
+
bool mons_class_can_regenerate(monster_type mc);
bool mons_can_regenerate(const monster* mon);
bool mons_class_fast_regen(monster_type mc);
-bool mons_class_can_display_wounds(monster_type mc);
-bool mons_can_display_wounds(const monster* mon);
int mons_zombie_size(monster_type mc);
monster_type mons_zombie_base(const monster* mon);
bool mons_class_is_zombified(monster_type mc);
@@ -471,6 +471,8 @@ monster_type mons_tentacle_child_type(const monster* mons);
bool mons_tentacle_adjacent(const monster* parent, const monster* child);
mon_threat_level_type mons_threat_level(const monster *mon,
bool real = false);
+int count_monsters(monster_type mtyp, bool friendly_only);
+int count_allies();
bool mons_foe_is_marked(const monster* mons);
vector<monster* > get_on_level_followers();
@@ -482,4 +484,17 @@ bool mons_antimagic_affected(const monster* mons);
void reset_all_monsters();
void debug_mondata();
+
+bool choose_any_monster(const monster* mon);
+monster *choose_random_nearby_monster(
+ int weight,
+ bool (*suitable)(const monster* mon) =
+ choose_any_monster,
+ bool prefer_named_or_priest = false);
+
+monster *choose_random_monster_on_level(
+ int weight,
+ bool (*suitable)(const monster* mon) =
+ choose_any_monster);
+
#endif