diff options
author | Vsevolod Kozlov <zaba@wybt.net> | 2011-06-25 21:37:40 +0400 |
---|---|---|
committer | Vsevolod Kozlov <zaba@wybt.net> | 2011-06-25 21:37:40 +0400 |
commit | 2e267507aa722ed6cc0f007248ade0dcdf7bb60b (patch) | |
tree | 79bbf25124c64565260e987322d257930e4a8e9f /crawl-ref/source/dgn-layouts.cc | |
parent | 2ffcdb9acbd64229772e13ddaa8b0f530f373e9e (diff) | |
download | crawl-ref-2e267507aa722ed6cc0f007248ade0dcdf7bb60b.tar.gz crawl-ref-2e267507aa722ed6cc0f007248ade0dcdf7bb60b.zip |
Make chaotic_city a little more chaotic.
It used to have a bias in the room placement that made it always leave the same
parts of the map almost empty. Doesn't fit its name.
Diffstat (limited to 'crawl-ref/source/dgn-layouts.cc')
-rw-r--r-- | crawl-ref/source/dgn-layouts.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crawl-ref/source/dgn-layouts.cc b/crawl-ref/source/dgn-layouts.cc index edcee4daa7..3cfe658738 100644 --- a/crawl-ref/source/dgn-layouts.cc +++ b/crawl-ref/source/dgn-layouts.cc @@ -191,11 +191,14 @@ void dgn_build_chaotic_city_level(dungeon_feature_type force_wall) // replace_area can also be used to fill in: for (i = 0; i < number_boxes; i++) { - b1x = 11 + random2(45); - b1y = 11 + random2(35); + int room_width = 3 + random2(7) + random2(5); + int room_height = 3 + random2(7) + random2(5); - b2x = b1x + 3 + random2(7) + random2(5); - b2y = b1y + 3 + random2(7) + random2(5); + b1x = 11 + random2(GXM - 21 - room_width); + b1y = 11 + random2(GYM - 21 - room_height); + + b2x = b1x + room_width; + b2y = b1y + room_height; dgn_region box = dgn_region::absolute(b1x, b1y, b2x, b2y); if (_find_forbidden_in_area(box, MMT_VAULT)) |