diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-12 06:02:51 -0700 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-12 06:02:51 -0700 |
commit | d688e3a8a3e262d85de70a93523f144735327e57 (patch) | |
tree | 1ec1882f982263b8a55cbce64333533ea3a6bdce /crawl-ref/source/monstuff.cc | |
parent | 37a19596827126bc30dde8d49355af9fff6d5631 (diff) | |
download | crawl-ref-d688e3a8a3e262d85de70a93523f144735327e57.tar.gz crawl-ref-d688e3a8a3e262d85de70a93523f144735327e57.zip |
* Giant spores exploding in the arena should never be attributed to
the player.
* Assert if an arena kill is attributed to the player.
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 6ab2d72a55..8df057e503 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -1032,7 +1032,8 @@ static bool _spore_goes_pop(monsters *monster, killer_type killer, beam.type = dchar_glyph(DCHAR_FIRED_BURST); beam.source = monster->pos(); beam.target = monster->pos(); - beam.thrower = (monster->attitude == ATT_FRIENDLY ? KILL_YOU : KILL_MON); + beam.thrower = crawl_state.arena ? KILL_MON + : monster->attitude == ATT_FRIENDLY ? KILL_YOU : KILL_MON; beam.aux_source.clear(); if (YOU_KILL(killer)) @@ -1270,6 +1271,8 @@ int monster_die(monsters *monster, killer_type killer, crawl_state.inc_mon_acting(monster); + ASSERT(!( YOU_KILL(killer) && crawl_state.arena )); + mons_clear_trapping_net(monster); // Update list of monsters beholding player. @@ -1306,10 +1309,16 @@ int monster_die(monsters *monster, killer_type killer, if (MON_KILL(killer) && monster_killed == killer_index) { if (monster->confused_by_you()) + { + ASSERT(!crawl_state.arena); killer = KILL_YOU_CONF; + } } else if (MON_KILL(killer) && monster->has_ench(ENCH_CHARM)) + { + ASSERT(!crawl_state.arena); killer = KILL_YOU_CONF; // Well, it was confused in a sense... (jpeg) + } // Take note! if (!mons_reset && !crawl_state.arena && MONST_INTERESTING(monster)) @@ -1465,9 +1474,6 @@ int monster_die(monsters *monster, killer_type killer, mpr("That felt strangely unrewarding."); } - if (crawl_state.arena) - break; - // Killing triggers tutorial lesson. if (gives_xp) _tutorial_inspect_kill(); |