summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-03 01:32:26 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-03 01:32:26 +0000
commite1c38195d9d9ab0b18c0a5d5827f3e3dd040922d (patch)
treeef535733da4e62637c3d4b8b4ef90bf1c421830e
parent0ed1aaf4fa81994103963bc9774f8fb78047cd21 (diff)
downloadcrawl-ref-e1c38195d9d9ab0b18c0a5d5827f3e3dd040922d.tar.gz
crawl-ref-e1c38195d9d9ab0b18c0a5d5827f3e3dd040922d.zip
Simplify further, and don't allow holy word to damage followers or
neutral monsters if you worship a good god, just as with cleansing flame. Your followers should never be unholy anyway, and using holy word to attack e.g. unholy monsters turned neutral by Elyvilon's healing seems wrong. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4821 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/effects.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 6892820147..f802d28c4a 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -132,10 +132,16 @@ int holy_word_monsters(int x, int y, int pow, int caster)
if (invalid_monster(monster) || !mons_is_unholy(monster))
return retval;
- int hploss = roll_dice(2, 15) + (random2(pow) / 3);
+ int hploss = 0;
- if (hploss < 0)
- hploss = 0;
+ if (!is_good_god(you.religion)
+ || (!is_follower(monster) && !mons_neutral(monster)))
+ {
+ hploss = roll_dice(2, 15) + (random2(pow) / 3);
+
+ if (hploss < 0)
+ hploss = 0;
+ }
behaviour_event(monster, ME_ANNOY, MHITYOU);
hurt_monster(monster, hploss);
@@ -143,7 +149,7 @@ int holy_word_monsters(int x, int y, int pow, int caster)
if (hploss)
{
retval = 1;
- if (monster->hit_points > 0)
+ if (monster->alive())
simple_monster_message(monster, " convulses!");
else
monster_die(monster, KILL_YOU, 0);
@@ -268,7 +274,7 @@ int torment_monsters(int x, int y, int pow, int caster)
if (hploss)
{
retval = 1;
- if (monster->hit_points > 0)
+ if (monster->alive())
simple_monster_message(monster, " convulses!");
else
monster_die(monster, KILL_YOU, 0);