diff options
-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, |