From 2633544c49534e75bdc777f9262789c628a965c4 Mon Sep 17 00:00:00 2001 From: Vsevolod Kozlov Date: Mon, 9 Nov 2009 14:57:14 +0300 Subject: Replace mons_is_pacified with monsters::pacified. --- crawl-ref/source/monster.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/monster.cc') 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(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 = -- cgit v1.2.3-54-g00ecf