diff options
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r-- | crawl-ref/source/spells4.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index dc389c983f..0f25c9dee1 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -30,6 +30,7 @@ #include "dungeon.h" #include "effects.h" #include "it_use2.h" +#include "item_use.h" #include "itemname.h" #include "itemprop.h" #include "items.h" @@ -2707,6 +2708,28 @@ void cast_twist(int pow) return; } // end cast_twist() +bool cast_portaled_projectile(int pow, bolt& beam) +{ + if ( pow > 50 ) + pow = 50; + + if ( grid_is_solid(beam.target_x, beam.target_y) ) + { + mpr("You can't shoot at gazebos."); + return false; + } + + const int idx = get_fire_item_index(); + if ( idx == ENDOFPACK ) + { + mpr("No suitable missiles."); + return false; + } + + throw_it( beam, idx, true, random2(pow/4) ); + return true; +} + // // This version of far strike is a bit too creative for level one, in // order to make it work we needed to put a lot of restrictions on it |