summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-death.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-06-06 13:28:39 -0400
committerNeil Moore <neil@s-z.org>2014-06-06 13:29:12 -0400
commit3b131ac1f04d4c04adf57e7db06b08c3af4da817 (patch)
treeccaabe4e03e641e1b0f1f6159f164d52056d36e8 /crawl-ref/source/mon-death.cc
parent911d0713d8b819f86ae3706964af41271b44701d (diff)
downloadcrawl-ref-3b131ac1f04d4c04adf57e7db06b08c3af4da817.tar.gz
crawl-ref-3b131ac1f04d4c04adf57e7db06b08c3af4da817.zip
Don't blame the player for reflected jelly kills (#8648)
Use YOU_FAULTLESS as the killer, and furthermore check for that when deciding whether something is a bad_kill.
Diffstat (limited to 'crawl-ref/source/mon-death.cc')
-rw-r--r--crawl-ref/source/mon-death.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/mon-death.cc b/crawl-ref/source/mon-death.cc
index 867db7b075..07d0017b0b 100644
--- a/crawl-ref/source/mon-death.cc
+++ b/crawl-ref/source/mon-death.cc
@@ -1866,7 +1866,8 @@ int monster_die(monster* mons, killer_type killer,
case KILL_YOU_MISSILE: // You kill by missile or beam.
case KILL_YOU_CONF: // You kill by confusion.
{
- const bool bad_kill = god_hates_killing(you.religion, mons);
+ const bool bad_kill = god_hates_killing(you.religion, mons)
+ && killer_index != YOU_FAULTLESS;
const bool was_neutral = testbits(mons->flags, MF_WAS_NEUTRAL);
const bool good_kill = gives_xp && !created_friendly;
@@ -1957,7 +1958,7 @@ int monster_die(monster* mons, killer_type killer,
// Jiyva hates you killing slimes, but eyeballs
// mutation can confuse without you meaning it.
- if (mons_is_slime(mons) && killer != KILL_YOU_CONF)
+ if (mons_is_slime(mons) && killer != KILL_YOU_CONF && bad_kill)
{
did_god_conduct(DID_KILL_SLIME, mons->hit_dice,
true, mons);