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/effects.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/effects.cc') diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 07538c1c81..1519bcdb09 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -2644,9 +2644,9 @@ static void _catchup_monster_moves(monsters *mon, int turns) return; // Don't move non-land or stationary monsters around. - if (mons_habitat(mon) != HT_LAND + if (mons_primary_habitat(mon) != HT_LAND || mons_is_zombified(mon) - && mons_habitat_by_type(mon->base_monster) != HT_LAND + && mons_class_primary_habitat(mon->base_monster) != HT_LAND || mons_is_stationary(mon)) { return; -- cgit v1.2.3-54-g00ecf