diff options
author | Adam Borowski <kilobyte@angband.pl> | 2009-10-09 14:46:00 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-10-09 14:46:00 +0200 |
commit | 6fb64ab3ac64b81a0891bdbbdd5c0b5d2d9b933c (patch) | |
tree | 890a713803c73b7412c3dc3192f40998a827ec0f /crawl-ref/source/beam.cc | |
parent | 477b8798b39a01bf4a73697eefe0ae131a12d47d (diff) | |
download | crawl-ref-6fb64ab3ac64b81a0891bdbbdd5c0b5d2d9b933c.tar.gz crawl-ref-6fb64ab3ac64b81a0891bdbbdd5c0b5d2d9b933c.zip |
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.
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 34 |
1 files changed, 25 insertions, 9 deletions
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? |