From ee2afdbd1610f7a204808056bf1a5826085b89c8 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 14 May 2008 15:00:11 +0000 Subject: FR 1962016: Make hydra headedness more obvious. You now get messages like "The seven-headed hydra bites." and "You slice the 12-headed hydra." FR 1963606: Take a note when you pick up a rune (or the Orb!) for the first time. There are a couple of other files I changed, but I can't remember any big stuff, so it was probably just cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5029 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 1f70d801f2..b131b2a2f8 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -102,9 +102,9 @@ static void _attribute_increase(); // Use this function whenever the player enters (or lands and thus re-enters) // a grid. // -// stepped - normal walking moves +// stepped - normal walking moves // allow_shift - allowed to scramble in any direction out of lava/water -// force - ignore safety checks, move must happen (traps, lava/water). +// force - ignore safety checks, move must happen (traps, lava/water). bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, bool force ) { @@ -114,7 +114,7 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, // assuming that entering the same square means coming from above (levitate) const bool from_above = (you.x_pos == x && you.y_pos == y); const dungeon_feature_type old_grid = (from_above) ? DNGN_FLOOR - : grd[you.x_pos][you.y_pos]; + : grd[you.x_pos][you.y_pos]; const dungeon_feature_type new_grid = grd[x][y]; // really must be clear @@ -128,7 +128,7 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, if (cloud != EMPTY_CLOUD) { const cloud_type ctype = env.cloud[ cloud ].type; - // don't prompt if already in a cloud of the same type + // Don't prompt if already in a cloud of the same type. if (is_damaging_cloud(ctype, false) && (env.cgrid[you.x_pos][you.y_pos] == EMPTY_CLOUD || ctype != env.cloud[ env.cgrid[you.x_pos][you.y_pos] ].type)) @@ -146,7 +146,7 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, } } - // if we're walking along, give a chance to avoid trap + // If we're walking along, give a chance to avoid traps. if (stepped && !force && !you.confused()) { if (new_grid == DNGN_UNDISCOVERED_TRAP) @@ -160,6 +160,7 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, mprf( MSGCH_WARN, "Wait a moment, %s! Do you really want to step there?", you.your_name ); + if (!you.running.is_any_travel()) more(); @@ -173,7 +174,7 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, return (false); } - } // unknown trap + } else if (new_grid == DNGN_TRAP_MAGICAL #ifdef CLUA_BINDINGS || new_grid == DNGN_TRAP_MECHANICAL @@ -297,8 +298,8 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, #ifdef USE_TILE // We could check for this above, but we need to do this post-move // to force the merfolk tile to be out of water. - if ((!grid_is_water(new_grid) && grid_is_water(old_grid) || - grid_is_water(new_grid) && !grid_is_water(old_grid)) + if ((!grid_is_water(new_grid) && grid_is_water(old_grid) + || grid_is_water(new_grid) && !grid_is_water(old_grid)) && you.species == SP_MERFOLK) { TilePlayerRefresh(); @@ -335,12 +336,12 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, set_envmap_obj(you.x_pos, you.y_pos, type); } - // not easy to blink onto a trap without setting it off: + // It's not easy to blink onto a trap without setting it off. if (!stepped) trap_known = false; // mechanical traps and shafts cannot be set off if the - // player is flying or levitating + // player is flying or levitating if (!player_is_airborne() || trap_category( env.trap[id].type ) == DNGN_TRAP_MAGICAL) { @@ -2692,7 +2693,7 @@ int player_sust_abil(bool calc_unid) int carrying_capacity( burden_state_type bs ) { - int cap = 3500+(you.strength * 100)+(player_is_airborne() ? 1000 : 0); + int cap = 3500 + (you.strength * 100) + (player_is_airborne() ? 1000 : 0); if ( bs == BS_UNENCUMBERED ) return (cap * 5) / 6; else if ( bs == BS_ENCUMBERED ) @@ -6218,20 +6219,20 @@ flight_type player::flight_mode() const bool player::permanent_levitation() const { - return airborne() && - (permanent_flight() || - // Boots of levitation keep you with DUR_LEVITATION >= 2 at - // all times. This is so that you can evoke stop-levitation - // in order to actually cancel levitation (by setting - // DUR_LEVITATION to 1.) Note that antimagic() won't do this. - (player_equip_ego_type( EQ_BOOTS, SPARM_LEVITATION ) && - you.duration[DUR_LEVITATION] > 1)); + // Boots of levitation keep you with DUR_LEVITATION >= 2 at + // all times. This is so that you can evoke stop-levitation + // in order to actually cancel levitation (by setting + // DUR_LEVITATION to 1.) Note that antimagic() won't do this. + return (airborne() + && (permanent_flight() + || player_equip_ego_type( EQ_BOOTS, SPARM_LEVITATION ) + && you.duration[DUR_LEVITATION] > 1)); } bool player::permanent_flight() const { - return airborne() && - (you.species == SP_KENKU && you.experience_level >= 15); + return (airborne() + && you.species == SP_KENKU && you.experience_level >= 15); } bool player::light_flight() const -- cgit v1.2.3-54-g00ecf