From 8bb770637637850f522fdeb873e2d0b05eb0be24 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Mon, 9 Nov 2009 09:41:40 -0600 Subject: Add an is_holy() function to the actor interface. This is consistent with similar functions in that it checks not only for MH_HOLY holiness, but whether the monster is a priest of a good god (currently, there are none) and whether it uses holy spells (currently, there are none after the changes described below). Minor and Major Healing are now enchantments rather than holy spells. The beam code treats them as such; wands of healing aren't holy items the way e.g. wands of draining are evil items; and unholy monsters (among others, Lom Lobon!) can cast these spells. --- crawl-ref/source/monstuff.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index a36b349a03..5f82495a9d 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -652,8 +652,8 @@ static bool _ely_protect_ally(monsters *monster) if (you.religion != GOD_ELYVILON) return (false); - if (monster->holiness() != MH_NATURAL - && monster->holiness() != MH_HOLY + if (!monster->is_holy() + && monster->holiness() != MH_NATURAL || !monster->friendly() || !you.can_see(monster) // for simplicity || !one_chance_in(20)) @@ -1666,7 +1666,7 @@ int monster_die(monsters *monster, killer_type killer, } // Holy kills are always noticed. - if (targ_holy == MH_HOLY) + if (monster->is_holy()) { did_god_conduct(DID_KILL_HOLY, monster->hit_dice, true, monster); @@ -1873,7 +1873,7 @@ int monster_die(monsters *monster, killer_type killer, } // Holy kills are always noticed. - if (targ_holy == MH_HOLY) + if (monster->is_holy()) { if (killer_holy == MH_UNDEAD) { @@ -3942,7 +3942,7 @@ std::string summoned_poof_msg(const monsters* monster, bool plural) msg = "degenerate%s into a cloud of primal chaos"; } - if (monster->holiness() == MH_HOLY + if (monster->is_holy() && summon_type != SPELL_SHADOW_CREATURES && summon_type != MON_SUMM_CHAOS) { -- cgit v1.2.3-54-g00ecf