summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-abil.cc
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-25 20:31:41 +0300
committerVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-26 14:13:26 +0300
commitef78118cbd7e21e5d33bfcab515ada5f6dd0d538 (patch)
tree8ae2c10ac7d359cbbcd02467ebe1be360deacc12 /crawl-ref/source/mon-abil.cc
parent35a7de76e0124f89924a9af524ffe8e5595e13f3 (diff)
downloadcrawl-ref-ef78118cbd7e21e5d33bfcab515ada5f6dd0d538.tar.gz
crawl-ref-ef78118cbd7e21e5d33bfcab515ada5f6dd0d538.zip
Use actor::can_see in ball lightning's special ability.
Diffstat (limited to 'crawl-ref/source/mon-abil.cc')
-rw-r--r--crawl-ref/source/mon-abil.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index 01127e3b18..23c873e10f 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -840,15 +840,7 @@ bool mon_special_ability(monsters *monster, bolt & beem)
if (mons_atts_aligned(monster->attitude, targ->attitude))
continue;
- // Faking LOS by checking the neighbouring square.
- coord_def diff = targ->pos() - monster->pos();
- coord_def sg(sgn(diff.x), sgn(diff.y));
- coord_def t = monster->pos() + sg;
-
- if (!in_bounds(t))
- continue;
-
- if (!feat_is_solid(grd(t)))
+ if (monster->can_see(*targ) && !feat_is_solid(grd(targ->pos())))
{
monster->hit_points = -1;
used = true;