From e37ab8471fcc8761a0d4a4954918ec4c679ed1bb Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 2 Jul 2008 14:39:19 +0000 Subject: 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 --- crawl-ref/source/spl-util.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/spl-util.cc') 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) { -- cgit v1.2.3-54-g00ecf