From fa2f65b7a853195fa69612e5cc4de6e5fc54ae85 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Mon, 9 Nov 2009 12:58:58 -0600 Subject: 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. --- crawl-ref/source/goditem.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/goditem.cc') 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) -- cgit v1.2.3-54-g00ecf