summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index cc0bbd550b..9ffd6978d5 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1122,6 +1122,13 @@ void up_stairs(dungeon_feature_type force_stair)
mprf("Welcome back to %s!",
branches[branches[i].parent_branch].longname);
you.where_are_you = branches[i].parent_branch;
+
+ // If leaving a branch which wasn't generated in this
+ // particular game (like the Swamp or Shoals), then
+ // its startdepth is set to -1; compensate for that,
+ // so we don't end up on "level -1".
+ if (branches[i].startdepth == -1)
+ you.your_level += 2;
break;
}
}