diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-15 21:16:02 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-15 21:16:02 +0000 |
commit | 81824ba1b4209ca741c6868aab15e6c610c8d67a (patch) | |
tree | ef808171f4ce32b304288ac70e0e475f74db73a6 /crawl-ref/source/spells4.cc | |
parent | 79282d0e5bbed27cc5df50413bfd2d9db0874fd3 (diff) | |
download | crawl-ref-81824ba1b4209ca741c6868aab15e6c610c8d67a.tar.gz crawl-ref-81824ba1b4209ca741c6868aab15e6c610c8d67a.zip |
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
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r-- | crawl-ref/source/spells4.cc | 7 |
1 files changed, 7 insertions, 0 deletions
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; |