From da22878d26b040a59f621a3a79730ee4dd7f9816 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Sun, 11 Jan 2009 02:04:06 +0000 Subject: Allow for the creation of named zombies and spectral things from named non-unique monsters (including polymorphed uniques, so you can get things like "A rat shaped Royal Jelly zombie"). Include the name of unique and named monsters in their corpse names, for things like "The corpse of the Lernaean hydra" or "The human corpse of Sigmund". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8407 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 6cfae15e46..4f5133e899 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -360,6 +360,12 @@ int fill_out_corpse(const monsters* monster, item_def& corpse, if (corpse.colour == BLACK) corpse.colour = monster->colour; + if (!monster->mname.empty()) + corpse.props[CORPSE_NAME_KEY] = monster->mname; + else if (mons_is_unique(monster->type)) + corpse.props[CORPSE_NAME_KEY] = mons_type_name(monster->type, + DESC_PLAIN); + return (corpse_class); } @@ -1327,8 +1333,7 @@ void monster_die(monsters *monster, killer_type killer, if (death_message) mpr("A glowing mist starts to gather..."); - name_zombified_unique(&menv[spectre], monster->type, - monster->name(DESC_PLAIN)); + name_zombie(&menv[spectre], monster); } } } -- cgit v1.2.3-54-g00ecf