diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-03 01:54:09 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-03 01:54:09 +0000 |
commit | 4deda287853d0b7b5d6af596c017261e43081b32 (patch) | |
tree | 6c8d81f944ceb2e7c944f287b1630fc547b9868a /crawl-ref/source/effects.cc | |
parent | 45d8645ab9144c57c0f99b7b23e520d3420705e6 (diff) | |
download | crawl-ref-4deda287853d0b7b5d6af596c017261e43081b32.tar.gz crawl-ref-4deda287853d0b7b5d6af596c017261e43081b32.zip |
Really ensure that holy word won't damage good followers or neutrals.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4823 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 7ce920bba5..3b6b836bdc 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -129,19 +129,17 @@ int holy_word_monsters(int x, int y, int pow, int caster) monsters *monster = &menv[mon]; - if (invalid_monster(monster) || !mons_is_unholy(monster)) + if (invalid_monster(monster) || !mons_is_unholy(monster) + || (is_good_god(you.religion) + && (is_follower(monster) || mons_neutral(monster)))) + { return retval; + } - int hploss = 0; - - if (!is_good_god(you.religion) - || (!is_follower(monster) && !mons_neutral(monster))) - { - hploss = roll_dice(2, 15) + (random2(pow) / 3); + int hploss = roll_dice(2, 15) + (random2(pow) / 3); - if (hploss < 0) - hploss = 0; - } + if (hploss < 0) + hploss = 0; behaviour_event(monster, ME_ANNOY, MHITYOU); hurt_monster(monster, hploss); |