EffectiveActorConditions track applied effects, fixes bug #119 and other issues #126
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Up to now when an effect was applied to an actor it was applied to existing conditions of the same type but not tracked. This led to problems like #119 when a higher magnitude temporary condition removed a lower magnitude infinite condition.
Now all applied effects are tracked. All the data and logic regarding conditions is encapsulated in the EffectiveActorConditions class, which replaces the conditions member of the Actor class. Most of the logic is moved away from the ActorStatsController and all views now use the EffectiveActorConditions class.
The added information does not only prevent bugs but is also displayed to the user. So he knows how many effects are sources for the current conditions and if conditions will follow when the current conditions timeout.
All this does not apply to immunities; their behaviour is unchanged.
To try to make sure everything is working like intended two integration test classes were added which should address most usecases. The tests should be run manually when changing logic regarding the actor conditions to make sure everything is still working.
Manually testing (including rejuvenate, etc) is mandatory after merging this pull request.