diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-08 12:12:19 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-08 12:12:19 +0000 |
commit | 4f3558feb5639ff93e46a0795d94d638ef0c89fc (patch) | |
tree | 1b42eb5e474a7054dac54a5d50798914b3d99962 /crawl-ref/source/dungeon.cc | |
parent | 06b226a27e7c8f2a9ce8928311fcdfcb7c6a2f79 (diff) | |
download | crawl-ref-4f3558feb5639ff93e46a0795d94d638ef0c89fc.tar.gz crawl-ref-4f3558feb5639ff93e46a0795d94d638ef0c89fc.zip |
Added Water card. Might need some rebalancing.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4127 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 3e7668874f..ea4e30f654 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -1293,7 +1293,7 @@ static int _count_antifeature_in_box(int x0, int y0, int x1, int y1, } // count how many neighbours of grd[x][y] are the feature feat. -static int _count_neighbours(int x, int y, dungeon_feature_type feat) +int count_neighbours(int x, int y, dungeon_feature_type feat) { return _count_feature_in_box(x-1, y-1, x+2, y+2, feat); } @@ -1431,7 +1431,7 @@ static void _prepare_shoals(int level_number) for ( int i = margin; i < GXM - margin; ++i) for ( int j = margin; j < GYM - margin; ++j) if (grd[i][j] == DNGN_DEEP_WATER - && _count_neighbours(i, j, DNGN_FLOOR) > random2(random2(3)+1)) + && count_neighbours(i, j, DNGN_FLOOR) > random2(random2(3)+1)) { grd[i][j] = DNGN_SHALLOW_WATER; } @@ -1477,7 +1477,7 @@ static void _prepare_shoals(int level_number) for ( int y = margin; y < GYM - margin; ++y ) if ( grd[x][y] == DNGN_DEEP_WATER ) { - int badness = _count_neighbours(x, y, DNGN_WATER_STUCK); + int badness = count_neighbours(x, y, DNGN_WATER_STUCK); if ( random2(badness) >= 2 && coinflip() ) grd[x][y] = DNGN_LAVA; } |