diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-14 18:56:47 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-14 18:56:47 +0000 |
commit | b871ff5c1c4ae1e0fd4e27a84ca7dbcdc2eec539 (patch) | |
tree | 97bccbbd3bee3a135205df6a507cfcf4bd6c3d59 /crawl-ref/source/spl-util.cc | |
parent | 0282f209e8d708396f20c99e8b212cfa488aca37 (diff) | |
download | crawl-ref-b871ff5c1c4ae1e0fd4e27a84ca7dbcdc2eec539.tar.gz crawl-ref-b871ff5c1c4ae1e0fd4e27a84ca7dbcdc2eec539.zip |
Move spell targeting before miscast check. Not everything is moved - spells
with weird targeting (like Conjure Flame) still target after the miscast check.
Tweaked targeting prompt slightly.
Don't dock turn for zapping non-wand.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1039 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-util.cc')
-rw-r--r-- | crawl-ref/source/spl-util.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc index 2892b6b67e..b490d19294 100644 --- a/crawl-ref/source/spl-util.cc +++ b/crawl-ref/source/spl-util.cc @@ -211,6 +211,11 @@ unsigned int get_spell_flags( int which_spell ) return (seekspell(which_spell)->flags); } +const char *get_spell_target_prompt( int which_spell ) +{ + return (seekspell(which_spell)->target_prompt); +} + bool spell_typematch(int which_spell, unsigned int which_discipline) { return (seekspell(which_spell)->disciplines & which_discipline); @@ -675,11 +680,12 @@ void apply_area_cloud( int (*func) (int, int, int, int), int x, int y, } // end apply_area_cloud() char spell_direction( struct dist &spelld, struct bolt &pbolt, - targeting_type restrict, int mode ) + targeting_type restrict, int mode, + const char *prompt ) { message_current_target(); - direction( spelld, restrict, mode ); + direction( spelld, restrict, mode, false, prompt ); if (!spelld.isValid) { |