diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-05-27 04:38:33 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-05-27 04:38:33 +0000 |
commit | da81aa1f63c426cd5d5fc04aa639aacaff0e5262 (patch) | |
tree | 83e841ec441bb519c17055e0d43b919119262272 /crawl-ref/source/directn.cc | |
parent | db2529a4be61dbeafbf4e87e9a6dfe58c682244b (diff) | |
download | crawl-ref-da81aa1f63c426cd5d5fc04aa639aacaff0e5262.tar.gz crawl-ref-da81aa1f63c426cd5d5fc04aa639aacaff0e5262.zip |
Bug 2792673: when attempting auto-targeting, if the only monsters in LOS have
the line-of-firing to them blocked by a wall then auto-targetting won't happen
and the cursor/cross-hair will remain on the player. Give a message in such
circumstances so the player will know why the monster wasn't auto-targetted.
(Might also want to give the same message when doing "target cycle forward" in
examination mode)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9837 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index e68d8e3f9e..9cccc435a1 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -1434,7 +1434,21 @@ void direction(dist& moves, targeting_type restricts, { moves.target = monsfind_pos; } - else if (!skip_iter) + else if (skip_iter) + { + if (needs_path && !just_looking + && _find_square_wrapper(moves.target, monsfind_pos, dir, + _find_monster, false, mode, + range, Options.target_wrap)) + { + mpr("All monsters which could be auto-targeted " + "are covered by a wall or statue which interrupts " + "your line of fire, even though it doesn't " + "interrupt your line of sight.", + MSGCH_PROMPT); + } + } + else flush_input_buffer(FLUSH_ON_FAILURE); break; |