summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-31 04:23:39 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-31 04:23:39 +0000
commitff743f4fcf17f835041392202ce87c2783d8b3bc (patch)
tree82897165ddb011c7b7beeea7fd6b3895e9ce737e /crawl-ref/source/monstuff.cc
parent2b0b87df11c7df4c7aa4000c34952a1a9130d054 (diff)
downloadcrawl-ref-ff743f4fcf17f835041392202ce87c2783d8b3bc.tar.gz
crawl-ref-ff743f4fcf17f835041392202ce87c2783d8b3bc.zip
Properly name spectral things made from uniques via Death Channel.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8052 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc38
1 files changed, 28 insertions, 10 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index f8e60b4d48..6f7c3ee3c8 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1261,7 +1261,7 @@ void monster_die(monsters *monster, killer_type killer,
if (you.magic_points < you.max_magic_points)
{
mpr("You feel your power returning.");
- inc_mp( 1 + random2(monster->hit_dice / 2), false );
+ inc_mp(1 + random2(monster->hit_dice / 2), false);
}
}
@@ -1281,18 +1281,36 @@ void monster_die(monsters *monster, killer_type killer,
&& mons_can_be_zombified(monster)
&& gives_xp)
{
- const monster_type spectre = mons_species(monster->type);
+ const int type = monster->type;
+ const int spectre_type = mons_species(type);
+ const std::string name_plain = monster->name(DESC_PLAIN);
// Don't allow 0-headed hydras to become spectral hydras.
- if ((spectre != MONS_HYDRA || monster->number != 0)
- && create_monster(
- mgen_data(MONS_SPECTRAL_THING, BEH_FRIENDLY,
- 0, monster->pos(), you.pet_target,
- 0, static_cast<god_type>(you.attribute[ATTR_DIVINE_DEATH_CHANNEL]),
- spectre, monster->number)) != -1)
+ if (spectre_type != MONS_HYDRA || monster->number != 0)
{
- if (death_message)
- mpr("A glowing mist starts to gather...");
+ const int spectre =
+ create_monster(
+ mgen_data(MONS_SPECTRAL_THING, BEH_FRIENDLY,
+ 0, monster->pos(), you.pet_target,
+ 0, static_cast<god_type>(you.attribute[ATTR_DIVINE_DEATH_CHANNEL]),
+ spectre_type, monster->number)) != -1)
+
+ if (spectre != -1)
+ {
+ if (death_message)
+ mpr("A glowing mist starts to gather...");
+
+ if (mons_is_unique(type))
+ {
+ menv[spectre].mname = name_plain;
+
+ // Special case for Blork the orc: shorten
+ // his name to "Blork" to avoid mentions of
+ // "Blork the orc the spectral orc".
+ if (type == MONS_BLORK_THE_ORC)
+ menv[spectre].mname = "Blork";
+ }
+ }
}
}
break;