From a384aae0f4236968ef5f2e753c6d5ec33f6dc246 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Wed, 2 Jul 2008 04:49:15 +0000 Subject: 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 --- crawl-ref/source/beam.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crawl-ref/source/beam.cc') 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", -- cgit v1.2.3-54-g00ecf