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

EffectiveActorConditions track applied effects, fixes bug #119 and other issues #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Chriz76
Copy link

@Chriz76 Chriz76 commented Jun 21, 2019

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.

…and other issues

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 Zukero#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant