diff options
-rw-r--r-- | crawl-ref/source/dat/database/monspeak.txt | 12 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 23 |
2 files changed, 26 insertions, 9 deletions
diff --git a/crawl-ref/source/dat/database/monspeak.txt b/crawl-ref/source/dat/database/monspeak.txt index b5d2359096..e28a854cc9 100644 --- a/crawl-ref/source/dat/database/monspeak.txt +++ b/crawl-ref/source/dat/database/monspeak.txt @@ -1769,6 +1769,10 @@ _Dowan_Duvessa_dies_ @The_monster@ screams, "No! Oh no!" %%%% +_Dowan_Duvessa_dies_invisible_ + +@The_monster@ screams, "No! No! NO!" +%%%% ############ DUANE ### A mercenary guarding the dungeon Duane @@ -1813,6 +1817,14 @@ _Duvessa_Dowan_dies_ @The_monster@ weeps, then rights herself and shakes her weapon. %%%% +_Duvessa_Dowan_dies_invisible_ + +@The_monster@ screams in rage. + +@The_monster@ screams in a voice full of rage, "No, no!" + +@The_monster@ shouts wrathfully, "No!" +%%%% ############ EDMUND ### A mercenary guarding the dungeon Edmund diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 82788f6b40..201d374041 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -1225,28 +1225,33 @@ static void _elven_twin_died(monsters* twin) } } - if ((found_duvessa || found_dowan) && monster->observable()) + if ((found_duvessa || found_dowan) && mons_near(monster)) { // Will generate strings such as 'Duvessa_Duvessa_dies' or, alternately // 'Dowan_Dowan_dies', but as neither will match, these can safely be // ignored. - std::string death_message = getSpeakString("_" - + monster->name(DESC_CAP_THE, true) + "_" - + twin->name(DESC_CAP_THE) + "_dies_"); + std::string key = "_" + monster->name(DESC_CAP_THE, true) + "_" + + twin->name(DESC_CAP_THE) + "_dies_"; + + if (!monster->observable()) + key += "invisible_"; + + std::string death_message = getSpeakString(key); if (!death_message.empty()) mons_speaks_msg(monster, death_message, MSGCH_TALK, silenced(you.pos())); } - if (found_duvessa && monster->observable()) + if (found_duvessa && mons_near(monster)) { // Provides its own flavour message. monster->go_berserk(true); } - else if (found_dowan && monster->observable()) + else if (found_dowan && mons_near(monster)) { - // Doesn't provide any message, so needs one. - simple_monster_message(monster, " turns to flee."); + // Doesn't provide any message, so needs one, but only if visible. + if (monster->observable()) + simple_monster_message(monster, " turns to flee."); monster->add_ench(mon_enchant(ENCH_FEAR, 0, KC_YOU)); behaviour_event(monster, ME_SCARE, MHITNOT); } @@ -2093,7 +2098,7 @@ int monster_die(monsters *monster, killer_type killer, } } else if ((monster->type == MONS_DOWAN || monster->type == MONS_DUVESSA) - && monster->observable()) + && mons_near(monster)) { _elven_twin_died(monster); } |