summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-23 19:37:31 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-23 19:37:31 +0000
commitb802de9f845e3ca05a8c20934b7d6b41a5864dba (patch)
tree2f03fe68c7a99564cbb01bec2e0e013b993ccb67 /crawl-ref/source/monstuff.cc
parent5f4fe73fe0ead41e41bea5042c563815fbc9f1f5 (diff)
downloadcrawl-ref-b802de9f845e3ca05a8c20934b7d6b41a5864dba.tar.gz
crawl-ref-b802de9f845e3ca05a8c20934b7d6b41a5864dba.zip
For consistency, split off the conduct for your undead slaves' killing
holy beings. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7555 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc71
1 files changed, 44 insertions, 27 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 570f2de62f..e75feffe9b 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1135,27 +1135,24 @@ void monster_die(monsters *monster, killer_type killer,
attacker_holy = anon ? MH_NATURAL
: mons_holiness(&menv[killer_index]);
- if (attacker_holy == MH_UNDEAD)
+ if (targ_holy == MH_NATURAL && attacker_holy == MH_UNDEAD)
{
- if (targ_holy == MH_NATURAL)
+ // Yes, this is a hack, but it makes sure that confused
+ // monsters doing the kill are not referred to as "slave",
+ // 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]))
{
- // Yes, this is a hack, but it makes sure that confused
- // monsters doing the kill are not referred to as
- // "slave", 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]))
- {
- notice |=
- did_god_conduct(DID_LIVING_KILLED_BY_UNDEAD_SLAVE,
+ notice |=
+ did_god_conduct(DID_LIVING_KILLED_BY_UNDEAD_SLAVE,
monster->hit_dice);
- }
- else
- {
- notice |=
- did_god_conduct(DID_LIVING_KILLED_BY_SERVANT,
+ }
+ else
+ {
+ notice |=
+ did_god_conduct(DID_LIVING_KILLED_BY_SERVANT,
monster->hit_dice);
- }
}
}
else if (you.religion == GOD_SHINING_ONE
@@ -1172,37 +1169,57 @@ void monster_die(monsters *monster, killer_type killer,
// pass here since those followers are assumed to
// come from Summoning spells... the others are
// from invocations (Zin, TSO, Makh, Kiku). -- bwr
-
if (targ_holy == MH_NATURAL)
{
- notice |= did_god_conduct( DID_LIVING_KILLED_BY_SERVANT,
- monster->hit_dice );
+ notice |= did_god_conduct(DID_LIVING_KILLED_BY_SERVANT,
+ monster->hit_dice);
if (mons_is_evil(monster))
{
notice |=
did_god_conduct(
DID_NATURAL_EVIL_KILLED_BY_SERVANT,
- monster->hit_dice );
+ monster->hit_dice);
}
}
else if (targ_holy == MH_DEMONIC)
{
- notice |= did_god_conduct( DID_DEMON_KILLED_BY_SERVANT,
- monster->hit_dice );
+ notice |= did_god_conduct(DID_DEMON_KILLED_BY_SERVANT,
+ monster->hit_dice);
}
else if (targ_holy == MH_UNDEAD)
{
- notice |= did_god_conduct( DID_UNDEAD_KILLED_BY_SERVANT,
- monster->hit_dice );
+ notice |= did_god_conduct(DID_UNDEAD_KILLED_BY_SERVANT,
+ monster->hit_dice);
}
}
// Holy kills are always noticed.
if (targ_holy == MH_HOLY)
{
- notice |= did_god_conduct( DID_HOLY_KILLED_BY_SERVANT,
- monster->hit_dice );
+ if (attacker_holy == MH_UNDEAD)
+ {
+ // Yes, this is a hack, but it makes sure that confused
+ // monsters doing the kill are not referred to as
+ // "slave", 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]))
+ {
+ notice |=
+ did_god_conduct(DID_HOLY_KILLED_BY_UNDEAD_SLAVE,
+ monster->hit_dice);
+ }
+ else
+ {
+ notice |=
+ did_god_conduct(DID_HOLY_KILLED_BY_SERVANT,
+ monster->hit_dice);
+ }
+ }
+ else
+ notice |= did_god_conduct(DID_HOLY_KILLED_BY_SERVANT,
+ monster->hit_dice);
}
if (you.religion == GOD_VEHUMET