pagefaultgames / pokerogue

A browser based Pokémon fangame heavily inspired by the roguelite genre.
https://pokerogue.net
GNU Affero General Public License v3.0
4.36k stars 1.74k forks source link

Bug: Summoning abilities don't activate when reloading a session. #1005

Open 0zuzu opened 4 months ago

0zuzu commented 4 months ago

When reloading a session (battle), the game only activates summoning abilities like Drought, Intimidate, etc if they meet one of these 3 criteria:

This logic doesn't include all scenarios where summoning abilities should trigger, like going from a single to a double battle or changing biomes in endless where it can happen on nearly any floor.

It's also built on a flaw: When reloading a session, all Pokemon on the field are sent out, including the ones who were supposed to already be there.

To fix this issue, I propose storing the current allied Pokemons on the field when saving a session. Then, when loading it, only activate summoning abilities of the Pokemon who weren't on the field when the session was saved.

This, together with #694 should fix most if not all bugs pertaining to reloading sessions.

Drought and Psychic surge are both activated when switching biomes in endless: image

After reloading the fight neither activate: image

happinyz commented 4 months ago

I have a PR to address this: https://github.com/pagefaultgames/pokerogue/pull/694

0zuzu commented 4 months ago

I have a PR to address this: #694

This bug is mainly centered around summoning abilities being ignored when reloading a session. It's not just about battle tags not being saved in a session. But together with your PR it should solve most if not all problems with loading a session.

Snailman11 commented 1 month ago

Link to Discord's bug report (Intrepid Sword not activating as usual after refresh/reload) https://discord.com/channels/1125469663833370665/1237884920156655678

Using overrides and starting on a certain wave makes that wave valid for this bug.

Happens on waves that end in 6 now after the endless update as part of August's beta merge

-Reloading after reloading on a wave that ends in 1 or 6 will also not apply the ability.

Snailman11 commented 1 month ago

Psychic Surge https://github.com/pagefaultgames/pokerogue/issues/2643

Snailman11 commented 3 weeks ago

https://github.com/pagefaultgames/pokerogue/issues/1843 (Convo about this, in that case it might've been this one and a combination of #3482 )

Snailman11 commented 3 weeks ago

https://github.com/pagefaultgames/pokerogue/issues/2313 (Delta Stream not activating on refresh and second slot) Pokemon in the 2nd Slot don't properly set their ability on reload independently of the wave)