summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/goditem.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-09 12:58:58 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-09 12:58:58 -0600
commitfa2f65b7a853195fa69612e5cc4de6e5fc54ae85 (patch)
treece36ef7aad84d941ad0ef0dc95332324564a287b /crawl-ref/source/goditem.cc
parent5204dd771008a235eeec188fd6e6613b0c6a63ed (diff)
downloadcrawl-ref-fa2f65b7a853195fa69612e5cc4de6e5fc54ae85.tar.gz
crawl-ref-fa2f65b7a853195fa69612e5cc4de6e5fc54ae85.zip
Add spell flag SPFLAG_CHAOTIC, and mark all chaotic spells with it.
The list of chaotic spells is now generalized instead of being hardcoded in is_chaotic_spell(). This is modeled somewhat after SPFLAG_UNHOLY.
Diffstat (limited to 'crawl-ref/source/goditem.cc')
-rw-r--r--crawl-ref/source/goditem.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/crawl-ref/source/goditem.cc b/crawl-ref/source/goditem.cc
index f51d67d2eb..d8e547339f 100644
--- a/crawl-ref/source/goditem.cc
+++ b/crawl-ref/source/goditem.cc
@@ -252,7 +252,7 @@ bool is_evil_spell(spell_type spell, god_type god)
{
UNUSED(god);
- unsigned int flags = get_spell_flags(spell);
+ unsigned int flags = get_spell_flags(spell);
unsigned int disciplines = get_spell_disciplines(spell);
return ((flags & SPFLAG_UNHOLY) || (is_evil_discipline(disciplines)));
@@ -262,13 +262,9 @@ bool is_chaotic_spell(spell_type spell, god_type god)
{
UNUSED(god);
- return (spell == SPELL_POLYMORPH_OTHER
- || spell == SPELL_CORPSE_ROT
- || spell == SPELL_ALTER_SELF
- || spell == SPELL_SUMMON_UGLY_THING
- || spell == SPELL_MIASMA
- || spell == SPELL_SUMMON_DRAKES
- || spell == SPELL_PORKALATOR);
+ unsigned int flags = get_spell_flags(spell);
+
+ return (flags & SPFLAG_CHAOTIC);
}
bool is_hasty_spell(spell_type spell, god_type god)