pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

Fix arena tags not being applied on session load

Open happinyz opened this issue 9 months ago • 4 comments

This PR addresses a reported issue where hazards were being removed when loading a save session: https://github.com/pagefaultgames/pokerogue/issues/684 I've verified that this fix works for other Arena Tags, as well as loading a save from the 'Load Game' option.

Stealth rock:

https://github.com/pagefaultgames/pokerogue/assets/59787978/41bacb1c-acd4-499c-9941-2f82ec5583ae

Spikes/Toxic Spikes:

https://github.com/pagefaultgames/pokerogue/assets/59787978/6b2bcd2d-4489-4e4f-a557-6b141e1cb938

Wish:

https://github.com/pagefaultgames/pokerogue/assets/59787978/a4c03425-8019-4ccb-92cd-97dfae252a9d

happinyz avatar May 09 '24 22:05 happinyz

I doubt this is going to work, so I'll just ask about some of the cases where I expect it not to work.

Has this been tested with multiple layers of spikes to ensure it maintains the correct amount of layers? Toxic spikes has layers too that could be tested. Has this been tested with wish to ensure it still heals and heals the correct amount?

You can look at what I did with battlerTag save/loading for a reference if you want, but it wound up needing significantly more than this.

Xavion3 avatar May 09 '24 22:05 Xavion3

I doubt this is going to work, so I'll just ask about some of the cases where I expect it not to work.

Has this been tested with multiple layers of spikes to ensure it maintains the correct amount of layers? Toxic spikes has layers too that could be tested. Has this been tested with wish to ensure it still heals and heals the correct amount?

You can look at what I did with battlerTag save/loading for a reference if you want, but it wound up needing significantly more than this.

You were right, those cases failed in my initial implementation. I've updated the PR to account for these cases, and posted demo videos. Thanks for mentioning your work with the battler tags, that really helped!

happinyz avatar May 09 '24 23:05 happinyz

@Xavion3 Could you give this another look? Thanks!

happinyz avatar May 10 '24 19:05 happinyz

Is this tested against tags with custom private data like wish?

Yes, the main description of the PR has a demo video for Wish. Are there other specific tags you'd like me to test?

happinyz avatar May 21 '24 06:05 happinyz

Closing due to inactivity and merge conflicts. If this is still required, feel free to open a new PR

Tempo-anon avatar Jul 11 '24 17:07 Tempo-anon