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

Fix trait-less characters not mending broken limbs. #42594

Merged
merged 1 commit into from
Jul 31, 2020
Merged

Fix trait-less characters not mending broken limbs. #42594

merged 1 commit into from
Jul 31, 2020

Conversation

moxian
Copy link
Contributor

@moxian moxian commented Jul 31, 2020

Summary

Right now trait-less characters cannot heal broken limbs at all. Even with splint on the limb never gets mending effect ("Started recovery").
This PR fixes that.

SUMMARY: [Bugfixes] "[Fix mending of limbs for trait-less characters]"

Purpose of change

Fixing the bug.

Steps to reproduce:

  • make a new character with no traits
  • break a limb
  • put on a splint
  • see the limb is "disabled" and never gets "started recovery"
  • wait however long you like
  • see it not getting better
  • add a trait (self-aware is nice)
  • see "Started recovery" effect appearing.
  • waiting more time makes the limb fully heal.

Describe the solution

Currently default mutation mending_modifier is set to 1.0, but when no mutations are present, mutation_value( "mending_modifier" ) returns zero, which is the starting/default value in calc_mutation_value.

Solution is to treat mending_modifier as multiplicative, as it was intended

Describe alternatives you've considered

None.

Testing

Built the game, put on the splint, got "Started recovery (right leg)" effect.

Additional context

The bug was introduced in #37987 ; cc @anothersimulacrum

Default mutation mending_modifier is set to 1.0, but when no mutations
are present, `mutation_value( "mending_modifier" )` returns zero, which
is the starting/default value in `calc_mutation_value`.
@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies labels Jul 31, 2020
@ZhilkinSerg ZhilkinSerg merged commit 94c5604 into CleverRaven:master Jul 31, 2020
Copy link
Member

@anothersimulacrum anothersimulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants