summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/branch.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-08-30 16:10:34 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-08-30 16:17:29 +0200
commit4cac99eb86a8ab4194a5db7facb1e7c8dced5aa2 (patch)
tree393a07ccb1a6cbf543e1b5f20fb2995429dd37d7 /crawl-ref/source/branch.cc
parent1203519ab68e5e38fa0d89bfdc0d9dc53b17f57c (diff)
downloadcrawl-ref-4cac99eb86a8ab4194a5db7facb1e7c8dced5aa2.tar.gz
crawl-ref-4cac99eb86a8ab4194a5db7facb1e7c8dced5aa2.zip
Generalize checks for disabled Lair branches.
Diffstat (limited to 'crawl-ref/source/branch.cc')
-rw-r--r--crawl-ref/source/branch.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/branch.cc b/crawl-ref/source/branch.cc
index b6616c1a50..59140dc445 100644
--- a/crawl-ref/source/branch.cc
+++ b/crawl-ref/source/branch.cc
@@ -75,6 +75,12 @@ bool is_hell_subbranch(branch_type branch)
&& branch != BRANCH_VESTIBULE_OF_HELL);
}
+bool is_random_lair_subbranch(branch_type branch)
+{
+ return branches[branch].parent_branch == BRANCH_LAIR
+ && branch != BRANCH_SLIME_PITS;
+}
+
branch_type str_to_branch(const std::string &branch, branch_type err)
{
for (int i = 0; i < NUM_BRANCHES; ++i)