summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-14 17:27:42 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-14 17:27:42 +0000
commit0a4a6d5626bf8f6614949474ceef872697830eb9 (patch)
tree2c80f4fbe58791fdc8dcc5b613e7098fbc789c68 /crawl-ref/source/effects.cc
parent6f58c0476ee2afc785c3f62aa5b3a7d06561837b (diff)
downloadcrawl-ref-0a4a6d5626bf8f6614949474ceef872697830eb9.tar.gz
crawl-ref-0a4a6d5626bf8f6614949474ceef872697830eb9.zip
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
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc14
1 files changed, 9 insertions, 5 deletions
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)