From ba61c9ea0ff447e24a9ad3f7f1b45160640c913b Mon Sep 17 00:00:00 2001 From: dolorous Date: Fri, 4 Jan 2008 03:46:04 +0000 Subject: Add rock wall to the habitats list (for rock worms), and move monster classes' associated habitats into the monsterentry struct. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3182 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mon-util.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'crawl-ref/source/mon-util.h') diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h index 3188d8c90b..0d9244aed6 100644 --- a/crawl-ref/source/mon-util.h +++ b/crawl-ref/source/mon-util.h @@ -147,6 +147,18 @@ enum mon_intel_type // Must be in increasing intelligence order I_HIGH }; +enum habitat_type +{ + // Flying monsters will appear in all categories except rock walls + HT_NORMAL, // Normal critters + HT_SHALLOW_WATER, // Union of normal + water + HT_DEEP_WATER, // Water critters + HT_LAVA, // Lava critters + HT_ROCK_WALL, // Rock wall critters + + NUM_HABITATS +}; + // order of these is important: enum mon_itemuse_type { @@ -306,6 +318,7 @@ struct monsterentry zombie_size_type zombie_size; shout_type shouts; mon_intel_type intel; + habitat_type habitat; char speed; // How quickly speed_increment increases mon_energy_usage energy_usage; // And how quickly it decreases @@ -313,6 +326,9 @@ struct monsterentry size_type size; }; +habitat_type grid2habitat(int grid); +dungeon_feature_type habitat2grid(habitat_type ht); + monsterentry *get_monster_data(int p_monsterid); // last updated 10jun2000 {dlb} @@ -334,6 +350,7 @@ std::string mons_type_name(int type, description_level_type desc ); flight_type mons_class_flies(int mc); flight_type mons_flies(const monsters *mon); +bool mons_amphibious(int mc); // last updated XXmay2000 {dlb} /* *********************************************************************** @@ -430,6 +447,7 @@ bool mons_is_summoned(const monsters *m); * *********************************************************************** */ mon_intel_type mons_intel(int mc); +habitat_type mons_habitat(int mc); bool intelligent_ally(const monsters *mon); -- cgit v1.2.3-54-g00ecf