diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-02 14:39:19 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-02 14:39:19 +0000 |
commit | e37ab8471fcc8761a0d4a4954918ec4c679ed1bb (patch) | |
tree | 014e77a542007c8a29084bcaa4252a0e9c0fad3e /crawl-ref/source/spl-util.cc | |
parent | 6a8469f3af9fff8fd6670be7bab4b7652ef3f957 (diff) | |
download | crawl-ref-e37ab8471fcc8761a0d4a4954918ec4c679ed1bb.tar.gz crawl-ref-e37ab8471fcc8761a0d4a4954918ec4c679ed1bb.zip |
Only apply targeting via monster list to spells and such where
targeting monsters is actually needed.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6338 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, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc index 4dcf356d95..364ab2461a 100644 --- a/crawl-ref/source/spl-util.cc +++ b/crawl-ref/source/spl-util.cc @@ -551,7 +551,7 @@ int apply_random_around_square( int (*func) (int, int, int, int), return (rv); } // end apply_random_around_square() -// apply func to one square of player's choice beside the player +// Apply func to one square of player's choice beside the player. int apply_one_neighbouring_square(int (*func) (int, int, int, int), int power) { struct dist bmove; @@ -571,7 +571,7 @@ int apply_one_neighbouring_square(int (*func) (int, int, int, int), int power) canned_msg(MSG_NOTHING_HAPPENS); return (rv); -} // end apply_one_neighbouring_square() +} int apply_area_within_radius( int (*func) (int, int, int, int), int x, int y, int pow, int radius, int ctype ) @@ -792,12 +792,14 @@ void apply_area_cloud( int (*func) (int, int, int, int, cloud_type, // Return false if the user canceled, true otherwise. bool spell_direction( dist &spelld, bolt &pbolt, targeting_type restrict, targ_mode_type mode, - bool needs_path, const char *prompt ) + bool needs_path, bool may_target_monster, + const char *prompt ) { if (restrict != DIR_DIR) message_current_target(); - direction( spelld, restrict, mode, -1, false, needs_path, prompt ); + direction( spelld, restrict, mode, -1, false, needs_path, + may_target_monster, prompt ); if (!spelld.isValid) { |