diff options
-rw-r--r-- | crawl-ref/source/spells1.cc | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index ef998c9e48..ded33ab5a2 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -730,37 +730,21 @@ static int _healing_spell(int healed, bool divine_ability, return (0); } + const bool can_pacify = _can_pacify_monster(monster, healed); + // Don't divinely heal a monster you can't pacify. if (divine_ability && you.religion == GOD_ELYVILON - && !_can_pacify_monster(monster, healed)) + && !can_pacify) { canned_msg(MSG_NOTHING_HAPPENS); return (0); } bool did_something = false; - if (heal_monster(monster, healed, false)) - { - did_something = true; - mprf("You heal %s.", monster->name(DESC_NOCAP_THE).c_str()); - - if (monster->hit_points == monster->max_hit_points) - simple_monster_message(monster, " is completely healed."); - else - print_wounds(monster); - - if (you.religion == GOD_ELYVILON && !_mons_hostile(monster)) - { - simple_god_message(" appreciates your healing of a fellow " - "creature."); - if (one_chance_in(8)) - gain_piety(1); - } - } if (you.religion == GOD_ELYVILON - && _can_pacify_monster(monster, healed) + && can_pacify && _mons_hostile(monster)) { did_something = true; @@ -771,6 +755,7 @@ static int _healing_spell(int healed, bool divine_ability, else { const bool is_summoned = mons_is_summoned(monster); + simple_monster_message(monster, " turns neutral."); mons_pacify(monster); @@ -780,6 +765,25 @@ static int _healing_spell(int healed, bool divine_ability, } } + if (heal_monster(monster, healed, false)) + { + did_something = true; + mprf("You heal %s.", monster->name(DESC_NOCAP_THE).c_str()); + + if (monster->hit_points == monster->max_hit_points) + simple_monster_message(monster, " is completely healed."); + else + print_wounds(monster); + + if (you.religion == GOD_ELYVILON && !_mons_hostile(monster)) + { + simple_god_message(" appreciates your healing of a fellow " + "creature."); + if (one_chance_in(8)) + gain_piety(1); + } + } + if (!did_something) canned_msg(MSG_NOTHING_HAPPENS); |