diff options
author | pauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-17 05:08:34 +0000 |
---|---|---|
committer | pauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-17 05:08:34 +0000 |
commit | 314a2c0efb7083bc9703b6e2f6ee4e054d000cc1 (patch) | |
tree | 901f0509c46d7445eedc1471804d8c70a25cf6da /crawl-ref/source/traps.cc | |
parent | c64c0e054c27bbdd37361f4a7125965d787f1598 (diff) | |
download | crawl-ref-314a2c0efb7083bc9703b6e2f6ee4e054d000cc1.tar.gz crawl-ref-314a2c0efb7083bc9703b6e2f6ee4e054d000cc1.zip |
- Move "shaft disappears in a puff of logic" logic further down, so it's
easier to test floating over traps
- Don't yesno if an airborne player tries to move over a shaft.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3684 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/traps.cc')
-rw-r--r-- | crawl-ref/source/traps.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc index ffa51a64e1..d84005a239 100644 --- a/crawl-ref/source/traps.cc +++ b/crawl-ref/source/traps.cc @@ -423,6 +423,17 @@ void handle_traps(trap_type trt, int i, bool trap_known) // already know about it, don't let him/her notice it. case TRAP_SHAFT: { + if (!you.will_trigger_shaft()) + { + if (trap_known && !you.airborne()) + mpr("You don't fall through the shaft."); + + if (!trap_known) + grd[you.x_pos][you.y_pos] = DNGN_UNDISCOVERED_TRAP; + + return; + } + // Paranoia if (!is_valid_shaft_level()) { @@ -434,23 +445,14 @@ void handle_traps(trap_type trt, int i, bool trap_known) return; } - if (!you.will_trigger_shaft()) - { - if (trap_known && !you.airborne()) - mpr("You don't fall through the shaft.."); - - if (!trap_known) - grd[you.x_pos][you.y_pos] = DNGN_UNDISCOVERED_TRAP; - - return; - } - if (!you.do_shaft()) + { if (!trap_known) { grd[you.x_pos][you.y_pos] = DNGN_UNDISCOVERED_TRAP; return; } + } break; } |