summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-08-23 23:42:12 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-08-23 23:42:12 +0000
commit8d0dc6c81b4ecd7027c119d1bf551d71f2338c68 (patch)
treedd8520efd687cef7a18cbf971ada3aeab8603406
parent622b92a486244f2277cbba187cc39f600efbf1bc (diff)
downloadcrawl-ref-8d0dc6c81b4ecd7027c119d1bf551d71f2338c68.tar.gz
crawl-ref-8d0dc6c81b4ecd7027c119d1bf551d71f2338c68.zip
Backport trunk r6853 to 0.4.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6854 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/spells4.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 225a80ac06..bcd7d4a2d9 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -239,7 +239,7 @@ static int _shatter_items(int x, int y, int pow, int garbage)
static int _shatter_walls(int x, int y, int pow, int garbage)
{
- UNUSED( garbage );
+ UNUSED(garbage);
int chance = 0;
@@ -247,12 +247,13 @@ static int _shatter_walls(int x, int y, int pow, int garbage)
if (x <= 5 || x >= GXM - 5 || y <= 5 || y >= GYM - 5)
return (0);
- switch (grd[x][y])
+ const dungeon_feature_type grid = grd[x][y];
+
+ switch (grid)
{
case DNGN_SECRET_DOOR:
if (see_grid(x, y))
mpr("A secret door shatters!");
- grd[x][y] = DNGN_FLOOR;
chance = 100;
break;
@@ -260,7 +261,6 @@ static int _shatter_walls(int x, int y, int pow, int garbage)
case DNGN_OPEN_DOOR:
if (see_grid(x, y))
mpr("A door shatters!");
- grd[x][y] = DNGN_FLOOR;
chance = 100;
break;
@@ -296,6 +296,10 @@ static int _shatter_walls(int x, int y, int pow, int garbage)
noisy(30, x, y);
grd[x][y] = DNGN_FLOOR;
+
+ if (grid == DNGN_ORCISH_IDOL)
+ beogh_idol_revenge();
+
return (1);
}