From 0a4a6d5626bf8f6614949474ceef872697830eb9 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 14 Mar 2009 17:27:42 +0000 Subject: Fix [2686874]: Make torment wake sleeping monsters if it damages them. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9475 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/effects.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/effects.cc') diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index b74bdc5d11..6c0e1f0da2 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -112,11 +112,10 @@ int holy_word_player(int pow, int caster, actor *attacker) int holy_word_monsters(coord_def where, int pow, int caster, actor *attacker) { - int retval = 0; - - // doubt this will ever happen, but it's here as a safety -- bwr pow = std::min(300, pow); + int retval = 0; + // Is the player in this cell? if (where == you.pos()) retval = holy_word_player(pow, caster, attacker); @@ -272,10 +271,15 @@ int torment_monsters(coord_def where, int pow, int caster, actor *attacker) int hploss = std::max(0, monster->hit_points / 2 - 1); if (hploss) + { simple_monster_message(monster, " convulses!"); - // Currently, torment doesn't annoy the monsters it affects because - // it can't kill them, and because hostile monsters use it. + // Currently, torment doesn't annoy the monsters it affects + // because it can't kill them, and because hostile monsters use + // it. It will alert them, though. + behaviour_event(monster, ME_ALERT, MHITYOU); + } + monster->hurt(NULL, hploss, BEAM_TORMENT_DAMAGE); if (hploss) -- cgit v1.2.3-54-g00ecf