summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-09 14:57:14 +0300
committerVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-09 14:58:20 +0300
commit2633544c49534e75bdc777f9262789c628a965c4 (patch)
tree1c1e500940dd52d287c59eafbfa6ab2409d271e0 /crawl-ref/source/monster.cc
parent9338556ebf846bbc4176134e3846ef6699e8434b (diff)
downloadcrawl-ref-2633544c49534e75bdc777f9262789c628a965c4.tar.gz
crawl-ref-2633544c49534e75bdc777f9262789c628a965c4.zip
Replace mons_is_pacified with monsters::pacified.
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index b237a8ace3..6610a457a8 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -2871,6 +2871,11 @@ bool monsters::wont_attack() const
return (friendly() || good_neutral() || strict_neutral());
}
+bool monsters::pacified() const
+{
+ return (attitude == ATT_NEUTRAL && testbits(flags, MF_GOT_HALF_XP));
+}
+
int monsters::shield_bonus() const
{
const item_def *shld = const_cast<monsters*>(this)->shield();
@@ -3972,7 +3977,7 @@ void monsters::add_enchantment_effect(const mon_enchant &ench, bool quiet)
}
// Pacified monsters leave the level when they submerge.
- if (mons_is_pacified(this))
+ if (pacified())
make_mons_leave_level(this);
break;
@@ -5480,7 +5485,7 @@ bool monsters::do_shaft()
// If a pacified monster is leaving the level via a shaft trap, and
// has reached its goal, handle it here.
- if (!mons_is_pacified(this))
+ if (!pacified())
set_transit(lev);
const bool reveal =