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

Don't increase broken bones stat when bones are already broken #55458

Merged
merged 2 commits into from
Feb 21, 2022

Conversation

haveric
Copy link
Contributor

@haveric haveric commented Feb 17, 2022

Summary

Bugfixes "Don't increase broken bones stat when bones are already broken"

Purpose of change

Fixes #54069

Describe the solution

Check to see if the bone was broken before applying damage and only increase the stat on newly broken bones

Describe alternatives you've considered

None

Testing

Debug damaged myself a limb. Continually damaging the limb after being broken no longer increased the stat.
Debugged limb health back and damaged it again, stat still increases.

Additional context

image

@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Feb 17, 2022
@Maleclypse Maleclypse added <Bugfix> This is a fix for a bug (or closes open issue) Game: Achievements / Conducts / Scores Player goals and how they are tracked. labels Feb 17, 2022
@anothersimulacrum
Copy link
Member

anothersimulacrum commented Feb 17, 2022

This looks like it will crash if a monster is damaged - as_character can only be used if the creature is a character, and monsters are not.

@haveric haveric marked this pull request as draft February 17, 2022 22:27
@haveric
Copy link
Contributor Author

haveric commented Feb 17, 2022

This looks like it will crash if a monster is damaged - as_character can only be used if the creature is a character, and monsters are not.

I didn't notice any issues when testing, but I added another avatar check for safety either way.

@haveric haveric marked this pull request as ready for review February 17, 2022 23:09
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Feb 17, 2022
@ZhilkinSerg ZhilkinSerg merged commit 944ae8a into CleverRaven:master Feb 21, 2022
@haveric haveric deleted the broken-bones branch February 25, 2022 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) Game: Achievements / Conducts / Scores Player goals and how they are tracked. json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'Broken But Not Defeated' achievement's broken limb detection is broken.
4 participants