Skip to content

Commit

Permalink
Fix removed depressant&stim cap (#47831)
Browse files Browse the repository at this point in the history
* removed depressant&stim cap
  • Loading branch information
Jamuro-g committed May 20, 2021
1 parent a58f2b6 commit 418b45d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/consumption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1033,15 +1033,15 @@ void Character::modify_health( const islot_comestible &comest )

void Character::modify_stimulation( const islot_comestible &comest )
{
if( comest.stim == 0 ) {
return;
}
const int current_stim = get_stim();
if( comest.stim != 0 &&
( std::abs( current_stim ) < ( std::abs( comest.stim ) * 3 ) ||
sgn( current_stim ) != sgn( comest.stim ) ) ) {
if( comest.stim < 0 ) {
set_stim( std::max( comest.stim * 3, current_stim + comest.stim ) );
} else {
set_stim( std::min( comest.stim * 3, current_stim + comest.stim ) );
}
if( ( std::abs( comest.stim ) * 3 ) > std::abs( current_stim ) ) {
mod_stim( comest.stim );
} else {
comest.stim > 0 ? mod_stim( std::max( comest.stim / 2, 1 ) ) : mod_stim( std::min( comest.stim / 2,
-1 ) );
}
if( has_trait( trait_STIMBOOST ) && ( current_stim > 30 ) &&
( ( comest.add == add_type::CAFFEINE ) || ( comest.add == add_type::SPEED ) ||
Expand Down

0 comments on commit 418b45d

Please sign in to comment.