summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-25 14:12:07 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-25 14:12:07 +0000
commitecf486f921ceaa06af4252191b97f3017057f74a (patch)
tree4b0aec9c68ef4e2eb60e23d03a342d430bce0f1f /crawl-ref/source/effects.cc
parent9f2bdcc6b1bc5a5ddc6a60b5edd16b22122d5901 (diff)
downloadcrawl-ref-ecf486f921ceaa06af4252191b97f3017057f74a.tar.gz
crawl-ref-ecf486f921ceaa06af4252191b97f3017057f74a.zip
Apply patch 1901117: vitrification effect for Xom (and Xom cleanup)
This needs flavour messages, and looks odd for large power because the undiggable stone of the level also gets turned into glass possibly resulting in huge areas of glass tiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3464 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 722161f8e5..d70a41fc14 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1982,6 +1982,26 @@ bool forget_inventory(bool quiet)
return (items_forgotten > 0);
}
+void vitrify_area(int radius)
+{
+ const int radius2 = radius * radius;
+ for ( int x = X_BOUND_1; x <= X_BOUND_2; ++x )
+ {
+ for ( int y = Y_BOUND_1; y <= Y_BOUND_2; ++y )
+ {
+ if ( distance(x,y,you.x_pos,you.y_pos) < radius2 )
+ {
+ if ( grd[x][y] == DNGN_ROCK_WALL )
+ grd[x][y] = DNGN_CLEAR_ROCK_WALL;
+ else if ( grd[x][y] == DNGN_STONE_WALL )
+ grd[x][y] = DNGN_CLEAR_STONE_WALL;
+ else if ( grd[x][y] == DNGN_PERMAROCK_WALL )
+ grd[x][y] = DNGN_CLEAR_PERMAROCK_WALL;
+ }
+ }
+ }
+}
+
///////////////////////////////////////////////////////////////////////
static void hell_effects()