diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-05 14:23:43 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-05 14:23:43 +0000 |
commit | ac07625838acecee2f3f49ca95ece61575b019d5 (patch) | |
tree | b14fde8c8e9028e0ab25a5168a57454633a70bda | |
parent | b8ab58b8fffc8d04e6530095e91d23ca2e8b7a03 (diff) | |
download | crawl-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
-rw-r--r-- | crawl-ref/source/monstuff.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/spells2.cc | 10 |
2 files changed, 13 insertions, 4 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) diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 3044c39009..45e91764a3 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -460,12 +460,18 @@ static int raise_corpse( int corps, int corx, int cory, ? mitm[corps].props[MONSTER_NUMBER].get_short() : 0; + const monster_type zombie_type = + static_cast<monster_type>(mitm[corps].plus); + + // Headless hydras cannot be raised, sorry. + if (!number && zombie_type == MONS_HYDRA) + return (0); + create_monster( mgen_data( type, corps_beh, 0, coord_def(corx, cory), corps_hit, - 0, static_cast<monster_type>(mitm[corps].plus), - number)); + 0, zombie_type, number)); destroy_item(corps); } |