diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2013-11-03 19:47:13 -0700 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2013-11-03 19:47:13 -0700 |
commit | 9c7513855ef918351dd109068599397b7faf3452 (patch) | |
tree | d731e1b4677e9c85fb5b67ad7c4775a5acdfb18c /crawl-ref/source/abyss.cc | |
parent | 148cdeebf97c62f9a1454f856ad4b981c500fe24 (diff) | |
download | crawl-ref-9c7513855ef918351dd109068599397b7faf3452.tar.gz crawl-ref-9c7513855ef918351dd109068599397b7faf3452.zip |
Do away with the "abyss" tag in favour of DEPTH specifications.
If we want selectability by Abyss depth, the Abyss vaults all need DEPTH
tags anyway, so we don't need an "abyss" tag to go with that.
Diffstat (limited to 'crawl-ref/source/abyss.cc')
-rw-r--r-- | crawl-ref/source/abyss.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/crawl-ref/source/abyss.cc b/crawl-ref/source/abyss.cc index f2d8517f4b..f6977b86ff 100644 --- a/crawl-ref/source/abyss.cc +++ b/crawl-ref/source/abyss.cc @@ -1290,13 +1290,21 @@ static int _abyss_place_vaults(const map_bitmask &abyss_genlevel_mask) int vaults_placed = 0; + bool mini = false; const int maxvaults = 6; int tries = 0; while (vaults_placed < maxvaults) { - const map_def *map = random_map_for_tag("abyss", true, true); + const map_def *map = random_map_in_depth(level_id::current(), mini); if (!map) + { + if (!mini) + { + mini = true; + continue; + } break; + } if (!_abyss_place_map(map) || map->has_tag("extra")) { @@ -1306,6 +1314,8 @@ static int _abyss_place_vaults(const map_bitmask &abyss_genlevel_mask) continue; } + mini = true; + if (!one_chance_in(2 + (++vaults_placed))) break; } |