summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/direct.h
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-31 22:56:26 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-31 22:56:26 +0000
commit6ce835d28c2081d13222a9faedc350ece4abb11b (patch)
treefd4e17d21f8fcecb94a9e672717516eb25edadce /crawl-ref/source/direct.h
parent14fce897135078ec3542c0d96b751f58544bae99 (diff)
downloadcrawl-ref-6ce835d28c2081d13222a9faedc350ece4abb11b.tar.gz
crawl-ref-6ce835d28c2081d13222a9faedc350ece4abb11b.zip
Fix 1869850: Targeting now respects mimics' (un)known status correctly,
so that * and / work for unknown ones, and + and - for known ones. Also, mimics become known if you hit them since the resulting message ("moderately damaged" or "looks slightly unstable") will give that away anyway. Implement the first part of FR 1903048: Added a range parameter to direction(), so that when targeting for weapons of reaching we can check whether a monster is within the range of 2 squares (grid_distance). Does not handle submerged monsters. Eventually, this could be used to also limit max range for certain spells (Freeze, I'm looking at you!) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3995 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/direct.h')
-rw-r--r--crawl-ref/source/direct.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/direct.h b/crawl-ref/source/direct.h
index a7b8382691..702d2ffd97 100644
--- a/crawl-ref/source/direct.h
+++ b/crawl-ref/source/direct.h
@@ -147,9 +147,9 @@ struct dist
};
void direction( dist &moves, targeting_type restricts = DIR_NONE,
- targ_mode_type mode = TARG_ANY, bool just_looking = false,
- bool needs_path = true, const char *prompt = NULL,
- targeting_behaviour *mod = NULL );
+ targ_mode_type mode = TARG_ANY, int range = -1,
+ bool just_looking = false, bool needs_path = true,
+ const char *prompt = NULL, targeting_behaviour *mod = NULL );
bool in_los_bounds(int x, int y);
bool in_viewport_bounds(int x, int y);