diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-04 07:23:40 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-04 07:23:40 +0000 |
commit | 4fb433c499f4dd091ca5db56268a729579a420a0 (patch) | |
tree | b13801f662665a14ad98c202d828f8fd70cb573d /crawl-ref/source/mon-util.cc | |
parent | 02eb6893037ce2da9fd70848e2734032283b793e (diff) | |
download | crawl-ref-4fb433c499f4dd091ca5db56268a729579a420a0.tar.gz crawl-ref-4fb433c499f4dd091ca5db56268a729579a420a0.zip |
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
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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 |