diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-16 04:01:53 -0700 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-16 04:01:53 -0700 |
commit | fca02d5a9d188648a0f97dc5b717c21a8adfb092 (patch) | |
tree | 95e3111b5ac1db5c89168b78227a9c8504f35d6a /crawl-ref/source/beam.cc | |
parent | bf5490b041d4dd0089ffea4a60ef4e754e852a7d (diff) | |
download | crawl-ref-fca02d5a9d188648a0f97dc5b717c21a8adfb092.tar.gz crawl-ref-fca02d5a9d188648a0f97dc5b717c21a8adfb092.zip |
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
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 6 |
1 files changed, 6 insertions, 0 deletions
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 |