Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Fix: Prevent stacking of Effects #18

Closed
wants to merge 5 commits into from

Conversation

paullessing
Copy link
Contributor

Fixes #16

It seems that for some reason, the code managed to get itself into a state where the previously applied Effects were not recognised as having already been applied. As a result, Effects were not being removed when there were duplicates if the Effect tier was the same as the previous tier, which caused massively stacking effects.

This change updates the code so that regardless of the existing tier, we always delete other Effects (there can only be one). Then we update the effect to match what the encumbrance should be.

The core part of this code is in commit 5c4dd44 which can be reviewed standalone; the remainder of the commits are simplifications to the code. I can drop these commits if you don't feel they are appropriate.

@paullessing paullessing changed the title Fix: Use constants for effect modes Fix: Prevent stacking of Effects Jan 3, 2021
@paullessing
Copy link
Contributor Author

This bugfix does not seem to work; I had the issue reoccurring in a game last week. I suspect it's caused by a race condition when two people (in my case DM and a player) have the same character sheet open. Will sort this weekend.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Giant negative movement numbers in 5E 1.2.0, 0.7.8
1 participant