summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-20 19:03:17 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-20 19:03:17 +0000
commit521547a837c9aec6c14c4ecbc3f1cc66d5fb11ad (patch)
tree496fa8ae1f6f33a4ab4b86d2b70fba68382524ab /crawl-ref/source/monstuff.cc
parent29b8231d094fc97a59736a2c5c38377a052e9d47 (diff)
downloadcrawl-ref-521547a837c9aec6c14c4ecbc3f1cc66d5fb11ad.tar.gz
crawl-ref-521547a837c9aec6c14c4ecbc3f1cc66d5fb11ad.zip
FR 1920700: Allow the special kill cases (such as simulacra or
vortices) to be handled in the god_conduct checks. There are probably still buggy remnants. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3759 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index b6c787ff09..2ab379d8c9 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -599,7 +599,7 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
update_beholders(monster, true);
const int monster_killed = monster_index(monster);
- const bool death_message =
+ bool death_message =
!silent && mons_near(monster) && player_monster_visible(monster);
bool in_transit = false;
const bool hard_reset = testbits(monster->flags, MF_HARD_RESET);
@@ -681,8 +681,11 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
|| monster->type == MONS_SPATIAL_VORTEX)
{
if (!silent)
+ {
simple_monster_message( monster, " dissipates!",
MSGCH_MONSTER_DAMAGE, MDAM_DEAD );
+ death_message = false;
+ }
if (monster->type == MONS_FIRE_VORTEX)
place_cloud(CLOUD_FIRE, monster->x, monster->y, 2 + random2(4),
@@ -692,9 +695,12 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
|| monster->type == MONS_SIMULACRUM_LARGE)
{
if (!silent)
+ {
simple_monster_message(
monster, " vapourises!", MSGCH_MONSTER_DAMAGE,
MDAM_DEAD );
+ death_message = false;
+ }
place_cloud(CLOUD_COLD, monster->x, monster->y, 2 + random2(4),
monster->kill_alignment());
@@ -709,6 +715,7 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
else
simple_monster_message(monster, " falls from the air.",
MSGCH_MONSTER_DAMAGE, MDAM_DEAD);
+ death_message = false;
}
if (hard_reset)
@@ -716,10 +723,9 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
monster->x, monster->y, 1 + random2(3),
monster->kill_alignment() );
}
- else
+
+ switch (killer)
{
- switch (killer)
- {
case KILL_YOU: /* You kill in combat. */
case KILL_YOU_MISSILE: /* You kill by missile or beam. */
case KILL_YOU_CONF: /* You kill by confusion */
@@ -734,10 +740,10 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
mprf(MSGCH_MONSTER_DAMAGE, MDAM_DEAD, "You %s %s!",
wounded_damaged(monster->type) ? "destroy" : "kill",
monster->name(DESC_NOCAP_THE).c_str());
- }
- if ((created_friendly || was_neutral) && gives_xp && death_message)
- mpr("That felt strangely unrewarding.");
+ if ((created_friendly || was_neutral) && gives_xp)
+ mpr("That felt strangely unrewarding.");
+ }
// killing triggers tutorial lesson
tutorial_inspect_kill();
@@ -991,7 +997,6 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
default:
monster->destroy_inventory();
break;
- }
}
if (monster->type == MONS_MUMMY)