diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-02 04:49:15 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-02 04:49:15 +0000 |
commit | a384aae0f4236968ef5f2e753c6d5ec33f6dc246 (patch) | |
tree | fe75bd6c93a458145d06fe437ce4389294043325 /crawl-ref/source/beam.cc | |
parent | efa16086d78dc42f1f6d48e2a5a2d26adcedb04d (diff) | |
download | crawl-ref-a384aae0f4236968ef5f2e753c6d5ec33f6dc246.tar.gz crawl-ref-a384aae0f4236968ef5f2e753c6d5ec33f6dc246.zip |
If an explosion has its center in Sanctuary then give a message about
Zin containing the explosion. Mainly for miscast effects which cause
explosions, but also catches the player casting spells which cause
explosions.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6323 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index efb3e63419..d8c7fafd58 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -5333,6 +5333,15 @@ int explosion( bolt &beam, bool hole_in_the_middle, // beam is now an explosion; set in_explosion_phase beam.in_explosion_phase = true; + if (is_sanctuary(beam.target_x, beam.target_y)) + { + if (!beam.is_tracer && see_grid(beam.target()) && !beam.name.empty() ) + mprf(MSGCH_GOD, "By Zin's power, the %s is contained.", + beam.name.c_str()); + + return (-1); + } + #if DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, "explosion at (%d, %d) : t=%d c=%d f=%d hit=%d dam=%dd%d", |