diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-23 18:07:07 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-23 18:07:07 +0000 |
commit | 216ea74607c26d1706b43aa8fccb11e553a962e8 (patch) | |
tree | 075936bf53296061a9f5a9bf3e9abd6b69aad461 /crawl-ref/source/spells1.cc | |
parent | c4f8ee4f6aecbef73857e7fc9e3af5112c07412d (diff) | |
download | crawl-ref-216ea74607c26d1706b43aa8fccb11e553a962e8.tar.gz crawl-ref-216ea74607c26d1706b43aa8fccb11e553a962e8.zip |
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
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r-- | crawl-ref/source/spells1.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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); |