diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-01 20:28:38 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-01 20:28:38 +0000 |
commit | 6abca99d684429a8d909260cec1f3c0f76f8ecc7 (patch) | |
tree | 2301a40add3217515d94af7a0ff6a270e8e0606d /crawl-ref/source/monstuff.cc | |
parent | 02d35dea33a54081bb57272737646e1acb684919 (diff) | |
download | crawl-ref-6abca99d684429a8d909260cec1f3c0f76f8ecc7.tar.gz crawl-ref-6abca99d684429a8d909260cec1f3c0f76f8ecc7.zip |
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
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 20 |
1 files changed, 17 insertions, 3 deletions
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."); |