summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-05 14:23:43 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-05 14:23:43 +0000
commitac07625838acecee2f3f49ca95ece61575b019d5 (patch)
treeb14fde8c8e9028e0ab25a5168a57454633a70bda /crawl-ref/source/monstuff.cc
parentb8ab58b8fffc8d04e6530095e91d23ca2e8b7a03 (diff)
downloadcrawl-ref-ac07625838acecee2f3f49ca95ece61575b019d5.tar.gz
crawl-ref-ac07625838acecee2f3f49ca95ece61575b019d5.zip
Don't allow hydras that lost all heads to be raised as zombies or spectres.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4880 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 8f244f3766..3073e5d492 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1004,10 +1004,13 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
&& mons_holiness(monster) == MH_NATURAL
&& mons_weight(mons_species(monster->type)))
{
- if (create_monster(
+ const monster_type spectre = mons_species(monster->type);
+ // Don't allow 0-headed hydras to become spectral hydras.
+ if ((spectre != MONS_HYDRA || monster->number)
+ && create_monster(
mgen_data( MONS_SPECTRAL_THING, BEH_FRIENDLY,
0, monster->pos(), you.pet_target,
- 0, mons_species(monster->type),
+ 0, spectre,
monster->number )) != -1)
{
if (death_message)