summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.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/effects.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/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc4
1 files changed, 2 insertions, 2 deletions
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;