Skip to content

Commit

Permalink
updated vehicle dragging
Browse files Browse the repository at this point in the history
rebalanced hauling pain penalty and gave a stamina discount to dragging wheeled vehicles
  • Loading branch information
SeventhSandwich committed Feb 6, 2020
1 parent 16987c9 commit b7fff6f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8909,7 +8909,13 @@ bool game::walk_move( const tripoint &dest_loc )
Monsters don't currently have stamina however.
For the time being just don't burn players stamina when mounted.
*/
u.burn_move_stamina( previous_moves - u.moves );
if( grabbed_vehicle == nullptr || grabbed_vehicle->wheelcache.empty() ) {
//Burn normal amount of stamina if no vehicle grabbed or vehicle lacks wheels
u.burn_move_stamina( previous_moves - u.moves );
} else {
//Burn half as much stamina if vehicle has wheels, without changing move time
u.burn_move_stamina( 0.50 * ( previous_moves - u.moves ) );
}
}
// Max out recoil
u.recoil = MAX_RECOIL;
Expand Down
4 changes: 2 additions & 2 deletions src/grab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ bool game::grabbed_veh_move( const tripoint &dp )
///\EFFECT_STR increases speed of dragging vehicles
u.moves -= 100 * str_req / std::max( 1, u.get_str() );
const int ex = dice( 1, 3 ) - 1 + str_req;
if( ex > u.get_str() ) {
if( ex > u.get_str() + 1 ) {
add_msg( m_bad, _( "You strain yourself to move the %s!" ), grabbed_vehicle->name );
u.moves -= 200;
u.mod_pain( 1 );
} else if( ex == u.get_str() ) {
} else {
u.moves -= 200;
add_msg( _( "It takes some time to move the %s." ), grabbed_vehicle->name );
}
Expand Down

0 comments on commit b7fff6f

Please sign in to comment.