summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-death.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-06-13 19:49:26 -0400
committerNeil Moore <neil@s-z.org>2014-06-13 20:04:09 -0400
commitc9664ec494a273dcfcd23d9c6c0d852e31215632 (patch)
tree0b995abaffd749d75caf10ea3905508a7f51d99b /crawl-ref/source/mon-death.cc
parentca8c18a72f522f6e72cd5d5fd717277589f95c95 (diff)
downloadcrawl-ref-c9664ec494a273dcfcd23d9c6c0d852e31215632.tar.gz
crawl-ref-c9664ec494a273dcfcd23d9c6c0d852e31215632.zip
Be more picky about awarding Song of Slaying bonus (Kramin)
Don't give the bonus for monsters that wouldn't give XP: those created friendly, those that were neutral, and those with ENCH_ABJ or ENCH_FAKE_ABJ, even if not summoned (opponents' spectral weapons, for example).
Diffstat (limited to 'crawl-ref/source/mon-death.cc')
-rw-r--r--crawl-ref/source/mon-death.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/mon-death.cc b/crawl-ref/source/mon-death.cc
index 434503d152..8e5fb83eb0 100644
--- a/crawl-ref/source/mon-death.cc
+++ b/crawl-ref/source/mon-death.cc
@@ -1822,6 +1822,7 @@ int monster_die(monster* mons, killer_type killer,
const bool exploded = mons->flags & MF_EXPLODE_KILL;
const bool created_friendly = testbits(mons->flags, MF_NO_REWARD);
+ const bool was_neutral = testbits(mons->flags, MF_WAS_NEUTRAL);
bool anon = (killer_index == ANON_FRIENDLY_MONSTER);
mon_holy_type targ_holy = mons->holiness();
@@ -1838,8 +1839,11 @@ int monster_die(monster* mons, killer_type killer,
// Adjust song of slaying bonus
// Kills by the spectral weapon should be adjusted by this point to be
- // kills by the player --- so kills by the spectral weapon are considered here as well
- if (killer == KILL_YOU && you.duration[DUR_SONG_OF_SLAYING] && !mons->is_summoned() && gives_xp)
+ // kills by the player --- so kills by the spectral weapon are considered
+ // here as well
+ if (killer == KILL_YOU && you.duration[DUR_SONG_OF_SLAYING] && gives_xp
+ && !mons->has_ench(ENCH_ABJ) && !fake_abjuration && !created_friendly
+ && !was_neutral)
{
int sos_bonus = you.props["song_of_slaying_bonus"].get_int();
mon_threat_level_type threat = mons_threat_level(mons, true);
@@ -1861,7 +1865,6 @@ int monster_die(monster* mons, killer_type killer,
{
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;
if (death_message)