summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/traps.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/traps.cc')
-rw-r--r--crawl-ref/source/traps.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc
index b44543425f..7b22ca0f52 100644
--- a/crawl-ref/source/traps.cc
+++ b/crawl-ref/source/traps.cc
@@ -420,7 +420,7 @@ void handle_traps(trap_type trt, int i, bool trap_known)
// Paranoia
if (!is_valid_shaft_level())
{
- if (trap_known);
+ if (trap_known)
mpr("The shaft disappears in a puff of logic!");
grd[env.trap[i].x][env.trap[i].y] = DNGN_FLOOR;
@@ -932,6 +932,13 @@ bool is_valid_shaft_level(const level_id &place)
if (place.level_type != LEVEL_DUNGEON)
return (false);
+ // disallow shafts on the first two levels
+ if (place.branch == BRANCH_MAIN_DUNGEON
+ && you.your_level < 2)
+ {
+ return (false);
+ }
+
// Don't generate shafts in branches where teleport control
// is prevented. Prevents player from going down levels without
// reaching stairs, and also keeps player from getting stuck