From 54ccf63c382d3e27c7165ee57a721929dc45f77c Mon Sep 17 00:00:00 2001 From: Vsevolod Kozlov Date: Tue, 10 Nov 2009 16:48:44 +0300 Subject: Make actor::heal return bool; move heal_monster to monsters::heal. monsters::heal and heal_monster used to have slightly different logic for increasing maximum HP. Now the heal_monster logic is used everywhere. player::heal always returns true at the moment, but since its return value is never checked, that does not affect anything. --- crawl-ref/source/effects.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/effects.cc') diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index c3be41fa8b..5ed0c37bf8 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -4197,7 +4197,7 @@ void update_level(double elapsedTime) if (monster_descriptor(mon->type, MDSC_REGENERATES) || mon->type == MONS_PLAYER_GHOST) { - heal_monster(mon, turns, false); + mon->heal(turns); } else { @@ -4205,8 +4205,7 @@ void update_level(double elapsedTime) const int regen_rate = std::max(mons_natural_regen_rate(mon) * 2, 5); - heal_monster(mon, div_rand_round(turns * regen_rate, 50), - false); + mon->heal(div_rand_round(turns * regen_rate, 50)); } } -- cgit v1.2.3-54-g00ecf