diff --git a/src/activity_actor.cpp b/src/activity_actor.cpp index d69da962c440..355d8644678a 100644 --- a/src/activity_actor.cpp +++ b/src/activity_actor.cpp @@ -455,10 +455,11 @@ void dig_activity_actor::finish( player_activity &act, Character &who ) calendar::turn ) ); } - const int helpersize = character_funcs::get_crafting_helpers( who, 3 ).size(); - who.mod_stored_nutr( 5 - helpersize ); - who.mod_thirst( 5 - helpersize ); - who.mod_fatigue( 10 - ( helpersize * 2 ) ); + const int act_exertion = act.moves_total; + + who.mod_stored_kcal( std::min( -1, -act_exertion / to_moves( 80_seconds ) ) ); + who.mod_thirst( std::max( 1, act_exertion / to_moves( 12_minutes ) ) ); + who.mod_fatigue( std::max( 1, act_exertion / to_moves( 6_minutes ) ) ); if( grave ) { who.add_msg_if_player( m_good, _( "You finish exhuming a grave." ) ); } else { @@ -526,9 +527,11 @@ void dig_channel_activity_actor::finish( player_activity &act, Character &who ) calendar::turn ) ); } - who.mod_stored_kcal( -40 ); - who.mod_thirst( 5 ); - who.mod_fatigue( 10 ); + const int act_exertion = act.moves_total; + + who.mod_stored_kcal( std::min( -1, -act_exertion / to_moves( 80_seconds ) ) ); + who.mod_thirst( std::max( 1, act_exertion / to_moves( 12_minutes ) ) ); + who.mod_fatigue( std::max( 1, act_exertion / to_moves( 6_minutes ) ) ); who.add_msg_if_player( m_good, _( "You finish digging up %s." ), here.ter( location ).obj().name() ); diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index b44978b21e92..1bb1e18b0826 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -4421,12 +4421,18 @@ void activity_handlers::fill_pit_finish( player_activity *act, player *p ) } else { here.ter_set( pos, t_dirt ); } + int act_exertion = to_moves( time_duration::from_minutes( 15 ) ); + if( old_ter == t_pit_shallow ) { + act_exertion = to_moves( time_duration::from_minutes( 10 ) ); + } else if( old_ter == t_dirtmound ) { + act_exertion = to_moves( time_duration::from_minutes( 5 ) ); + } const int helpersize = character_funcs::get_crafting_helpers( *p, 3 ).size(); - p->mod_stored_nutr( 5 - helpersize ); - p->mod_thirst( 5 - helpersize ); - p->mod_fatigue( 10 - ( helpersize * 2 ) ); + act_exertion = act_exertion * ( 10 - helpersize ) / 10; + p->mod_stored_kcal( std::min( -1, -act_exertion / to_moves( 20_seconds ) ) ); + p->mod_thirst( std::max( 1, act_exertion / to_moves( 3_minutes ) ) ); + p->mod_fatigue( std::max( 1, act_exertion / to_moves( 90_seconds ) ) ); p->add_msg_if_player( m_good, _( "You finish filling up %s." ), old_ter.obj().name() ); - act->set_to_null(); }