diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-18 17:14:21 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-18 17:14:21 +0000 |
commit | 568b2909750fda3861179187d6ce52bb48f05e6f (patch) | |
tree | 438f01183a156278dd826eecd1a07258487e0993 /crawl-ref/source/effects.cc | |
parent | 3275e9d0f89f2860f5e9dfd3ca2bf20e2d89d91a (diff) | |
download | crawl-ref-568b2909750fda3861179187d6ce52bb48f05e6f.tar.gz crawl-ref-568b2909750fda3861179187d6ce52bb48f05e6f.zip |
Fix [2769326]: Deep dwarf ghosts shouldn't regenerate.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9629 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index c13c762222..ef29b00b7b 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -3598,23 +3598,26 @@ void update_level(double elapsedTime) if (mon->flags & MF_JUST_SUMMONED) continue; - // XXX: Allow some spellcasting (like Healing and Teleport)? -- bwr + // XXX: Allow some spellcasting (like Healing and Teleport)? - bwr // const bool healthy = (mon->hit_points * 2 > mon->max_hit_points); // This is the monster healing code, moved here from tag.cc: - if (monster_descriptor(mon->type, MDSC_REGENERATES) - || mon->type == MONS_PLAYER_GHOST) + if (mons_can_regenerate(mon)) { - heal_monster(mon, turns, false); - } - else if (mons_can_regenerate(mon)) - { - // Set a lower ceiling of 0.1 on the regen rate. - const int regen_rate = - std::max(mons_natural_regen_rate(mon) * 2, 5); + if (monster_descriptor(mon->type, MDSC_REGENERATES) + || mon->type == MONS_PLAYER_GHOST) + { + heal_monster(mon, turns, false); + } + else + { + // Set a lower ceiling of 0.1 on the regen rate. + const int regen_rate = + std::max(mons_natural_regen_rate(mon) * 2, 5); - heal_monster(mon, div_rand_round(turns * regen_rate, 50), - false); + heal_monster(mon, div_rand_round(turns * regen_rate, 50), + false); + } } // Handle nets specially to remove the trapping property of the net. |