summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-07 12:33:40 +0300
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-07 19:52:53 +1000
commit3232b4719ebfaccae12c628b01c6ca37ad38254e (patch)
treee95548b672dddc54a27c8fe3124809a82ef0b914 /crawl-ref/source/monster.cc
parent19c21942c0fd98b8034920f9bebd96bc8a8a5261 (diff)
downloadcrawl-ref-3232b4719ebfaccae12c628b01c6ca37ad38254e.tar.gz
crawl-ref-3232b4719ebfaccae12c628b01c6ca37ad38254e.zip
Replace mons_neutral with monsters::neutral.
Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 27c7180a4d..37a75de41a 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -2832,6 +2832,13 @@ bool monsters::friendly() const
return (attitude == ATT_FRIENDLY || has_ench(ENCH_CHARM));
}
+bool monsters::neutral() const
+{
+ return (attitude == ATT_NEUTRAL || has_ench(ENCH_NEUTRAL)
+ || attitude == ATT_GOOD_NEUTRAL
+ || attitude == ATT_STRICT_NEUTRAL);
+}
+
int monsters::shield_bonus() const
{
const item_def *shld = const_cast<monsters*>(this)->shield();
@@ -3168,7 +3175,7 @@ int monsters::res_holy_energy(const actor *attacker) const
if (is_good_god(god)
|| mons_is_holy(this)
- || mons_neutral(this)
+ || neutral()
|| is_unchivalric_attack(attacker, this)
|| is_good_god(you.religion) && is_follower(this))
{