summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-22 19:13:35 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-22 19:13:35 +0000
commitb432e59457a38ff3f885e6da7afd2570c5dd0098 (patch)
tree21dfe97244314bbb6e9c9dc27a1d61babb824310 /crawl-ref/source/beam.cc
parent67c2c0fa7330cb8a10c881e3370455b8909927dc (diff)
downloadcrawl-ref-b432e59457a38ff3f885e6da7afd2570c5dd0098.tar.gz
crawl-ref-b432e59457a38ff3f885e6da7afd2570c5dd0098.zip
Add Ely's pacifying monsters effect:
When a follower of Elyvilon attempts to heal a hostile monster (via ability or wand) there's a chance, depending on the healing value, max monster hp and monster type, that Ely will make that monster become neutral. If this happens, Ely hands out a bit of piety and his follower gains half of the monster's xp value. If the pacifying attempt fails, the monster is never healed, though you still lose your ressources (mana, piety, charges). Killing neutral monsters currently means you won't get any xp. Also, Ely dislikes this and hands out penance for doing so. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3812 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 7e637a96cf..7c44cdf1df 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2080,7 +2080,16 @@ int mons_ench_f2(monsters *monster, bolt &pbolt)
return (MON_AFFECTED);
case BEAM_HEALING: /* 2 = healing */
- if (heal_monster( monster, 5 + roll_dice( pbolt.damage ), false ))
+ if (YOU_KILL(pbolt.thrower))
+ {
+ if (cast_healing(5 + roll_dice( pbolt.damage ),
+ monster->x - you.x_pos, monster->y - you.y_pos) > 0)
+ {
+ pbolt.obvious_effect = true;
+ }
+ pbolt.msg_generated = true; // to avoid duplicate "nothing happens"
+ }
+ else if (heal_monster( monster, 5 + roll_dice( pbolt.damage ), false ))
{
if (monster->hit_points == monster->max_hit_points)
{