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.53k stars 1.81k forks source link

[BUG] Hadron Engine does not activate if you exit out of switch menu #1688

Open Terrorforge opened 5 months ago

Terrorforge commented 5 months ago

Describe the bug When you go to a new biome and your lead pokemon has Hadron Engine, the ability activates and sets up Electric Terrain.

However, if you get the "Will you switch Pokemon?" prompt, select "Yes" and then exit out of the menu, Hadron Engine will not activate and no Electric Terrain will be set.

To Reproduce

  1. Have a pokemon with Hadron Engine in the lead
  2. Enter a new biome
  3. Select "No" on the switch prompt
  4. Confirm that Electric Terrain is set
  5. "Save and Quit" from the menu
  6. Reload save
  7. This time, select "Yes" on the prompt, then cancel out of the menu
  8. Confirm that Electric Terrain is not set

Expected behavior Ability behavior does not change based on how you manipulate menus.

Device Chrome on PC.

Additional context Should orobably also check if this is also true of Electric Surge, Grassy Surge, etc.

Session file where my Mega Latias/Miraidon fusion has just entered a new biome: sessionData_Terrorforge_HadronEngine.zip

Terrorforge commented 5 months ago

Hm. I tested it again, but now it won't activate Hadron Engine when I load back in after a save and quit no matter what I do. Let me check a few more things.

Terrorforge commented 5 months ago

Okay, I figured it out.

I'm playing Endless. When I get the standard biome shift at the end of every 10 waves, it works as I described, including when I save and quit and reload.

However, when I get a biome shift in between that, it works like I described - but when I save and quit, the game doesn't seem to preserve the fact that I just changed biomes, and I don't get the Hadron Engine activation no matter what.

vehumet commented 5 months ago

https://github.com/pagefaultgames/pokerogue/issues/1843#issuecomment-2157086228

I've attached the reproduce of this bug to above link.