From 97870b61701d19f36ae6da5b88595f207cb5c173 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sat, 28 Nov 2009 21:37:36 +1000 Subject: Give unique maps a second and third chance to place. If the map doesn't get placed, give it a second and third try at it. Give up after these, though; this means that uniques should probably generate at the same rate as they were at before. --- crawl-ref/source/dungeon.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 2b9e5cfd14..b3ade88bf7 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -3595,7 +3595,16 @@ static int _place_uniques(int level_number, char level_type) break; } - if (dgn_place_map(uniq_map, false, false)) + bool map_placed = false; + + for (int i = 0; i <= 3; i++) + { + if (map_placed) + continue; + map_placed = dgn_place_map(uniq_map, false, false); + } + + if (map_placed) { num_placed++; #ifdef DEBUG_UNIQUE_PLACEMENT -- cgit v1.2.3-54-g00ecf