diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-23 23:38:42 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-23 23:38:42 +0000 |
commit | 98f7c22b56592a99c2f8e466af254498f0d5dc31 (patch) | |
tree | 4f72f23151c40228b12f43f331c6910281a90b7a /crawl-ref/source/spells4.cc | |
parent | 267aa98041462c6b387951e5f8e8fe1b112b6875 (diff) | |
download | crawl-ref-98f7c22b56592a99c2f8e466af254498f0d5dc31.tar.gz crawl-ref-98f7c22b56592a99c2f8e466af254498f0d5dc31.zip |
Make Beogh take revenge properly if you destroy an orcish idol with the
Shatter spell.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6853 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r-- | crawl-ref/source/spells4.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 2c94c3f542..f506ea3829 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -224,20 +224,21 @@ static int _shatter_items(coord_def where, int pow, int garbage) static int _shatter_walls(coord_def where, int pow, int garbage) { - UNUSED( garbage ); + UNUSED(garbage); int chance = 0; // if not in-bounds then we can't really shatter it -- bwr - if ( !in_bounds(where) ) + if (!in_bounds(where)) return 0; - switch (grd(where)) + const dungeon_feature_type grid = grd(where); + + switch (grid) { case DNGN_SECRET_DOOR: if (see_grid(where)) mpr("A secret door shatters!"); - grd(where) = DNGN_FLOOR; chance = 100; break; @@ -245,7 +246,6 @@ static int _shatter_walls(coord_def where, int pow, int garbage) case DNGN_OPEN_DOOR: if (see_grid(where)) mpr("A door shatters!"); - grd(where) = DNGN_FLOOR; chance = 100; break; @@ -281,6 +281,10 @@ static int _shatter_walls(coord_def where, int pow, int garbage) noisy(30, where); grd(where) = DNGN_FLOOR; + + if (grid == DNGN_ORCISH_IDOL) + beogh_idol_revenge(); + return (1); } |