diff options
Diffstat (limited to 'crawl-ref/source/decks.cc')
-rw-r--r-- | crawl-ref/source/decks.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index b338bb7fcc..ec604db006 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -1750,14 +1750,19 @@ static int _drain_monsters(coord_def where, int pow, int, actor *) { simple_monster_message(&mon, " is drained!"); - if (x_chance_in_y(pow / 60, 20)) + mon.hurt(&you, 2 + random2(50), BEAM_NEG); + + if (mon.alive()) { - mon.hit_dice--; - mon.experience = 0; - } + if (x_chance_in_y(pow / 60, 20)) + { + mon.hit_dice--; + mon.experience = 0; + } - mon.max_hit_points -= 2 + random2(pow/50); - mon.hurt(&you, 2 + random2(50), BEAM_NEG); + mon.max_hit_points -= 2 + random2(pow/50); + mon.hit_points = std::min(mon.max_hit_points, mon.hit_points); + } } } |