summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-25 08:12:27 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-25 08:12:27 +0000
commitd93f8e90d6931211da026014dd7a20b5f203b1d1 (patch)
treee691d16b3c49ea9e4efebf5c2aea47889aa2ca19 /crawl-ref/source
parentdb86b7751c82969f85be99ea9becc6717357875f (diff)
downloadcrawl-ref-d93f8e90d6931211da026014dd7a20b5f203b1d1.tar.gz
crawl-ref-d93f8e90d6931211da026014dd7a20b5f203b1d1.zip
[1832114] Fixed more prompts for mostly offscreen ball lightning detonation.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3328 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/beam.cc4
-rw-r--r--crawl-ref/source/beam.h5
-rw-r--r--crawl-ref/source/monstuff.cc6
-rw-r--r--crawl-ref/source/mstuff2.cc10
-rw-r--r--crawl-ref/source/spells1.cc2
5 files changed, 15 insertions, 12 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 726ff17f4d..57eff0c0c3 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -4568,7 +4568,7 @@ static void explosion1(bolt &pbolt)
void explosion( bolt &beam, bool hole_in_the_middle,
bool explode_in_wall, bool stop_at_statues,
- bool stop_at_walls)
+ bool stop_at_walls, bool show_more)
{
if (in_bounds(beam.source_x, beam.source_y)
&& !(beam.source_x == beam.target_x
@@ -4754,7 +4754,7 @@ void explosion( bolt &beam, bool hole_in_the_middle,
// duplicate old behaviour - pause after entire explosion
// has been drawn.
- if (!beam.is_tracer && seen_anything)
+ if (!beam.is_tracer && seen_anything && show_more)
more();
}
diff --git a/crawl-ref/source/beam.h b/crawl-ref/source/beam.h
index 17d833119b..7191f6bac1 100644
--- a/crawl-ref/source/beam.h
+++ b/crawl-ref/source/beam.h
@@ -189,10 +189,11 @@ bool nice_beam( struct monsters *mon, struct bolt &beam );
* called from: ability - it_use3 - item_use - mstuff2 - religion -
* spells - spells4
* *********************************************************************** */
-void explosion( struct bolt &pbolt, bool hole_in_the_middle = false,
+void explosion( bolt &pbolt, bool hole_in_the_middle = false,
bool explode_in_wall = false,
bool stop_at_statues = true,
- bool stop_at_walls = true);
+ bool stop_at_walls = true,
+ bool show_more = true);
// last updated 22jan2001 {gdl}
/* ***********************************************************************
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index a557e30d41..295de92c83 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -2560,6 +2560,9 @@ static bool handle_special_ability(monsters *monster, bolt & beem)
break;
case MONS_BALL_LIGHTNING:
+ if (is_sanctuary(monster->x, monster->y))
+ break;
+
if (monster->attitude == ATT_HOSTILE
&& distance( you.x_pos, you.y_pos, monster->x, monster->y ) <= 5)
{
@@ -2568,9 +2571,6 @@ static bool handle_special_ability(monsters *monster, bolt & beem)
break;
}
- if (is_sanctuary(monster->x, monster->y))
- break;
-
for (int i = 0; i < MAX_MONSTERS; i++)
{
monsters *targ = &menv[i];
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index a1262c8bd4..ff02fa2ebd 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -1549,14 +1549,16 @@ void spore_goes_pop(struct monsters *monster)
return;
}
- if (mons_near(monster))
+ bool nearby = mons_near(monster);
+
+ if (nearby)
{
- viewwindow(1, false);
+ viewwindow(true, false);
mpr(msg);
}
- explosion(beam);
-} // end spore_goes_pop()
+ explosion(beam, false, false, true, true, nearby);
+}
bolt mons_spells( int spell_cast, int power )
{
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index f59185f960..9cd5c94622 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -258,7 +258,7 @@ int cast_fire_storm(int powc, bolt &beam)
beam.hit = 20 + powc / 10;
beam.damage = calc_dice( 9, 20 + powc );
- explosion( beam );
+ explosion( beam, false, false, true, true, false );
mpr("A raging storm of fire appears!");
viewwindow(1, false);