summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-11-23 12:42:32 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-11-23 12:42:32 +0000
commit3ae1ce7f4d3473abc5b4b4f6953509c29fcea87d (patch)
tree6179bfebb3597a11e210e1daf9488b64135a7189 /crawl-ref/source/beam.cc
parentcd68f3adfe9c445eeb6889bba90c0023b45d67c2 (diff)
downloadcrawl-ref-3ae1ce7f4d3473abc5b4b4f6953509c29fcea87d.tar.gz
crawl-ref-3ae1ce7f4d3473abc5b4b4f6953509c29fcea87d.zip
[1601588] Bolts of fire melt wax. Note that fireballs are considered insufficiently hot for our purposes, as are the lesser fire spells. We may want to consider hellfire at some point.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@481 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc33
1 files changed, 29 insertions, 4 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index d431817532..af3977afa0 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -70,7 +70,7 @@ static FixedArray < bool, 19, 19 > explode_map;
// helper functions (some of these, esp. affect(), should probably
// be public):
static void sticky_flame_monster( int mn, bool source, int hurt_final );
-static bool affectsWalls(struct bolt &beam);
+static bool affectsWall(const bolt &beam, int wall_feature);
static bool isBouncy(struct bolt &beam, unsigned char gridtype);
static void beam_drop_object( struct bolt &beam, item_def *item, int x, int y );
static bool beam_term_on_target(struct bolt &beam, int x, int y);
@@ -1276,7 +1276,7 @@ void fire_beam( struct bolt &pbolt, item_def *item )
if (grid_is_solid(grd[tx][ty]))
{
// first, check to see if this beam affects walls.
- if (affectsWalls(pbolt))
+ if (affectsWall(pbolt, grd[tx][ty]))
{
// should we ever get a tracer with a wall-affecting
// beam (possible I suppose), we'll quit tracing now.
@@ -2436,7 +2436,7 @@ int affect(struct bolt &beam, int x, int y)
if (beam.is_tracer) // tracers always stop on walls.
return (BEAM_STOP);
- if (affectsWalls(beam))
+ if (affectsWall(beam, grd[x][y]))
{
rangeUsed += affect_wall(beam, x, y);
}
@@ -2487,7 +2487,7 @@ int affect(struct bolt &beam, int x, int y)
return (rangeUsed);
}
-static bool affectsWalls(struct bolt &beam)
+static bool affectsWall(const bolt &beam, int wall)
{
// don't know of any explosion that affects walls. But change it here
// if there is.
@@ -2503,6 +2503,11 @@ static bool affectsWalls(struct bolt &beam)
if (beam.flavour == BEAM_DISINTEGRATION && beam.damage.num >= 3)
return (true);
+ if (beam.flavour == BEAM_FIRE
+ && wall == DNGN_WAX_WALL
+ && beam.name == "bolt of fire")
+ return (true);
+
// eye of devastation?
if (beam.flavour == BEAM_NUKE)
return (true);
@@ -2546,6 +2551,26 @@ static int affect_wall(struct bolt &beam, int x, int y)
return (rangeUsed);
}
// END DIGGING EFFECT
+
+ // FIRE effect
+ if (beam.flavour == BEAM_FIRE && beam.name == "bolt of fire")
+ {
+ const int wgrd = grd[x][y];
+ if (wgrd != DNGN_WAX_WALL)
+ return (0);
+
+ grd[x][y] = DNGN_FLOOR;
+ if (see_grid(x, y))
+ mprf("The wax bubbles and burns!");
+ else if (player_can_smell())
+ mprf("You smell burning wax.");
+
+ place_cloud(
+ YOU_KILL(beam.thrower)? CLOUD_FIRE : CLOUD_FIRE_MON,
+ x, y, random2(10) + 15 );
+
+ return (BEAM_STOP);
+ }
// NUKE / DISRUPT
if (beam.flavour == BEAM_DISINTEGRATION || beam.flavour == BEAM_NUKE)