summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/dungeon.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index c0147fb63b..e79550a2c7 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -248,6 +248,9 @@ static bool _fixup_interlevel_connectivity();
map_mask dgn_Map_Mask;
std::vector<vault_placement> Level_Vaults;
std::vector<vault_placement> Temp_Vaults;
+FixedVector<bool, NUM_MONSTERS> temp_unique_creatures;
+FixedVector<unique_item_status_type, MAX_UNRANDARTS> temp_unique_items;
+
std::set<std::string> Level_Unique_Maps;
std::set<std::string> Level_Unique_Tags;
std::string dgn_Build_Method;
@@ -955,6 +958,9 @@ void dgn_reset_level()
Level_Unique_Maps.clear();
Level_Unique_Tags.clear();
+ you.unique_creatures = temp_unique_creatures;
+ you.unique_items = temp_unique_items;
+
_portal_vault_map_name.clear();
_you_vault_list.clear();
dgn_Build_Method.clear();
@@ -1822,6 +1828,11 @@ static void _build_dungeon_level(int level_number, int level_type)
return;
}
+ // Save a copy of unique creatures in case we get vetoed.
+ temp_unique_creatures = you.unique_creatures;
+ // And unrands
+ temp_unique_items = you.unique_items;
+
// Try to place minivaults that really badly want to be placed. Still
// no guarantees, seeing this is a minivault.
_place_minivaults();