From b7fff6f6aa9405900bcc61e719757cb1da935e45 Mon Sep 17 00:00:00 2001 From: SeventhSandwich Date: Thu, 6 Feb 2020 17:25:58 -0500 Subject: [PATCH] updated vehicle dragging rebalanced hauling pain penalty and gave a stamina discount to dragging wheeled vehicles --- src/game.cpp | 8 +++++++- src/grab.cpp | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index d715ecfb09363..f15319e5a3ccc 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -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; diff --git a/src/grab.cpp b/src/grab.cpp index 32351009b2389..c0f748d979053 100644 --- a/src/grab.cpp +++ b/src/grab.cpp @@ -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 ); }