summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-11-29 18:06:32 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-29 18:06:32 +1000
commit5556ce4cdeb19a2219a1f93383228d24c360c3a4 (patch)
treea1437820dea167aea203c4158b7e95359e74d652 /crawl-ref/source/dungeon.cc
parent2af84a1dc526c634dd29f3b5f87299c8e026b110 (diff)
downloadcrawl-ref-5556ce4cdeb19a2219a1f93383228d24c360c3a4.tar.gz
crawl-ref-5556ce4cdeb19a2219a1f93383228d24c360c3a4.zip
Place uniques before connectivity checks.
Placing them after connectivity checks causes issues when (larger) vaults split the level or clobber staircases. This, in combination with setting it to non-clobber, should solve all of these issues. It may mean that some uniques are placed less than others (such as Yiuf's vault), and thus may require that his vault has its weight increased slightly to compensate. However, it also means that it's now safe to create other, similar vaults.
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r--crawl-ref/source/dungeon.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index e79550a2c7..f165ee457d 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -138,6 +138,7 @@ static void _place_extra_vaults();
static void _place_minivaults(const std::string &tag = "",
int fewest = -1, int most = -1,
bool force = false);
+static int _place_uniques(int level_number, char level_type);
static void _place_traps( int level_number );
static void _place_fog_machines( int level_number );
static void _prepare_swamp();
@@ -1839,6 +1840,10 @@ static void _build_dungeon_level(int level_number, int level_type)
_place_branch_entrances( level_number, level_type );
_place_extra_vaults();
+ // XXX: Moved this here from builder_monsters so that connectivity can be
+ // ensured
+ _place_uniques(level_number, level_type);
+
// Place shops, if appropriate. This must be protected by the connectivity
// check.
if (level_type == LEVEL_DUNGEON && your_branch().has_shops)
@@ -3761,8 +3766,6 @@ static void _builder_monsters(int level_number, char level_type, int mon_wanted)
place_monster(mg);
}
- _place_uniques(level_number, level_type);
-
if (!player_in_branch(BRANCH_CRYPT)) // No water creatures in the Crypt.
_place_aquatic_monsters(level_number, level_type);
else