Skip to content

Commit

Permalink
Max stamina modifiers from mutations now affect stamina regen (#39994)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBandit authored May 4, 2020
1 parent 17b6b76 commit 87b94d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7423,8 +7423,9 @@ void Character::update_stamina( int turns )
float stamina_recovery = 0.0f;
// Recover some stamina every turn.
// Mutated stamina works even when winded
// max stamina modifers from mutation also affect stamina multi
float stamina_multiplier = ( !has_effect( effect_winded ) ? 1.0f : 0.1f ) +
mutation_value( stamina_regen_modifier );
mutation_value( stamina_regen_modifier ) + ( mutation_value( "max_stamina_modifier" ) - 1.0f );
// But mouth encumbrance interferes, even with mutated stamina.
stamina_recovery += stamina_multiplier * std::max( 1.0f,
base_regen_rate - ( encumb( bp_mouth ) / 5.0f ) );
Expand Down

0 comments on commit 87b94d9

Please sign in to comment.