-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Show consistent healing quality
Fixes an issue where healing qualities shown when applying a bandage was different than the applied quality. The problem before was: * For example, applying an adhesive bandage with "wound care" proficiency should give bandaging intensity 2, as returned from `get_bandaged_level` - this is correct. * The `bandaged` effect as defined in `effects.json` specifies `int_dur_factor=6h`, so the intensity of this effect should be defined by setting its duration as multiples of `int_dur_factor`. * When calculating the duration for the created effect, the code previously added `0.5f` to the desired intensity, likely to prevent it from getting 0. <- This was one part of the previous problem. * In `effect::set_duration`, the intensity is calculated from how many multiples of `int_dur_factor` that the desired `duration` is. That calulation added 1 to the desired intensity, likely to also prevent it from being 0. <- This was the second problem before. * In effect, instead of applying intensity 2 for an adhesive bandage, the code previously applied intensity 3.5 . With this commit, we instead use `std::max(1, intensity)` to prevent intensity from being 0.
- Loading branch information
Showing
4 changed files
with
21 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters