summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-17 19:30:47 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-17 19:30:47 +0000
commitfbbf5107ba1bbd09a5fcbd42aa513fe7c70f9d4a (patch)
treef824d23be73e16900c53bec0fef42ce29e23cbf0 /crawl-ref/source/beam.cc
parentfcee3b48a9c45231cc7d921c20dd9b1d5a240c88 (diff)
downloadcrawl-ref-fbbf5107ba1bbd09a5fcbd42aa513fe7c70f9d4a.tar.gz
crawl-ref-fbbf5107ba1bbd09a5fcbd42aa513fe7c70f9d4a.zip
Make draining beams use actor::drain_exp() too, and make the necromancy
conduct for draining consistent between beams and melee attacks. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8510 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc24
1 files changed, 3 insertions, 21 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index c1e31f0c74..d7071e705e 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2214,29 +2214,11 @@ int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted,
if (!doFlavouredEffects)
return (hurted);
- simple_monster_message(monster, " is drained.");
+ monster->drain_exp(pbolt.agent());
pbolt.obvious_effect = true;
if (YOU_KILL(pbolt.thrower))
- {
- did_god_conduct(DID_NECROMANCY, 2 + random2(3),
- pbolt.effect_known);
- }
-
- if (one_chance_in(5))
- {
- monster->hit_dice--;
- monster->experience = 0;
- }
-
- monster->max_hit_points -= 2 + random2(3);
- monster->hit_points -= 2 + random2(3);
-
- if (monster->hit_points >= monster->max_hit_points)
- monster->hit_points = monster->max_hit_points;
-
- if (monster->hit_dice < 1)
- monster->hit_points = 0;
+ did_god_conduct(DID_NECROMANCY, 2, pbolt.effect_known);
} // end else
break;
@@ -4050,7 +4032,7 @@ bool bolt::determine_damage(monsters* mon, int& preac, int& postac, int& final,
postac = std::max(postac, 0);
- // Don't do side effects (beam might miss or be a tracer.)
+ // Don't do side effects (beam might miss or be a tracer).
final = mons_adjust_flavoured(mon, *this, preac, false);
return true;