summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/target.cc
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2012-12-18 23:58:10 +0100
committerRaphael Langella <raphael.langella@gmail.com>2012-12-18 23:58:10 +0100
commit0f7d767c631817d4627620a1b74adb202c598aa6 (patch)
treee6e2be1d3a10a10c2de4cd307814aa2fabd03169 /crawl-ref/source/target.cc
parent57b6bdd542a99ed83662517f4bca99fef026d86c (diff)
downloadcrawl-ref-0f7d767c631817d4627620a1b74adb202c598aa6.tar.gz
crawl-ref-0f7d767c631817d4627620a1b74adb202c598aa6.zip
Improve LRD default targetting (#6315).
It will target a wall to try to blast the nearest monster. Convenient, but still crude (doesn't try to avoid the player, no cycling).
Diffstat (limited to 'crawl-ref/source/target.cc')
-rw-r--r--crawl-ref/source/target.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/target.cc b/crawl-ref/source/target.cc
index 08c567bb2e..5c06f467dc 100644
--- a/crawl-ref/source/target.cc
+++ b/crawl-ref/source/target.cc
@@ -38,6 +38,11 @@ bool targetter::can_affect_outside_range()
return false;
}
+bool targetter::can_affect_walls()
+{
+ return false;
+}
+
bool targetter::anyone_there(coord_def loc)
{
if (!map_bounds(loc))
@@ -430,6 +435,11 @@ bool targetter_fragment::set_aim(coord_def a)
return true;
}
+bool targetter_fragment::can_affect_walls()
+{
+ return true;
+}
+
targetter_reach::targetter_reach(const actor* act, reach_type ran) :
range(ran)
{