summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-05 19:43:57 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-05 19:43:57 +0000
commit8532044ddfbab381d1455e76f5c324ee19764259 (patch)
tree4eb939f1c4e41149434984564b1c20362a858d0a /crawl-ref/source/dungeon.cc
parent15f4a9725ec09f6d06d2c460e96739bf508847c7 (diff)
downloadcrawl-ref-8532044ddfbab381d1455e76f5c324ee19764259.tar.gz
crawl-ref-8532044ddfbab381d1455e76f5c324ee19764259.zip
Adjust monster habitats again. Remove the M_AMPHIBIOUS flag, and
replace it with two new habitats: HT_AMPHIBIOUS_LAND and HT_AMPHIBIOUS_WATER, to indicate which habitat a monster prefers. This effectively gives amphibious monsters primary and secondary habitats; check both when trying to place such monsters. With these changes, merfolk can be placed on land properly (via wizard mode's &M) when no water is around. The one monster that can move through rock is affected as well: rock is its primary habitat, while land is its secondary one. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7142 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r--crawl-ref/source/dungeon.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index fc35399d36..cc9f37b7bd 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -4654,10 +4654,11 @@ bool dgn_place_monster(mons_spec &mspec,
const int montype = mons_class_is_zombified(mid) ? mspec.monbase
: mid;
- const habitat_type habitat = mons_habitat_by_type(montype);
+ const habitat_type habitat = mons_class_primary_habitat(montype);
if (habitat != HT_LAND
- && (habitat != HT_WATER || !mons_class_amphibious(montype)))
+ && (habitat != HT_WATER || !mons_class_amphibious(montype))
+ && (habitat != HT_ROCK || !mons_class_wall_shielded(montype)))
{
grd(where) = habitat2grid(habitat);
}