From 216ea74607c26d1706b43aa8fccb11e553a962e8 Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 23 Jun 2008 18:07:07 +0000 Subject: Clean up monster pacifying a bit: don't allow it to work for stationary monsters, or for monsters that aren't holy, natural, undead, or demonic. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6085 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells1.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crawl-ref/source/spells1.cc') diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index a6b4f48ac0..00a3fde7f6 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -620,6 +620,9 @@ static bool _can_pacify_monster(const monsters *mon, const int healed) if (mons_intel(mon->type) <= I_PLANT) // no self-awareness 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; @@ -637,6 +640,8 @@ 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