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

Removable constant effect bug. #119

Open
Zukero opened this issue May 7, 2019 · 0 comments
Open

Removable constant effect bug. #119

Zukero opened this issue May 7, 2019 · 0 comments

Comments

@Zukero
Copy link
Owner

Zukero commented May 7, 2019

https://andorstrail.com/viewtopic.php?f=3&t=6370

Chriz76 added a commit to Chriz76/andors-trail that referenced this issue Jun 7, 2019
This is a minimalistic fix for bug Zukero#119 and some other issues that could be used until the bigger change of the actorconditions gets finished.

-Fixes Removable constant effect bug. Zukero#119
-Fixes other cases where longer running conditions are overwritten by shorter running ones with a higher magnitude. The solution is to add the second condition but lowered by the magnitude of the longer lasting one.
-Fixed that unequipping a higher magnitude item will not reduce the magnitude when only a lower magnitude item stays equipped
Chriz76 added a commit to Chriz76/andors-trail that referenced this issue Jun 21, 2019
…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

No branches or pull requests

1 participant