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.19k stars 1.66k forks source link

[BUG] Managing 2-Move Starter's Move Crashes the Game #2844

Open Endermage77 opened 1 month ago

Endermage77 commented 1 month ago

Describe the bug When starting a new game, if you try to change the move of a pokemon that only has one move using the Manage Moves menu, it causes the game to freeze, forcing you to reset. This is most noticeable with Smeargle, who only has Sketch if you haven't yet unlocked any of its egg moves.

To Reproduce

  1. Begin a New Game
  2. Select a starter with exactly one move available (e.g. Smeargle)
  3. Select "Manage Moves"
  4. Attempt to swap out the starter's move
  5. Crash occurs

Expected behavior I was personally expecting nothing to happen or a message saying something to the tune of "No other moves available." to display.

Screenshots / Videos The game frozen at the moment of the crash: image

When the crash occurs, this error gets thrown in the console: image

Device Playing on a Google Chrome browser on Windows 10 PC.

Additional context

lnuvy commented 4 weeks ago

@Endermage77 Hi, I found out that it was a bug and opened a PR for it. Thanks for reporting issue!