summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-14 18:11:26 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-14 18:11:26 +0000
commit2337ac0cf18ce15fdf37427c870bfc054167fc1d (patch)
tree9c29088a5fb0f6795fe57a11e13724f8782f57c9 /crawl-ref/source/monstuff.cc
parent5c24925f58d47b33b39a15c018c316b0b26fbd1c (diff)
downloadcrawl-ref-2337ac0cf18ce15fdf37427c870bfc054167fc1d.tar.gz
crawl-ref-2337ac0cf18ce15fdf37427c870bfc054167fc1d.zip
Fix spore monsters (ball lightning, giant spore) always giving the
"You feel a bit more experienced" message, since they were detached from the mgrid before getting around to dying. Fixes [2598088]. This is a hack; improvements welcome. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9069 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 46513abcb7..c5e878dbf9 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -542,9 +542,20 @@ static void _give_adjusted_experience(monsters *monster, killer_type killer,
need_xp_msg = true;
}
+ // FIXME: Since giant spores get detached from mgrd early
+ // on, we can't tell by this point if they were visible when
+ // they exploded. Rather than bothering to remember this, we
+ // just suppress the message.
+ if (monster->type == MONS_GIANT_SPORE
+ || monster->type == MONS_BALL_LIGHTNING)
+ {
+ need_xp_msg = false;
+ }
+
// Give a message for monsters dying out of sight.
- if (need_xp_msg && exp_gain > 0
- && (!mons_near(monster) || !you.can_see(monster))
+ if (need_xp_msg
+ && exp_gain > 0
+ && !you.can_see(monster)
&& !crawl_state.arena)
{
mpr("You feel a bit more experienced.");