summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spl-util.cc')
-rw-r--r--crawl-ref/source/spl-util.cc31
1 files changed, 31 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index ac35b94fbe..4dcf356d95 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -240,6 +240,37 @@ bool spell_needs_foe(spell_type spell)
return (!_seekspell(spell)->ms_utility);
}
+bool spell_harms_target(spell_type spell)
+{
+ const unsigned int flags = _seekspell(spell)->flags;
+
+ if (flags & (SPFLAG_HELPFUL | SPFLAG_NEUTRAL))
+ return false;
+
+ if (flags & SPFLAG_TARGETING_MASK)
+ return true;
+
+ return false;
+}
+
+bool spell_harms_area(spell_type spell)
+{
+ const unsigned int flags = _seekspell(spell)->flags;
+
+ if (flags & (SPFLAG_HELPFUL | SPFLAG_NEUTRAL))
+ return false;
+
+ if (flags & SPFLAG_AREA)
+ return true;
+
+ return false;
+}
+
+bool spell_sanctuary_castable(spell_type spell)
+{
+ return false;
+}
+
// applied to spell misfires (more power = worse) and triggers
// for Xom acting (more power = more likely to grab his attention) {dlb}
int spell_mana(spell_type which_spell)