smogon / pokemon-showdown

Pokémon battle simulator.
https://pokemonshowdown.com
MIT License
4.72k stars 2.76k forks source link

Legendary & mythical flags #8141

Closed darrenswhite closed 3 years ago

darrenswhite commented 3 years ago

Hi,

Would it be possible to add flags to data/pokedex.ts to indicate whether a Pokémon is legendary or mythical?

I'd be happy to create a PR if this is acceptable.

Thanks.

Zarel commented 3 years ago

Honestly, this is a good idea. Is there any reason why we don't already do this?

darrenswhite commented 3 years ago

Not sure. I was looking around for a flag and couldn't find one. The only logic for determining legendary/mythical status I could find was here: https://github.com/smogon/pokemon-showdown/blob/afb15b82f0bdc61f83477e8bb2d4a1f4473e28a9/sim/team-validator.ts#L797

That led me to PokeAPI which has both flags (is_legendary and is_mythical).

Via PokeAPI: https://pokeapi.co/api/v2/pokemon-species/151 Via PokeAPI GH: https://github.com/PokeAPI/pokeapi/blob/master/data/v2/csv/pokemon_species.csv

Zarel commented 3 years ago

There's a long ongoing discussion on Discord, if you'd care to join ( https://psim.us/devdiscord ).

There seems to be lots of contention on how you define "legendary" and "mythical". Apparently the terms can be ambiguous.

ghost commented 3 years ago

Delayed comment but stealing this :^)

Zarel commented 3 years ago

Just ref #8142 so the PRs link to each other <_<

Zarel commented 3 years ago

Done in #8142

Wow, this took an entire month due to a lot of delays, most recently in #8218. But oh well, it's done now!

Zarel commented 3 years ago

(But do tell if you need a new NPM package, otherwise that'll probably be a bit longer.)