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/spells4.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/spells4.cc')
-rw-r--r-- | crawl-ref/source/spells4.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 22def56e72..5d3962aed9 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -482,6 +482,15 @@ void cast_sticks_to_snakes(int pow) return; } + // Don't enchant sticks marked with {!D}. + if (!check_warning_inscriptions(you.inv[ weapon ], OPER_DESTROY)) + { + mprf("%s feel%s slithery for a moment!", + you.inv[weapon].name(DESC_CAP_YOUR).c_str(), + you.inv[weapon].quantity > 1 ? "s" : ""); + return; + } + const beh_type beha = item_cursed(you.inv[ weapon ]) ? BEH_HOSTILE : BEH_FRIENDLY; const unsigned short hitting = (beha == BEH_HOSTILE) ? MHITYOU |