Skip to content

Commit

Permalink
Fix Languorous mutation giving movespeed bonus
Browse files Browse the repository at this point in the history
Set stamina back to max_stamina if the max_stamina becomes lower than
stamina because of the Languorous mutation

fixes CleverRaven#40045
  • Loading branch information
LcsTen committed Jul 31, 2020
1 parent 36d06eb commit 37733bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mutation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ void Character::set_mutation( const trait_id &trait )
mutation_effect( trait );
recalc_sight_limits();
calc_encumbrance();

// If the stamina is higher than the max (Languorous), set it back to max
if( get_stamina() > get_stamina_max() ) {
set_stamina( get_stamina_max() );
}
}

void Character::unset_mutation( const trait_id &trait_ )
Expand Down

0 comments on commit 37733bf

Please sign in to comment.