From af420e351770b201f4d77d1892169b4111727c91 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Tue, 10 Nov 2009 21:26:29 -0600 Subject: Replace actor::is_unholy() with actor::undead_or_demonic(). --- crawl-ref/source/monster.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/monster.cc') diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index e102e81615..14020cb7f3 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -632,8 +632,8 @@ bool monsters::could_wield(const item_def &item, bool ignore_brand, if (brand == SPWPN_ORC_SLAYING && is_orckind(this)) return (false); - // Demonic/undead monsters won't use holy weapons. - if (is_unholy() && is_holy_item(item)) + // Undead and demonic monsters won't use holy weapons. + if (undead_or_demonic() && is_holy_item(item)) return (false); // Holy monsters and monsters that are gifts of good gods won't @@ -3190,7 +3190,7 @@ int monsters::res_asphyx() const { int res = get_mons_resists(this).asphyx; const mon_holy_type holi = holiness(); - if (is_unholy() + if (undead_or_demonic() || holi == MH_NONLIVING || holi == MH_PLANT) { @@ -3258,12 +3258,12 @@ int monsters::res_rotting() const int monsters::res_holy_energy(const actor *attacker) const { + if (undead_or_demonic()) + return (-2); + if (is_evil()) return (-1); - if (is_unholy()) - return (-2); - if (is_holy() || is_good_god(god) || neutral() -- cgit v1.2.3-54-g00ecf