summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-14 17:26:12 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-14 17:26:12 +0000
commit8d7eb4b10e150e9345c693289bacc567dc56b9be (patch)
tree83911e2cd0c850a3e530b2f0f110a3dc09760a09 /crawl-ref
parentabc4280d24bf18defcc91535ea1d80fe113c7c79 (diff)
downloadcrawl-ref-8d7eb4b10e150e9345c693289bacc567dc56b9be.tar.gz
crawl-ref-8d7eb4b10e150e9345c693289bacc567dc56b9be.zip
Let bolts of fire and ice, as well as explosions, destroy vulnerable
items. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5035 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/beam.cc20
1 files changed, 7 insertions, 13 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index c3affeb687..49e2c7946e 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2607,9 +2607,12 @@ int affect(bolt &beam, int x, int y, item_def *item)
// grd[x][y] will NOT be a wall for the remainder of this function.
- // if not a tracer, place clouds
+ // if not a tracer, place clouds and affect items
if (!beam.is_tracer)
+ {
rangeUsed += _affect_place_clouds(beam, x, y);
+ _affect_items(beam, x, y);
+ }
// if player is at this location, try to affect unless term_on_target
if (_found_player(beam, x, y))
@@ -4778,10 +4781,9 @@ void explosion( bolt &beam, bool hole_in_the_middle,
_explosion_map(beam, 0, 0, 0, 0, r);
// Go through affected cells, drawing effect and
- // calling affect() and _affect_items() for each.
- // now, we get a bit fancy, drawing all radius 0
- // effects, then radius 1, radius 2, etc. It looks
- // a bit better that way.
+ // calling affect() for each. Now, we get a bit
+ // fancy, drawing all radius 0 effects, then radius 1,
+ // radius 2, etc. It looks a bit better that way.
// turn buffering off
#ifdef WIN32CONSOLE
@@ -4883,14 +4885,6 @@ static void _explosion_cell(bolt &beam, int x, int y, bool drawOnly)
if (beam.is_tracer)
return;
- // now affect items
- if (!drawOnly)
- {
- _affect_items(beam, realx, realy);
- if (_affects_wall(beam, grd[realx][realy]))
- _affect_wall(beam, realx, realy);
- }
-
if (drawOnly)
{
int drawx = grid2viewX(realx);