From 81824ba1b4209ca741c6868aab15e6c610c8d67a Mon Sep 17 00:00:00 2001 From: haranp Date: Mon, 15 Dec 2008 21:16:02 +0000 Subject: Fix for Lee's Rapid Deconstruction: it will no longer work if the path to the target is blocked by wall. It can still bypass creatures. So it's now somewhere between Smite and Fireball. Done this way because it's the easiest fix; this spell will need some refactoring. (As does all the beam code, sigh.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7837 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells4.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crawl-ref/source/spells4.cc') diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 95404a97bf..3ffe619afe 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -1674,6 +1674,13 @@ bool cast_fragmentation(int pow, const dist& spd) bool hole = true; const char *what = NULL; + ray_def ray; + if ( !find_ray(you.pos(), spd.target, false, ray) ) + { + mpr("There's a wall in the way!"); + return false; + } + //FIXME: If (player typed '>' to attack floor) goto do_terrain; beam.beam_source = MHITYOU; beam.thrower = KILL_YOU; -- cgit v1.2.3-54-g00ecf