From 4fb433c499f4dd091ca5db56268a729579a420a0 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 4 Jun 2008 07:23:40 +0000 Subject: Fix zombies of wrong habitat on land. It turns out that all those careful checks for habitat were ignored (default is HT_LAND) because the base type for undead wasn't chosen until after the position. I now added another habitat check during the base type selection loop and now everything works. :) Add a warning inscription !D that ignores such items during actions like sacrificing items, destroying weapons (Ely), burning books (Trog) or casting sticks to snakes. The failure messages are very clumsy now, but they do get the point across, I hope. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5472 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mon-util.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/mon-util.cc') diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 104c77d3b3..bccde8e679 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -1209,7 +1209,9 @@ flight_type mons_flies(const monsters *mon) return (mon->ghost->fly); } - const int type = mons_is_zombified(mon)? mons_zombie_base(mon) : mon->type; + const int type = mons_is_zombified(mon) ? mons_zombie_base(mon) + : mon->type; + const flight_type ret = mons_class_flies( type ); return (ret ? ret : (_scan_mon_inv_randarts(mon, RAP_LEVITATE) > 0) ? FL_LEVITATE -- cgit v1.2.3-54-g00ecf