diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-15 08:59:49 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-15 08:59:49 +0000 |
commit | 19081dd2e2f1b6bff7596cb66beee90417e640ae (patch) | |
tree | 8a6fd64c18df74df1be5143a95072b06bd04d59e /crawl-ref/source | |
parent | 3130143ebdde991a85b483a6561ed158a72fdf55 (diff) | |
download | crawl-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')
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/spl-cast.h | 7 | ||||
-rw-r--r-- | crawl-ref/source/spl-data.h | 2 |
3 files changed, 8 insertions, 4 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 : diff --git a/crawl-ref/source/spl-cast.h b/crawl-ref/source/spl-cast.h index c1fe93cc6e..036f99045f 100644 --- a/crawl-ref/source/spl-cast.h +++ b/crawl-ref/source/spl-cast.h @@ -25,9 +25,10 @@ enum spflag_type SPFLAG_DIR = 0x0008, // use DIR_DIR targeting SPFLAG_TARGETING_MASK = 0x000f, // used to test for targeting SPFLAG_HELPFUL = 0x0010, // TARG_FRIENDS used - SPFLAG_NOT_SELF = 0x0020, // aborts on isMe - SPFLAG_UNHOLY = 0x0040, // counts at "unholy" - SPFLAG_MAPPING = 0x0080 // a mapping spell of some kind + SPFLAG_NEUTRAL = 0x0020, // TARG_ANY used + SPFLAG_NOT_SELF = 0x0040, // aborts on isMe + SPFLAG_UNHOLY = 0x0080, // counts at "unholy" + SPFLAG_MAPPING = 0x0100 // a mapping spell of some kind }; enum spret_type diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h index c2405ca375..063d1a68fb 100644 --- a/crawl-ref/source/spl-data.h +++ b/crawl-ref/source/spl-data.h @@ -283,7 +283,7 @@ { SPELL_DIG, "Dig", SPTYP_TRANSMIGRATION | SPTYP_EARTH, - SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF, + SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF | SPFLAG_NEUTRAL, 4, 200, NULL, |