-
Notifications
You must be signed in to change notification settings - Fork 277
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
feat: Effects adding other effects on removal #3695
feat: Effects adding other effects on removal #3695
Conversation
The Autofix app has automatically formatted this Pull Request. If you edit your PR on web UI, you can ignore this message.
If you don't do this, your following work will be based on the old commit, and cause MERGE CONFLICT. |
…Cataclysm into effect-adding-effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Tests pass
- Spawn 3x adrenaline
- Use adrenaline
- Wait for it to decay
- Apply adrenaline
- Confirm both buff and debuff exist
works as intended, however on comedown it errors with:
DEBUG : player_morale::perceived_pain is inconsistent.
FUNCTION : bool player_morale::consistent_with(const player_morale &) const
FILE : /home/scarf/repo/cata/Cataclysm/src/morale.cpp
LINE : 878
VERSION : BN 8b14530d31ec
- Wait for both to time out
- Apply adrenaline
- Use blood filtering bionic
- Confirm that adrenaline comedown is present
even after using blood filter CBM, the effect does not wear off.
…lhu/Cataclysm into effect-adding-effect
Co-authored-by: scarf <[email protected]>
a1b6779
to
022a28f
Compare
…Cataclysm into effect-adding-effect
I didn't realize that blood filter was not removing adrenaline. That's why it wasn't triggering the aftereffect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Purpose of change
This PR allows defining comedowns and similar effects that can coexist with the parent effect and can be defined by mods.
Describe the solution
When effect expires, it can create other effects, at set duration/intensity, or inheriting duration/intensity from the decaying effect.
New effects are added at the end of the effect processing loop, and so should not be able to cause effect map migration. They are added in the same order as the parent effects were processed.
There is an option to only affect decaying (0 duration) effects, only affect removed effects (
remove_effect
when duration > 0), or both.Reimplemented adrenaline and its comedown in the new system. This means that both effects can now coexist - you can have adrenaline buff with comedown debuff applied at the same time.
Describe alternatives you've considered
Testing
Additional context
Checklist