smogon / pokemon-showdown

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

Validate egg moves for Pre-Bank formats #2954

Closed Slayer95 closed 7 years ago

Slayer95 commented 7 years ago

[00:16] CelesteelaVGC: http://pastebin.com/Dy5a5JYC [00:16] CelesteelaVGC: these egg moves aren't legal on cart until pokebank is released

Slayer95 commented 7 years ago

Maybe we can have new learnset source categories, since the Pokebank / pentagon business is probably here to stay, say:

7E: Can be learnt through breeding, no restrictions. 7EP: Can be learnt through breeding, requires Pokebank parents (or, in general, forward gen trade)

Zarel commented 7 years ago

Nah, we just need to interpret "no valid parent" as "not a valid egg". Not really that hard afaik.

Zarel commented 7 years ago

https://github.com/Zarel/Pokemon-Showdown/blob/1d6ac79158e13506434c58b53353bc82c3d0959e/team-validator.js#L792

This line just needs to be replaced with a rejection (i.e. continue) in the case of tiers with the possibility of unavailable egg moves.

Slayer95 commented 7 years ago

Isn't that the expensive way?

Zarel commented 7 years ago

That's more expensive, you can cache a list but it should probably exist outside of learnsets.js

Slayer95 commented 7 years ago

Fixed in eed37b63b27bf and badbc1f193