summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index f38f6fcd7a..2bb73f9683 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -2854,7 +2854,7 @@ bool monsters::is_evil() const
if (is_unholy())
return (true);
- // Assume that unknown gods are evil.
+ // Assume that all unknown gods (GOD_NAMELESS) are evil.
if (is_priest() && (is_evil_god(god) || god == GOD_NAMELESS))
return (true);
@@ -2879,6 +2879,10 @@ bool monsters::is_chaotic() const
if (mons_is_shapeshifter(this))
return (true);
+ // Assume that all unknown gods (GOD_NAMELESS) are not chaotic.
+ if (is_priest() && is_chaotic_god(god))
+ return (true);
+
if (has_spell(SPELL_POLYMORPH_OTHER)
|| has_spell(SPELL_SUMMON_UGLY_THING)
|| has_spell(SPELL_PORKALATOR))