diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-31 22:56:26 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-31 22:56:26 +0000 |
commit | 6ce835d28c2081d13222a9faedc350ece4abb11b (patch) | |
tree | fd4e17d21f8fcecb94a9e672717516eb25edadce /crawl-ref/source/effects.cc | |
parent | 14fce897135078ec3542c0d96b751f58544bae99 (diff) | |
download | crawl-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/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 0913e3a9ba..5921bece0f 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1915,7 +1915,7 @@ void yell(bool force) } mpr("Gang up on whom?", MSGCH_PROMPT); - direction( targ, DIR_TARGET, TARG_ENEMY, false, false ); + direction( targ, DIR_TARGET, TARG_ENEMY, -1, false, false ); if (targ.isCancel) { @@ -2024,7 +2024,6 @@ bool vitrify_area(int radius) const int clear_plus = DNGN_CLEAR_ROCK_WALL - DNGN_ROCK_WALL; bool something_happened = false; for ( int x = X_BOUND_1; x <= X_BOUND_2; ++x ) - { for ( int y = Y_BOUND_1; y <= Y_BOUND_2; ++y ) { if ( distance(x,y,you.x_pos,you.y_pos) < radius2 ) @@ -2041,7 +2040,6 @@ bool vitrify_area(int radius) } } } - } return (something_happened); } |