From abc1c21beac74651d1a328c6846dc37aec0c016e Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Fri, 6 Nov 2009 00:55:02 -0600 Subject: Move up the natural holiness/hellfire resistance check in is_evil(). --- crawl-ref/source/monster.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index f7abb19d6b..a29c36b3be 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -2879,6 +2879,15 @@ bool monsters::is_evil() const if (is_unholy()) return (true); + // Assume that no natural creatures resist hellfire, except by evil + // means. + if (holiness() == MH_NATURAL) + { + const mon_resist_def res = get_mons_resists(this); + if (res.hellfire > 0) + return (true); + } + // Assume that all unknown gods (GOD_NAMELESS) are evil. if (is_priest() && (is_evil_god(god) || god == GOD_NAMELESS)) return (true); @@ -2892,15 +2901,6 @@ bool monsters::is_evil() const return (true); } - // Assume that no natural creatures resist hellfire, except by evil - // means. - if (holiness() == MH_NATURAL) - { - const mon_resist_def res = get_mons_resists(this); - if (res.hellfire) - return (true); - } - return (false); } -- cgit v1.2.3-54-g00ecf