From 8d0dc6c81b4ecd7027c119d1bf551d71f2338c68 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 23 Aug 2008 23:42:12 +0000 Subject: 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 --- crawl-ref/source/spells4.cc | 12 ++++++++---- 1 file 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); } -- cgit v1.2.3-54-g00ecf