summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dgn-swamp.cc
diff options
context:
space:
mode:
authorMichael Gagno <evilmike@gmail.com>2012-07-03 02:04:23 -0700
committerMichael Gagno <evilmike@gmail.com>2012-07-03 02:04:23 -0700
commitdef1dad7634c73ff1475d29cc69851b09c53f4ae (patch)
tree8e5698b7b2dd28df16f1fab6f4ed1ddbc5452150 /crawl-ref/source/dgn-swamp.cc
parent7fd43ee287bdbe89594d88f7ebd3b750a716e14a (diff)
downloadcrawl-ref-def1dad7634c73ff1475d29cc69851b09c53f4ae.tar.gz
crawl-ref-def1dad7634c73ff1475d29cc69851b09c53f4ae.zip
Changes to the Swamp layout.
Trees have been made much more common. They form large, solid masses, and elongated walls. The borders of the level are also a lot more solid than before. The Swamp level builder itself is the same as before; I have only tweaked a few numbers. This leads to a few things: - Levels are more compact than before. They won't feel as much like one big room, although they are still quite open. - Levels are smaller. The borders around the edges of the level are bigger, and more of the level is taken up by solid features. - Different levels appear distinct from each other. - It's sometimes possible to get disconnected areas (with stairs). I find that last point somewhat undesirable, but these changes are only an experiment right now.
Diffstat (limited to 'crawl-ref/source/dgn-swamp.cc')
-rw-r--r--crawl-ref/source/dgn-swamp.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/crawl-ref/source/dgn-swamp.cc b/crawl-ref/source/dgn-swamp.cc
index 2550f2d55e..0894525319 100644
--- a/crawl-ref/source/dgn-swamp.cc
+++ b/crawl-ref/source/dgn-swamp.cc
@@ -25,18 +25,17 @@ static void _swamp_slushy_patches(int depth_multiplier)
random_range(2, 6),
int_range(8 + depth_offset,
17 + depth_offset),
- margin);
+ margin);
}
}
}
static dungeon_feature_type _swamp_feature_for_height(int height)
{
- return height >= 14? DNGN_DEEP_WATER :
- height > 0? DNGN_SHALLOW_WATER :
+ return height >= 14 ? DNGN_DEEP_WATER :
+ height > 0 ? DNGN_SHALLOW_WATER :
height > -9 ? DNGN_FLOOR :
- height > -13 ? DNGN_SHALLOW_WATER :
- height > -17 && coinflip() ? DNGN_SHALLOW_WATER :
+ height > -10 ? DNGN_SHALLOW_WATER :
DNGN_SWAMP_TREE;
}
@@ -49,7 +48,9 @@ static void _swamp_apply_features(int margin)
{
if (c.x < margin || c.y < margin || c.x >= GXM - margin
|| c.y >= GYM - margin)
+ {
grd(c) = DNGN_SWAMP_TREE;
+ }
else
grd(c) = _swamp_feature_for_height(dgn_height_at(c));
}
@@ -62,7 +63,7 @@ void dgn_build_swamp_level()
env.level_layout_types.insert("swamp");
const int swamp_depth = you.depth - 1;
- dgn_initialise_heightmap(-17);
+ dgn_initialise_heightmap(-19);
_swamp_slushy_patches(swamp_depth * 3);
dgn_smooth_heights();
_swamp_apply_features(2);