PKHeX/Tests/PKHeX.Core.Tests/Legality/Legal
Kurt 0626b0c29b
Add Breeding move ordering logic, and use in legality analysis (#3183)
* Initial bred moveset validation logic

Unpeel the inheritance via recursion and permitted moves

* Volt tackle considerations

* Optimize out empty slot skips

* Add tests, fix off-by-one's

* Require all base moves if empty slot in moveset

* Add test to prove failure per Anubis' provided test

* Tweak enum labels for easier debugging

When two enums share the same underlying value, the ToString/name of the value may be either of the two (or the last defined one, in my debugging). Just give it a separate magic value.

* Fix recursion oopsie

Also check for scenario where no-base-moves but not enough moves to push base moves out

* Add Crystal tutor checks

* Add specialized gen2 verification method

Game loops through father's moves and pushes in one iteration, rather than checking by type.

* Add another case with returning base move

* Add push-out requirement for re-added base moves

* Minor tweaks

Condense tests, fix another off-by-one noticed when creating tests

* Disallow inherited parent levelup moves

Disallow volt tackle on Gen2/R/S

* Split MoveBreed into generation specific classes

Gen2 behaves slightly different from Gen3/4, which behaves slightly different from Gen5... and Gen6 behaves differently too.

Add some xmldoc as the api is starting to solidify

* Add method overload that returns the parse

Verify that the parse order is as expected

* Add reordering suggestion logic

Try sorting first, then go nuclear with rebuilding.

* Return base moves if complete fail

* Set base moves when generating eggs, only.

* Use breed logic to check for egg ordering legality

Don't bother helping for split-breed species
2021-04-04 18:30:01 -07:00
..
General Add Breeding move ordering logic, and use in legality analysis (#3183) 2021-04-04 18:30:01 -07:00
Generation 1 Tradeback Port tests to .Net Core (#2156) 2018-11-06 15:25:35 -08:00
Generation 2 Fix bad test case data 2021-01-01 10:51:50 -08:00
Generation 3 Handle gen3 mismatched ability 2021-03-20 11:22:56 -07:00
Generation 4 Add gender changed azurill evo pokewalker edge case 2019-05-15 17:14:48 -07:00
Generation 4 EncounterType Add special set operation for alph rocksmash 2019-01-27 11:08:21 -08:00
Generation 4 Transfer Port tests to .Net Core (#2156) 2018-11-06 15:25:35 -08:00
Generation 5 Revise g5 pid bit check for forced PID statics 2020-10-12 11:04:29 -07:00
Generation 6 Refactoring some IEncounterable-type'd object initialization and original-generation evo chain (#2974) 2020-08-21 16:35:49 -07:00
Generation 6 Static Fix Static/Gift IV method call (#2310) 2019-05-15 12:07:48 -07:00
Generation 7 Static Fix Static/Gift IV method call (#2310) 2019-05-15 12:07:48 -07:00
Generation 7 Transfer Fix bad test case data 2021-01-01 10:51:50 -08:00
Generation 7 Wild Fix bad test case data 2021-01-01 10:51:50 -08:00
Generation 8 Check for dual ability =>evo w/single ability capsule 2021-03-20 17:49:16 -07:00