summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/target.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-03-05 18:14:41 -0700
committerSteve Melenchuk <smelenchuk@gmail.com>2014-03-05 18:14:41 -0700
commit9259616cc7dcd8d058367b4d8ba84d8f49dcb898 (patch)
treeda47eda7ddef073f5f4b3a21995a3c26fbb0b41b /crawl-ref/source/target.cc
parentae9c01e6bc75c38ade990c6823c536cd201a53d0 (diff)
downloadcrawl-ref-9259616cc7dcd8d058367b4d8ba84d8f49dcb898.tar.gz
crawl-ref-9259616cc7dcd8d058367b4d8ba84d8f49dcb898.zip
A couple of adjustments to Shadow Step targeting.
Pass range2 instead of range to the jump targeter for more accurate ties to the umbra range, and don't allow non-umbraed targets to be targeted (this disallows haloed monsters from being stepped to, cf. #8016).
Diffstat (limited to 'crawl-ref/source/target.cc')
-rw-r--r--crawl-ref/source/target.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/crawl-ref/source/target.cc b/crawl-ref/source/target.cc
index 2411d9cdaa..c40e6b50ee 100644
--- a/crawl-ref/source/target.cc
+++ b/crawl-ref/source/target.cc
@@ -880,14 +880,13 @@ aff_type targetter_spray::is_affected(coord_def loc)
return affected;
}
-targetter_jump::targetter_jump(const actor* act, int range, bool cp,
+targetter_jump::targetter_jump(const actor* act, int r2, bool cp,
bool imm) :
- clear_path(cp), immobile(imm)
+ range2(r2), clear_path(cp), immobile(imm)
{
ASSERT(act);
agent = act;
origin = act->pos();
- range2 = dist_range(range);
jump_is_blocked = false;
}
@@ -1066,7 +1065,7 @@ void targetter_jump::get_additional_sites(coord_def a)
if (immobile)
{
const actor *victim = actor_at(a);
- if (!victim || victim->invisible())
+ if (!victim || victim->invisible() || !victim->umbraed())
{
no_landing_reason = BLOCKED_NO_TARGET;
return;