From 6fb64ab3ac64b81a0891bdbbdd5c0b5d2d9b933c Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Fri, 9 Oct 2009 14:46:00 +0200 Subject: Trees -- a new wall type, can be seen through (2nd square blocks LOS). Available as 't' for vault builders. Can be ignited using wands of fire, but the fire can't be controlled. --- crawl-ref/source/beam.cc | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 39bd4313ec..3fb98b446c 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -1709,8 +1709,9 @@ void bolt::digging_wall_effect() void bolt::fire_wall_effect() { - // Fire only affects wax walls. - if (grd(pos()) != DNGN_WAX_WALL) + dungeon_feature_type feat; + // Fire only affects wax walls and trees. + if ((feat=grd(pos())) != DNGN_WAX_WALL && (feat != DNGN_TREES)) { finish_beam(); return; @@ -1719,7 +1720,7 @@ void bolt::fire_wall_effect() if (!is_superhot()) { // No actual effect. - if (flavour != BEAM_HELLFIRE) + if (flavour != BEAM_HELLFIRE && feat == DNGN_WAX_WALL) { if (see_grid(pos())) { @@ -1734,12 +1735,27 @@ void bolt::fire_wall_effect() { // Destroy the wall. grd(pos()) = DNGN_FLOOR; - if (see_grid(pos())) - emit_message(MSGCH_PLAIN, "The wax bubbles and burns!"); - else if (player_can_smell()) - emit_message(MSGCH_PLAIN, "You smell burning wax."); + if (feat == DNGN_WAX_WALL) + { + if (see_grid(pos())) + emit_message(MSGCH_PLAIN, "The wax bubbles and burns!"); + else if (player_can_smell()) + emit_message(MSGCH_PLAIN, "You smell burning wax."); + place_cloud(CLOUD_FIRE, pos(), random2(10)+15, whose_kill(), killer()); + } + else + { + if (see_grid(pos())) + emit_message(MSGCH_PLAIN, "The tree burns like a torch!"); + else if (player_can_smell()) + emit_message(MSGCH_PLAIN, "You smell burning wood."); + if (whose_kill() == KC_YOU) + did_god_conduct(DID_KILL_PLANT, 1, effect_known, 0); + else if (whose_kill() == KC_FRIENDLY) + did_god_conduct(DID_ALLY_KILLED_PLANT, 1, effect_known, 0); + place_cloud(CLOUD_FOREST_FIRE, pos(), random2(30)+25, whose_kill(), killer(), 5); + } - place_cloud(CLOUD_FIRE, pos(), random2(10)+15, whose_kill(), killer()); obvious_effect = true; } @@ -3102,7 +3118,7 @@ bool bolt::affects_wall(dungeon_feature_type wall) const if (flavour == BEAM_DISINTEGRATION && damage.num >= 3) return (true); - if (is_fiery() && wall == DNGN_WAX_WALL) + if (is_fiery() && (wall == DNGN_WAX_WALL || wall == DNGN_TREES)) return (true); // eye of devastation? -- cgit v1.2.3-54-g00ecf