summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mstuff2.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-01 09:26:40 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-01 09:26:40 +0000
commit3e4e26b227d45f1a3f33a3adf1ff25f3b02a79dc (patch)
treebf100acfc5d1644f40ca927e0eb5f4a3ff810e79 /crawl-ref/source/mstuff2.cc
parent94e3fadcc3e1c6931409d6a4b7e1cb714ec94076 (diff)
downloadcrawl-ref-3e4e26b227d45f1a3f33a3adf1ff25f3b02a79dc.tar.gz
crawl-ref-3e4e26b227d45f1a3f33a3adf1ff25f3b02a79dc.zip
Make initial sanctuary be circular in shape rather than square.
Remove non-harmless clouds when laying down sanctuary, and don't allow non-harmless clouds to speard into sanctuary or be placed on it. Don't let explosions spread into sanctuary (probably needs a flavour message). If a giant spore or ball lightning somehow explodes while in sanctuary then give a message about Zin containing it's explosion, and skip the call to explosion(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6284 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mstuff2.cc')
-rw-r--r--crawl-ref/source/mstuff2.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index 0870833493..4fa667f40d 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -1596,8 +1596,8 @@ void spore_goes_pop(monsters *monster)
beam.thrower = KILL_MON; // someone else's explosion
beam.aux_source.clear();
- const char* msg = NULL;
-
+ const char* msg = NULL;
+ const char* sanct_msg = NULL;
if (type == MONS_GIANT_SPORE)
{
beam.flavour = BEAM_SPORE;
@@ -1606,6 +1606,7 @@ void spore_goes_pop(monsters *monster)
beam.damage = dice_def( 3, 15 );
beam.ex_size = 2;
msg = "The giant spore explodes!";
+ sanct_msg = "By Zin's power, the giant spore's explosion is contained.";
}
else if (type == MONS_BALL_LIGHTNING)
{
@@ -1615,6 +1616,8 @@ void spore_goes_pop(monsters *monster)
beam.damage = dice_def( 3, 20 );
beam.ex_size = coinflip() ? 3 : 2;
msg = "The ball lightning explodes!";
+ sanct_msg = "By Zin's power, the ball lightning's explosion "
+ "is contained.";
}
else
{
@@ -1624,15 +1627,19 @@ void spore_goes_pop(monsters *monster)
return;
}
- bool nearby = mons_near(monster);
-
- if (nearby)
+ if (you.can_see(monster))
{
viewwindow(true, false);
- mpr(msg);
+ if (is_sanctuary(monster->x, monster->y))
+ mpr(sanct_msg, MSGCH_GOD);
+ else
+ mpr(msg);
}
- explosion(beam, false, false, true, true, nearby);
+ if (is_sanctuary(monster->x, monster->y))
+ return;
+
+ explosion(beam, false, false, true, true, mons_near(monster));
}
bolt mons_spells( int spell_cast, int power )