From b2a0f789b94558ed467b25ac5355eaf8b6558077 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sat, 31 May 2008 23:33:49 +0000 Subject: Fix 1962147: Move the comments on the food you eat at the end of DELAY_EAT. Fix 1971216: Kills by confused undead use LIVING_KILLED_BY_SERVANT instead because the message ("collateral kill") fits better and, though it's basically a hack, the distinction does fit somehow. Fix 1914948: Tweak message when you resist a spell cast by an invisible monster. Fix 1946608: Print "Nothing appears to happen." if reading ?EWI when unarmed. I guess that's it, plus probably some more cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5378 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 2e0cffac11..19e4259a87 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -480,7 +480,7 @@ static bool _is_pet_kill(killer_type killer, int i) return (false); const monsters *m = &menv[i]; - if (mons_friendly(m)) // this includes enslaved monsters + if (mons_friendly(m)) // This includes enslaved monsters. return (true); // Check if the monster was confused by you or a friendly, which @@ -1055,9 +1055,25 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) if (attacker_holy == MH_UNDEAD) { if (targ_holy == MH_NATURAL) - notice |= - did_god_conduct(DID_LIVING_KILLED_BY_UNDEAD_SLAVE, - monster->hit_dice); + { + // Yes, this is a hack, but it makes sure that confused + // monsters doing the kill are not referred to as + // "slave", and I think it's okay that Yredelemnul + // ignores kills done by confused monsters as opposed + // to enslaved or friendly ones. (jpeg) + if (mons_friendly(&menv[i])) + { + notice |= + did_god_conduct(DID_LIVING_KILLED_BY_UNDEAD_SLAVE, + monster->hit_dice); + } + else + { + notice |= + did_god_conduct(DID_LIVING_KILLED_BY_SERVANT, + monster->hit_dice); + } + } } else if (you.religion == GOD_VEHUMET || you.religion == GOD_MAKHLEB @@ -1231,20 +1247,14 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) } else if (monster->type == MONS_BORIS && !in_transit) { - // XXX: actual blood curse effect for Boris? -- bwr + // XXX: Actual blood curse effect for Boris? -- bwr - if (one_chance_in(5)) - mons_speaks( monster ); - else + // Provide the player with an ingame clue to Boris' return. -- bwr + std::string msg = getSpeakString("Boris return_speech"); + if (!msg.empty()) { - // Provide the player with an ingame clue to Boris' return. -- bwr - std::string msg = getSpeakString("Boris return_speech"); - - if (!msg.empty()) - { - msg = do_mon_str_replacements(msg, monster); - mpr(msg.c_str(), MSGCH_TALK); - } + msg = do_mon_str_replacements(msg, monster); + mpr(msg.c_str(), MSGCH_TALK); } // Now that Boris is dead, he's a valid target for monster @@ -3109,6 +3119,7 @@ static void _handle_nearby_ability(monsters *monster) if (one_chance_in(chance)) mons_speaks(monster); } + // Okay then, don't speak. if (monster_can_submerge(monster, grd[monster->x][monster->y]) && !player_beheld_by(monster) // no submerging if player entranced -- cgit v1.2.3-54-g00ecf