From 549d9a53c2f7e7c08f717de066ee56efe0b67fb4 Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 23 Jun 2008 18:23:19 +0000 Subject: When pacifying, check holiness in the right places. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6086 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells1.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/spells1.cc') diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index 00a3fde7f6..e52f5fb894 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -620,14 +620,22 @@ static bool _can_pacify_monster(const monsters *mon, const int healed) if (mons_intel(mon->type) <= I_PLANT) // no self-awareness return false; + const mon_holy_type holiness = mons_holiness(mon); + + if (holiness != MH_HOLY + && holiness != MH_NATURAL + && holiness != MH_UNDEAD + && holiness != MH_DEMONIC) + { + return false; + } + if (mons_is_stationary(mon)) // not able to leave the level return false; if (mons_is_sleeping(mon)) // not aware of what is happening return false; - const mon_holy_type holiness = mons_holiness(mon); - const int factor = (mons_intel(mon->type) <= I_ANIMAL) ? 3 : // animals (is_player_same_species(mon->type)) ? 2 // same species : 1; // other @@ -640,8 +648,6 @@ static bool _can_pacify_monster(const monsters *mon, const int healed) divisor++; else if (holiness == MH_DEMONIC) divisor += 2; - else if (holiness != MH_NATURAL) - return false; const int random_factor = random2(you.skills[SK_INVOCATIONS] * healed / divisor); -- cgit v1.2.3-54-g00ecf