[Bug] Fix #5422 Neutralizing Gas and Legendary Weather Abilities Persist After Flee #5496
+40
−2
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.
What are the changes the user will see?
Neutralizing Gas and Primordial Sea/Desolate Land/Delta Stream will clear when the user runs away from an enemy with these abilities.
Why am I making these changes?
Fixes #5422
What are the changes from a developer perspective?
All I'm doing is adding a call to
applyPreLeaveFieldAbAttrs
for each enemy on the field on flee, along with updating relevant tests with a case for this situation. The call is in a new loop preceding everything else because PreLeaveField should apply before "escaping" (i.e. before the flee success message is played - someone can test this on cart if they want, but im 99% certain as this is how all other interactions with these abilities work).I'm not using the
leaveField()
method because it does some extra housekeeping we don't want here (particularly, it would reset the sprite immediately instead of the nice fade animation we have now)Screenshots/Videos
2025-03-08.00-26-11.mp4
How to test the changes?
Automated tests or overrides with any of the affected abilities
Checklist
beta
as my base branchnpm run test
)npm run create-test
) or updated existing tests related to the PR's changes?Are there any localization additions or changes? If so: