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 negative rest quality #72892

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

RenechCDDA
Copy link
Member

@RenechCDDA RenechCDDA commented Apr 7, 2024

Summary

Bugfixes "Rest quality is not always positive, negative rest quality will slow your bandaged healing "

Purpose of change

Describe the solution

Character::activity_level() always returns NO_EXERCISE except when sleeping, which meant that even while digging ditches it thought you were resting peacefully. This gave 30-50% faster medicine healing, for everyone, always. Yikes.

I do not really understand why it does that, but switching to Character::instantaneous_activity_level() returns the actual activity level... So that was an easy swap.

Other change: Unclamp rest quality in healing_rate_medicine so negative rest quality actually detracts from your healing.

Update docs to mention how rest quality works.

Describe alternatives you've considered

#68395

Testing

Healing tests pass locally, some extra-extra debug output (not present in commit) was doubly, triply checked to make sure the healing_rate_medicine was changing.

Additional context

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs <Bugfix> This is a fix for a bug (or closes open issue) labels Apr 7, 2024
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Apr 7, 2024
@Maleclypse Maleclypse merged commit f557194 into CleverRaven:master Apr 8, 2024
26 of 30 checks passed
@RenechCDDA RenechCDDA deleted the fix_negative_rest_V2 branch April 8, 2024 04:53
@Procyonae Procyonae added the 0.H Backport PR to backport to the 0.H stable release canddiate label May 20, 2024
Procyonae pushed a commit to Procyonae/Cataclysm-DDA that referenced this pull request May 24, 2024
@Procyonae Procyonae mentioned this pull request May 24, 2024
kevingranade pushed a commit that referenced this pull request May 26, 2024
Fix negative rest quality

Co-authored-by: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com>
@Procyonae Procyonae added 0.H Backported and removed 0.H Backport PR to backport to the 0.H stable release canddiate labels May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.H Backported 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) [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants