diff options
-rw-r--r-- | crawl-ref/source/debug.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 12 | ||||
-rw-r--r-- | crawl-ref/source/traps.cc | 35 |
3 files changed, 38 insertions, 12 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index b17e02d521..4987cd4f97 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -3582,6 +3582,9 @@ void debug_make_trap() place_specific_trap(you.pos(), trap); mprf("Created a %s trap, marked it undiscovered", trap_name(trap)); + + if (trap == TRAP_SHAFT && !is_valid_shaft_level()) + mpr("NOTE: Shaft traps aren't valid on this level."); } void debug_make_shop() diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 74e8d2e821..c5cbf044fc 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1803,7 +1803,9 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, if (!is_valid_shaft_level()) { if (known_trap) - mpr("Strange, the shaft doesn't seem to lead anywhere."); + mpr("The shaft disappears is a puff of logic!"); + + find_trap(you.pos())->destroy(); return; } @@ -1811,7 +1813,13 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, if (shaft_dest == level_id::current()) { if (known_trap) - mpr("Strange, the shaft doesn't seem to lead anywhere."); + { + mpr("Strange, the shaft seems to lead back to this level."); + mpr("The strain on the space-time continuum destroys the " + "shaft!"); + } + + find_trap(you.pos())->destroy(); return; } shaft_level = absdungeon_depth(shaft_dest.branch, diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc index d361f04695..796b3f61f7 100644 --- a/crawl-ref/source/traps.cc +++ b/crawl-ref/source/traps.cc @@ -607,9 +607,33 @@ void trap_def::trigger(actor& triggerer, bool flat_footed) break; case TRAP_SHAFT: + // Paranoia + if (!is_valid_shaft_level()) + { + if (you_know && in_sight) + mpr("The shaft disappears in a puff of logic!"); + + trap_destroyed = true; + break; + } + // Known shafts don't trigger as traps. if (trig_knows) + { + if (you_trigger) + { + if (triggerer.airborne()) + { + if (you.flight_mode() == FL_LEVITATE) + mpr("You float over the shaft."); + else + mpr("You fly over the shaft."); + } + else + mpr("You carefully avoid triggering the shaft."); + } break; + } if (!triggerer.will_trigger_shaft()) { @@ -629,17 +653,8 @@ void trap_def::trigger(actor& triggerer, bool flat_footed) } } - // Paranoia - if (!is_valid_shaft_level()) - { - if (you_know && in_sight) - mpr("The shaft disappears in a puff of logic!"); - - trap_destroyed = true; - } - else + // Fire away! { - // Fire away! const bool revealed = triggerer.do_shaft(); if (!revealed && !you_know) this->hide(); |