summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.h
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-07 17:29:36 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-07 17:29:36 +0000
commit3ebe01649260b5e6124f12825ee276a15e2d2f5d (patch)
tree851c6081b736b2ec4c177349341f5545ae45648f /crawl-ref/source/mon-util.h
parent6bfc79d735e545aa0b07afef39ac50ea190f1373 (diff)
downloadcrawl-ref-3ebe01649260b5e6124f12825ee276a15e2d2f5d.tar.gz
crawl-ref-3ebe01649260b5e6124f12825ee276a15e2d2f5d.zip
Decouple monsters' item pickup ability from their eating ability, and
properly generalize the checks for item-eating monsters. Currently, monsters' eating abilities are restricted to items (jelly types) and corpses (necrophagi, ghouls, and hungry ghosts; the last can eat corpses in some legends). It should probably be extended to harpies at some point, too. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10628 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.h')
-rw-r--r--crawl-ref/source/mon-util.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h
index 210740f55f..389a8e44e0 100644
--- a/crawl-ref/source/mon-util.h
+++ b/crawl-ref/source/mon-util.h
@@ -192,7 +192,6 @@ enum habitat_type
enum mon_itemuse_type
{
MONUSE_NOTHING,
- MONUSE_EATS_ITEMS,
MONUSE_OPEN_DOORS,
MONUSE_STARTING_EQUIPMENT,
MONUSE_WEAPONS_ARMOUR,
@@ -201,6 +200,15 @@ enum mon_itemuse_type
NUM_MONUSE
};
+enum mon_itemeat_type
+{
+ MONEAT_NOTHING,
+ MONEAT_ITEMS,
+ MONEAT_CORPSES,
+
+ NUM_MONEAT
+};
+
// now saved in an unsigned long.
enum mon_resist_flags
{
@@ -446,6 +454,7 @@ struct monsterentry
char speed; // How quickly speed_increment increases
mon_energy_usage energy_usage; // And how quickly it decreases
mon_itemuse_type gmon_use;
+ mon_itemeat_type gmon_eat;
size_type size;
};
@@ -488,6 +497,8 @@ bool mons_wall_shielded(const monsters *mon);
* *********************************************************************** */
mon_itemuse_type mons_class_itemuse(int mc);
mon_itemuse_type mons_itemuse(const monsters *mon);
+mon_itemeat_type mons_class_itemeat(int mc);
+mon_itemeat_type mons_itemeat(const monsters *mon);
// last updated 12may2000 {dlb}
@@ -791,8 +802,8 @@ bool mons_is_slime(const monsters *mon);
bool mons_class_is_plant(int mc);
bool mons_is_plant(const monsters *mon);
bool mons_eats_items(const monsters *mon);
+bool mons_eats_corpses(const monsters *mon);
bool mons_has_lifeforce(const monsters *mon);
-bool mons_eats_corpses(const monsters *m);
monster_type mons_genus(int mc);
monster_type mons_species(int mc);