diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-04 10:41:46 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-04 10:41:46 +0000 |
commit | 746b402561b6b27625c5c1ac33028da9aa846b18 (patch) | |
tree | 98f575a915c3403deeeb51fc5f4c11d4896124f0 /crawl-ref/source/player.cc | |
parent | b330585db366bb8a0ac70c3a73a1e1afd26e4a98 (diff) | |
download | crawl-ref-746b402561b6b27625c5c1ac33028da9aa846b18.tar.gz crawl-ref-746b402561b6b27625c5c1ac33028da9aa846b18.zip |
More general stuff.
- Beogh's water walk ability != swimming
- monsters won't throw nets at you if you're already caught
- Moved a few more messages into MSGCH_EXAMINE_FILTER.
- Added information on new options.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2051 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 6cf1695a8e..b6b43e2d62 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -246,7 +246,7 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, merfolk_start_swimming(); } } - else if ( !player_can_swim() ) + else if ( !player_likes_water() ) { ASSERT( new_grid != DNGN_DEEP_WATER ); @@ -347,7 +347,7 @@ bool is_grid_dangerous(int grid) { return (!player_is_levitating() && (grid == DNGN_LAVA - || (grid == DNGN_DEEP_WATER && !player_can_swim()))); + || (grid == DNGN_DEEP_WATER && !player_likes_water()) )); } bool player_in_mappable_area( void ) @@ -370,10 +370,15 @@ bool player_in_hell( void ) bool player_in_water(void) { - return (!player_is_levitating() + return (!player_is_levitating() && !beogh_water_walk() && grid_is_water(grd[you.x_pos][you.y_pos])); } +bool player_likes_water(void) +{ + return (player_can_swim() || beogh_water_walk()); +} + bool player_is_swimming(void) { return you.swimming(); @@ -5010,8 +5015,7 @@ bool player::in_water() const bool player::can_swim() const { - return (species == SP_MERFOLK || - (you.religion == GOD_BEOGH && you.piety >= piety_breakpoint(4))); + return (species == SP_MERFOLK); } bool player::swimming() const |