Skip to content

Commit

Permalink
Merge pull request #42610 from LcsTen/npc-languorous-speed-bonus
Browse files Browse the repository at this point in the history
Fix Languorous mutation giving movespeed bonus
  • Loading branch information
Rivet-the-Zombie committed Aug 2, 2020
2 parents 39d822f + 6ec3611 commit 0bc165c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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
3 changes: 2 additions & 1 deletion src/npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2837,7 +2837,8 @@ void npc::process_turn()
player::process_turn();

// NPCs shouldn't be using stamina, but if they have, set it back to max
if( calendar::once_every( 1_minutes ) && get_stamina() < get_stamina_max() ) {
// If the stamina is higher than the max (Languorous), set it back to max
if( calendar::once_every( 1_minutes ) && get_stamina() != get_stamina_max() ) {
set_stamina( get_stamina_max() );
}

Expand Down

0 comments on commit 0bc165c

Please sign in to comment.