summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-28 19:03:25 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-28 19:03:25 +0000
commit7dee23de061e78fc7a20ed8ef93d31716d82f8de (patch)
treeb6f55a90166d5e05c0f645e25ef6a347f345e071 /crawl-ref/source/monstuff.cc
parent2b335fe17e827aa4b3d756c5f5340767d002572e (diff)
downloadcrawl-ref-7dee23de061e78fc7a20ed8ef93d31716d82f8de.tar.gz
crawl-ref-7dee23de061e78fc7a20ed8ef93d31716d82f8de.zip
Add conducts for undead slaves' killing undead and demons. Currently,
the only difference between these and the conducts for servants' killing undead and demons are the messages ("slaves' kills" vs. "collateral kills"). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9288 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc30
1 files changed, 21 insertions, 9 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index f24f852c7b..74729ab5e7 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1448,24 +1448,36 @@ int monster_die(monsters *monster, killer_type killer,
|| you.religion == GOD_LUGONU
|| !anon && mons_is_god_gift(&menv[killer_index]))
{
- if (targ_holy == MH_NATURAL && attacker_holy == MH_UNDEAD)
+ if (attacker_holy == MH_UNDEAD)
{
- // Yes, this is a hack, but it makes sure that
+ const bool confused =
+ !mons_friendly(&menv[killer_index]);
+
+ // Yes, these are hacks, but they make sure that
// confused monsters doing kills are not
// referred to as "slaves", and I think it's
- // okay that Yredelemnul ignores kills done by
- // confused monsters as opposed to enslaved or
- // friendly ones. (jpeg)
- if (mons_friendly(&menv[killer_index]))
+ // okay that e.g. Yredelemnul ignores kills done
+ // by confused monsters as opposed to enslaved
+ // or friendly ones. (jpeg)
+ if (targ_holy == MH_NATURAL)
{
notice |= did_god_conduct(
- DID_LIVING_KILLED_BY_UNDEAD_SLAVE,
+ !confused ? DID_LIVING_KILLED_BY_UNDEAD_SLAVE :
+ DID_LIVING_KILLED_BY_SERVANT,
monster->hit_dice);
}
- else
+ else if (targ_holy == MH_UNDEAD)
+ {
+ notice |= did_god_conduct(
+ !confused ? DID_UNDEAD_KILLED_BY_UNDEAD_SLAVE :
+ DID_UNDEAD_KILLED_BY_SERVANT,
+ monster->hit_dice);
+ }
+ else if (targ_holy == MH_DEMONIC)
{
notice |= did_god_conduct(
- DID_LIVING_KILLED_BY_SERVANT,
+ !confused ? DID_DEMON_KILLED_BY_UNDEAD_SLAVE :
+ DID_DEMON_KILLED_BY_SERVANT,
monster->hit_dice);
}
}