summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 50e3fd5c6a..735bb18e1a 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -30,6 +30,7 @@ REVISION("$Rev$");
#include "cio.h"
#include "cloud.h"
#include "delay.h"
+#include "dgnevent.h"
#include "effects.h"
#include "enum.h"
#include "fight.h"
@@ -1850,6 +1851,17 @@ void bolt::hit_wall()
// Well, we warned them.
}
+ // Press trigger/switch/button in wall if hit by something solid
+ // or solid-ish.
+ if (!is_explosion && !is_tracer && !monster_at(pos())
+ && (flavour == BEAM_MISSILE || flavour == BEAM_MMISSILE))
+ {
+ dgn_event event(DET_WALL_HIT, pos());;
+ event.arg1 = beam_source;
+
+ dungeon_events.fire_vetoable_position_event(event, target);
+ }
+
if (affects_wall(feat))
affect_wall();
else if (is_bouncy(feat) && !in_explosion_phase)