From fca02d5a9d188648a0f97dc5b717c21a8adfb092 Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Fri, 16 Oct 2009 04:01:53 -0700 Subject: Protect features from damage with marker props A marker can protect the feature it's on from damage by: * Setting property "veto_fragmentation" to "veto" to protect it from fragmentation (Lee's Rapid Deconstruction spell). * Setting property "veto_shattering" to "veto" to protect it from shattering (Shattering spell). * Setting property "veto_disintegration" to "veto" to protect it from disintegration and nuking. TODO: Document this. I'm not sure where to put info on this in docs/develop/level_design.txt --- crawl-ref/source/beam.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index e87cfbd906..50a9a87ff4 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -1763,6 +1763,12 @@ void bolt::fire_wall_effect() void bolt::nuke_wall_effect() { + if (env.markers.property_at(pos(), MAT_ANY, "veto_disintegrate") == "veto") + { + finish_beam(); + return; + } + const dungeon_feature_type feat = grd(pos()); if (feat == DNGN_ROCK_WALL -- cgit v1.2.3-54-g00ecf