summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/target.cc
diff options
context:
space:
mode:
authorgammafunk <gammafunk@gmail.com>2013-10-03 19:24:45 -0500
committerNeil Moore <neil@s-z.org>2013-10-03 21:37:46 -0400
commitd861f57d61d01a8ce1c6ab414dd2e04d7eb57f60 (patch)
tree0101dafd2091950eeb263ed34996535307336493 /crawl-ref/source/target.cc
parent1b3843c879264687e13d45daa04f153f8f4e7ecf (diff)
downloadcrawl-ref-d861f57d61d01a8ce1c6ab414dd2e04d7eb57f60.tar.gz
crawl-ref-d861f57d61d01a8ce1c6ab414dd2e04d7eb57f60.zip
Make the jump landing sites not have a range restriction.
Previously the landing sites had a movement range of one less than the attack range, which mean fewer possible landing sites at further attack distances. This meant it was less favourable to jump attack closer enemies in the sense that there were more possible landing sites, and the furthest diagonal attacks were most favourable since they had one landing site. Now the number of landing sites isn't a function of attack distance, so closer jumps aren't penalized.
Diffstat (limited to 'crawl-ref/source/target.cc')
-rw-r--r--crawl-ref/source/target.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/crawl-ref/source/target.cc b/crawl-ref/source/target.cc
index d4bc3ce5e5..a5e788b329 100644
--- a/crawl-ref/source/target.cc
+++ b/crawl-ref/source/target.cc
@@ -888,7 +888,6 @@ targetter_jump::targetter_jump(const actor* act, int range)
agent = act;
origin = act->pos();
range2 = dist_range(range);
- landing_range2 = dist_range(range - 1);
jump_is_blocked = false;
}
@@ -938,10 +937,8 @@ bool targetter_jump::valid_landing(coord_def a, bool check_invis)
actor *act;
ray_def ray;
- if ((origin - a).abs() > landing_range2)
- return false;
if (grd(a) == DNGN_OPEN_SEA || grd(a) == DNGN_LAVA_SEA
- || !agent->is_habitable(a) || (origin - a).abs() > range2 - 1)
+ || !agent->is_habitable(a))
{
blocked_landing_reason = BLOCKED_MOVE;
return false;