pokeclicker / pokeclicker

The new and improved version of the popular idle/incremental PokéClicker
https://www.pokeclicker.com
559 stars 324 forks source link

[BUG] Pokémon with weather/special requirements not working correctly with !pokemon #1221

Closed PixLSteam closed 3 years ago

PixLSteam commented 3 years ago

Info

Description: When looking up a Pokémon with a weather requirement, it does not recognize the Pokémon marked as "special" encounters. This includes Castform, which requires a specific weather for you to encounter it on Hoenn Route 119.

Steps to Reproduce:

  1. Go to #bot-commands on the Discord server.
  2. Enter !p 351

Expected Behavior: The bot should be able to tell you where to encounter it, including the weather requirement.

Screenshots: image

Additional Information: PokemonHelper.getPokemonRegionRoutes only looks for the name as a string entry in one of the encounter types. As special encounters are wrapped in a SpecialRoutePokemon object, these do not pass the requirements. I haven't found any references to PokemonHelper.getPokemonLocations in this repo, so I'm fairly certain it's only used by the bot.

unclebanks commented 3 years ago

This would be better placed on the bots repo.

PixLSteam commented 3 years ago

The bot just takes the information from the function I mentioned, so fixing it here and then rebuilding the bot's data should probably fix this.

PixLSteam commented 3 years ago

Fixed in https://github.com/pokeclicker/pokeclicker/commit/806b8e9a5555b6a5e592cae6581af28713b1c718