diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-05 15:42:58 -0600 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-05 15:42:58 -0600 |
commit | 09b6736c53d8320cb57f16cc0130fc230a8dd37e (patch) | |
tree | f77c9ee78eef07ec9c085ad7fe5b39066771afd3 /crawl-ref | |
parent | 361c86ab3c3017c9136cde225058f25e9f96a822 (diff) | |
download | crawl-ref-09b6736c53d8320cb57f16cc0130fc230a8dd37e.tar.gz crawl-ref-09b6736c53d8320cb57f16cc0130fc230a8dd37e.zip |
In is_chaotic(), mark player followers/monster priests of chaotic gods.
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/monster.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 3 |
2 files changed, 8 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)) diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index e09b774ea6..c1615cd205 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -6398,6 +6398,9 @@ bool player::is_unholy() const bool player::is_chaotic() const { + if (is_chaotic_god(religion)) + return (true); + return (false); } |