Fix stale Leech Seed visual after Shed Tail switch#2611
Closed
frxyoz wants to merge 1 commit intosmogon:masterfrom
Closed
Fix stale Leech Seed visual after Shed Tail switch#2611frxyoz wants to merge 1 commit intosmogon:masterfrom
frxyoz wants to merge 1 commit intosmogon:masterfrom
Conversation
Member
|
Wait, why are we copying volatiles with Shed Tail in the first place? |
Author
|
Could it be that the code might've been forked from the baton pass code? |
Member
|
I'd probably suggest fixing that part, then. If you can link to a Shed Tail replay, I can look into that. |
Author
|
Here's a replay I grabbed from the original issue https://replay.pokemonshowdown.com/gen9randombattle-2311255360 Luxray has the leech seed overlay, but it can be cleared with skipping forward. |
Member
|
Though I didn't end up using your code, do note that I still appreciate your contribution, and it helped me figure out what was wrong! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes a client-side visual desync where Leech Seed particles could remain on the incoming Pokémon after a seeded user switched out with Shed Tail.
Root cause: volatile state in copyVolatileForm reused shared object references, then removed entries without fully clearing source-side sprite effects.
Fix: clone boosts/volatiles instead of aliasing, and clear source volatile visuals after transfer so old effects (including Leech Seed) are removed reliably.
Changed file: play.pokemonshowdown.com/src/battle.ts
Validation: local build succeeds (npm run build), TS compile passes.
Closes https://github.com//issues/2447