summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ng-init.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-03-26 23:51:31 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-03-26 23:56:36 +0200
commit2c8c99fec4aab48970d75030ece87dda40260e78 (patch)
treeed687319685e936cb25b8fa046c01209c36c7525 /crawl-ref/source/ng-init.cc
parent01c2aa8463804cdd4ff8818b78c1deb890a78efb (diff)
parent537a8dfbb6582c8269e3239b63a5d2ea03eb77a3 (diff)
downloadcrawl-ref-2c8c99fec4aab48970d75030ece87dda40260e78.tar.gz
crawl-ref-2c8c99fec4aab48970d75030ece87dda40260e78.zip
Merge branch 'master' into portal_branches
This includes fixes for 64834896234968 places in master that add new uses of LEVEL_FOO and so on.
Diffstat (limited to 'crawl-ref/source/ng-init.cc')
-rw-r--r--crawl-ref/source/ng-init.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/crawl-ref/source/ng-init.cc b/crawl-ref/source/ng-init.cc
index 0dc2ad0d20..c1d1def186 100644
--- a/crawl-ref/source/ng-init.cc
+++ b/crawl-ref/source/ng-init.cc
@@ -77,12 +77,19 @@ void initialise_branch_depths()
startdepth[branch] = random_range(b->mindepth, b->maxdepth);
}
- // Disable one of the Swamp/Shoals/Snake Pit.
- const branch_type disabled_branch =
- random_choose(BRANCH_SWAMP, BRANCH_SHOALS, BRANCH_SNAKE_PIT, -1);
+ // You will get one of Shoals/Swamp and one of Spider/Snake.
+ // This way you get one "water" branch and one "poison" branch.
+ const branch_type disabled_branch[] =
+ {
+ random_choose(BRANCH_SWAMP, BRANCH_SHOALS, -1),
+ random_choose(BRANCH_SNAKE_PIT, BRANCH_SPIDER_NEST, -1),
+ };
- dprf("Disabling branch: %s", branches[disabled_branch].shortname);
- startdepth[disabled_branch] = -1;
+ for (unsigned int i = 0; i < ARRAYSZ(disabled_branch); ++i)
+ {
+ dprf("Disabling branch: %s", branches[disabled_branch[i]].shortname);
+ startdepth[disabled_branch[i]] = -1;
+ }
initialise_branches_for_game_type();
}