summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r--crawl-ref/source/mapdef.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index 8d9e7408af..b9df39c83f 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -192,6 +192,14 @@ void level_range::set(const std::string &br, int s, int d)
shallowest = s;
deepest = d;
+ if (branch != NUM_BRANCHES)
+ {
+ if (shallowest == -1)
+ shallowest = branches[branch].depth;
+ if (deepest == -1)
+ deepest = branches[branch].depth;
+ }
+
if (deepest < shallowest)
throw make_stringf("Level-range %s:%d-%d is malformed",
br.c_str(), s, d);
@@ -245,6 +253,12 @@ void level_range::parse_depth_range(const std::string &s, int *l, int *h)
return;
}
+ if (s == "$")
+ {
+ *l = *h = -1;
+ return;
+ }
+
std::string::size_type hy = s.find('-');
if (hy == std::string::npos)
{