summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-15 08:59:49 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-15 08:59:49 +0000
commit19081dd2e2f1b6bff7596cb66beee90417e640ae (patch)
tree8a6fd64c18df74df1be5143a95072b06bd04d59e /crawl-ref/source/spl-cast.cc
parent3130143ebdde991a85b483a6561ed158a72fdf55 (diff)
downloadcrawl-ref-19081dd2e2f1b6bff7596cb66beee90417e640ae.tar.gz
crawl-ref-19081dd2e2f1b6bff7596cb66beee90417e640ae.zip
Added SPFLAG_NEUTRAL for utility spells which should use TARG_ANY.
Currently only used by Dig. We might want to redo Apportation to use this at some point. [1994284] git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5841 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index e392966dc1..49ea215d71 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -940,6 +940,9 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
targ_mode_type targ =
(testbits(flags, SPFLAG_HELPFUL) ? TARG_FRIEND : TARG_ENEMY);
+ if (testbits(flags, SPFLAG_NEUTRAL))
+ targ = TARG_ANY;
+
targeting_type dir =
(testbits( flags, SPFLAG_TARGET ) ? DIR_TARGET :
testbits( flags, SPFLAG_GRID ) ? DIR_TARGET :