summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-14 20:26:05 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-14 20:26:05 +0000
commit26f8d2de7b69e5cc901b293f76dd0ded073ad1b7 (patch)
tree87209d39e974b90f25cc2da991c7156cf91c8720 /crawl-ref/source/view.cc
parent258300c2d7b30f3ccdcd43b804b4ff9055dae917 (diff)
downloadcrawl-ref-26f8d2de7b69e5cc901b293f76dd0ded073ad1b7.tar.gz
crawl-ref-26f8d2de7b69e5cc901b293f76dd0ded073ad1b7.zip
Tweak Shoals algorithm to place the islands a bit more central and away from
the border (so they're not cut off anymore). Also add a new feature type DNGN_OPEN_SEA that is an impassible feature only intended for the Shoals border. Will need special handling for confusion, I guess. I've also tweaked the level generation, so Shoals vaults don't need to be connected anymore (the algorithm just adds superfluous floor corridors), but I still get loads of corridors on the bottom level - frustratingly enough only inside the map border, and they (usually) don't even contain any stairs or other features. It's maddening! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10213 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r--crawl-ref/source/view.cc40
1 files changed, 28 insertions, 12 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 20345fb91a..6deca847e6 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -3872,30 +3872,36 @@ bool magic_mapping(int map_radius, int proportion, bool suppress_msg,
return (false);
}
- if (map_radius > 50 && map_radius != 1000)
- map_radius = 50;
- else if (map_radius < 5)
- map_radius = 5;
+ const bool wizard_map = (you.wizard && map_radius == 1000);
+
+ if (!wizard_map)
+ {
+ if (map_radius > 50)
+ map_radius = 50;
+ else if (map_radius < 5)
+ map_radius = 5;
+ }
// now gradually weaker with distance:
- const int pfar = (map_radius * 7) / 10;
+ const int pfar = (map_radius * 7) / 10;
const int very_far = (map_radius * 9) / 10;
- const bool wizard_map = (you.wizard && map_radius == 1000);
-
bool did_map = false;
for (radius_iterator ri(you.pos(), map_radius, true, false); ri; ++ri)
{
if (proportion < 100 && random2(100) >= proportion)
continue; // note that proportion can be over 100
- const int dist = grid_distance( you.pos(), *ri );
+ if (!wizard_map)
+ {
+ const int dist = grid_distance( you.pos(), *ri );
- if (dist > pfar && one_chance_in(3))
- continue;
+ if (dist > pfar && one_chance_in(3))
+ continue;
- if (dist > very_far && coinflip())
- continue;
+ if (dist > very_far && coinflip())
+ continue;
+ }
if (is_terrain_changed(*ri))
clear_envmap_grid(*ri);
@@ -4066,6 +4072,7 @@ bool grid_see_grid(const coord_def& p1, const coord_def& p2,
true, true));
}
+// For order and meaning of symbols, see dungeon_char_type in enum.h.
static const unsigned dchar_table[ NUM_CSET ][ NUM_DCHAR_TYPES ] =
{
// CSET_ASCII
@@ -4215,6 +4222,15 @@ void init_feature_table( void )
Feature[i].minimap = MF_WALL;
break;
+ case DNGN_OPEN_SEA:
+#ifdef USE_TILE
+ Feature[i].dchar = DCHAR_WAVY;
+#else
+ Feature[i].dchar = DCHAR_WALL;
+#endif
+ Feature[i].colour = BLUE;
+ Feature[i].minimap = MF_WATER;
+ break;
case DNGN_OPEN_DOOR:
Feature[i].dchar = DCHAR_DOOR_OPEN;