From 8532044ddfbab381d1455e76f5c324ee19764259 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 5 Oct 2008 19:43:57 +0000 Subject: 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 --- crawl-ref/source/dungeon.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/dungeon.cc') 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); } -- cgit v1.2.3-54-g00ecf