From 94d956b872a116e4523fc73fec1a0420c33615ee Mon Sep 17 00:00:00 2001 From: haranp Date: Tue, 17 Feb 2009 22:48:28 +0000 Subject: Implement [2535038]: monsters now have a chance of shouting whenever they are woken up, unless it's by a successful stab. (The previous behaviour made them shout only when they were woken up by the player walking around.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9121 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/fight.cc') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 417753447a..66bcf8cc8c 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -865,7 +865,9 @@ bool melee_attack::player_attack() } // Always upset monster regardless of damage. - behaviour_event(defender_as_monster(), ME_WHACK, MHITYOU); + // However, successful stabs inhibit shouting. + behaviour_event(defender_as_monster(), ME_WHACK, MHITYOU, + coord_def(), !stab_attempt); if (damage_done > 0 && !defender->is_summoned() -- cgit v1.2.3-54-g00ecf