summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorAlex MacDonald <alex@alexjmacdonald.com>2009-11-14 18:45:17 -0500
committerDavid Ploog <dploog@users.sourceforge.net>2009-11-18 00:21:21 +0100
commit60739d905fb591cbab819d6b56a5a510584d25ee (patch)
treeb00520d905f32a0ca9965c2d4f58a9d542eb64b9 /crawl-ref/source/player.cc
parent905d7f0ef50939e92d20a5798ccd3ba12350c738 (diff)
downloadcrawl-ref-60739d905fb591cbab819d6b56a5a510584d25ee.tar.gz
crawl-ref-60739d905fb591cbab819d6b56a5a510584d25ee.zip
Shaft trap behavior modified. They now are one-time use and pre-knowledge of shaft traps (i.e. using them intentionally) will improve the chances of the player landing fewer levels away. Shaft traps also now randomly determine their destination. Monsters cannot follow the player through shaft traps.
Signed-off-by: David Ploog <dploog@users.sourceforge.net>
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index e36fd474e6..be27606499 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -203,10 +203,10 @@ bool move_player_to_grid( const coord_def& p, bool stepped, bool allow_shift,
#ifdef CLUA_BINDINGS
// Prompt for any trap where you might not have enough hp
// as defined in init.txt (see trapwalk.lua)
- if (new_grid != DNGN_TRAP_MECHANICAL
- && type != TRAP_SHAFT
+ if (type != TRAP_SHAFT // Known shafts aren't traps
+ && (new_grid != DNGN_TRAP_MECHANICAL
|| !clua.callbooleanfn(false, "ch_cross_trap",
- "s", trap_name(p)))
+ "s", trap_name(p))))
#endif
{
std::string prompt = make_stringf(
@@ -7309,7 +7309,6 @@ bool player::do_shaft()
return (false);
}
- mpr("A shaft briefly opens up underneath you!");
handle_items_on_shaft(this->pos(), false);
if (airborne() || total_weight() == 0)