Ishadijcks / Ishadijcks.github.io

PokéClicker
15 stars 32 forks source link

Champion doesn't have fifth pokemon #11

Closed Wofi closed 8 years ago

Wofi commented 8 years ago

The Champion's fifth pokemon (which should vary based off the player's starter) doesn't appear even though it's defined in the code.

diff-by-default commented 8 years ago

Looks like the first time you load the game (or reset), the loadTowns() function is getting called before you actually choose a starter. Refreshing the page after you have a starter selected will re-load the array and correctly load the last Champions pokemon.

The code in question can be found here

Ishadijcks commented 8 years ago

Thank you so much, I totally missed that. I was trying to reproduce but couldn't.

Ishadijcks commented 8 years ago

Fixed, towns are now also loaded after a starter is picked.