diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-10-07 05:53:48 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-10-07 05:55:19 +0200 |
commit | 13606e5598960b84dc83bddacd515b291d178ca5 (patch) | |
tree | 3a91c85d1bf8adfe84ec4ef430d69e0aae6d3874 /crawl-ref/source/mon-speak.cc | |
parent | e550c159319c18997183f7d7ad108c4e101d20eb (diff) | |
download | crawl-ref-13606e5598960b84dc83bddacd515b291d178ca5.tar.gz crawl-ref-13606e5598960b84dc83bddacd515b291d178ca5.zip |
Fix Harold mouthing off if killed while asleep.
Being paralyzed or petrified makes it hard to speak too.
Diffstat (limited to 'crawl-ref/source/mon-speak.cc')
-rw-r--r-- | crawl-ref/source/mon-speak.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-speak.cc b/crawl-ref/source/mon-speak.cc index 2a55f19b53..12f957e0f7 100644 --- a/crawl-ref/source/mon-speak.cc +++ b/crawl-ref/source/mon-speak.cc @@ -396,7 +396,10 @@ bool mons_speaks(monster* mons) { ASSERT(!invalid_monster_type(mons->type)); - // Monsters always talk on death, even if invisible/silenced/etc. + if (mons->asleep() || mons->cannot_act()) + return false; + + // Monsters talk on death even if invisible/silenced/etc. int duration = 1; const bool force_speak = !mons->alive() || (mons->flags & MF_BANISHED) && !player_in_branch(BRANCH_ABYSS) |