Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max stamina modifiers from mutations now affect stamina regen #39994

Merged
merged 3 commits into from
May 4, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
max stamina modifier afects stamina regen
  • Loading branch information
CodeBandit committed Apr 13, 2020
commit 5aee59a32f3a96b236bfc567bff06b991416caf0
3 changes: 2 additions & 1 deletion src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7248,8 +7248,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