PKHeX/Tests/PKHeX.Core.Tests/Legality
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
..
Illegal Swap lgpe sandshrew/vulpix version restrictions 2021-01-05 17:30:14 -08:00
Legal Add Breeding move ordering logic, and use in legality analysis (#3183) 2021-04-04 18:30:01 -07:00
BreedTests.cs Add Breeding move ordering logic, and use in legality analysis (#3183) 2021-04-04 18:30:01 -07:00
LearnabilityTests.cs Make parsing flexible / diacritic insensitive 2019-03-18 18:09:48 -07:00
LegalityData.cs c#9 is not sugar 2020-12-22 21:24:41 -08:00
LegalityRules.cs Split encounter areas, relocate slot finding to obj 2019-09-12 23:20:52 -07:00
LegalityTests.cs Upgrade netcore build to NET 5.0 2020-11-14 08:20:48 -08:00
RaidTests.cs Verify full raid result with known seed 2020-01-23 00:11:07 -08:00
ShadowTests.cs Fix shiny check behavior for XD nonshadows 2020-03-11 19:18:58 -07:00