From 6abca99d684429a8d909260cec1f3c0f76f8ecc7 Mon Sep 17 00:00:00 2001 From: haranp Date: Fri, 1 Aug 2008 20:28:38 +0000 Subject: Better message when allies are killed. [2009285] git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6749 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index fd453e7069..174bca3f0d 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -927,9 +927,23 @@ void monster_die(monsters *monster, killer_type killer, if (death_message) { - mprf(MSGCH_MONSTER_DAMAGE, MDAM_DEAD, "You %s %s!", - _wounded_damaged(monster->type) ? "destroy" : "kill", - monster->name(DESC_NOCAP_THE).c_str()); + bool passive = (killer == KILL_YOU_CONF + && (killer_index == ANON_FRIENDLY_MONSTER + || !invalid_monster_index(killer_index))); + + if ( passive ) + { + mprf(MSGCH_MONSTER_DAMAGE, MDAM_DEAD, "%s is %s!", + monster->name(DESC_CAP_THE).c_str(), + _wounded_damaged(monster->type) ? + "destroyed" : "killed"); + } + else + { + 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) mpr("That felt strangely unrewarding."); -- cgit v1.2.3-54-g00ecf