PKHeX/PKHeX.Core/Legality/Encounters/Data
Kurt 9166d0eb64
Refactoring: Move Source (Legality) (#3560)
Rewrites a good amount of legality APIs pertaining to:
* Legal moves that can be learned
* Evolution chains & cross-generation paths
* Memory validation with forgotten moves

In generation 8, there are 3 separate contexts an entity can exist in: SW/SH, BD/SP, and LA. Not every entity can cross between them, and not every entity from generation 7 can exist in generation 8 (Gogoat, etc). By creating class models representing the restrictions to cross each boundary, we are able to better track and validate data.

The old implementation of validating moves was greedy: it would iterate for all generations and evolutions, and build a full list of every move that can be learned, storing it on the heap. Now, we check one game group at a time to see if the entity can learn a move that hasn't yet been validated. End result is an algorithm that requires 0 allocation, and a smaller/quicker search space.

The old implementation of storing move parses was inefficient; for each move that was parsed, a new object is created and adjusted depending on the parse. Now, move parse results are `struct` and store the move parse contiguously in memory. End result is faster parsing and 0 memory allocation.

* `PersonalTable` objects have been improved with new API methods to check if a species+form can exist in the game.
* `IEncounterTemplate` objects have been improved to indicate the `EntityContext` they originate in (similar to `Generation`).
* Some APIs have been extended to accept `Span<T>` instead of Array/IEnumerable
2022-08-03 16:15:27 -07:00
..
EncounterEvent.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters1.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters2.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters3.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters3GC.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters3Shadow.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters3Teams.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters4.cs Refactoring: Move Source (Legality) (#3560) 2022-08-03 16:15:27 -07:00
Encounters5.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters6.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters7.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters7b.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters8.cs Add missing static Loop Lagoon Gyarados 2022-07-22 18:15:24 -05:00
Encounters8a.cs Create initial movesets for Alpha entities correctly, verify initial mastery (#3489) 2022-05-06 15:43:23 -07:00
Encounters8b.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters8Nest.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters8NestCrystal.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters8NestDistBase.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters8NestDistDLC1.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
Encounters8NestDistDLC2.cs Add latest distribution raid data 🐇 2022-06-30 20:07:03 -04:00
Encounters8NestLair.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
EncounterServerDate.cs Check met date of WA8/WB8 less than current moment 2022-06-05 10:56:17 -07:00
EncountersGO.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
EncountersWC3.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00
EncounterUtil.cs File scoped namespaces (#3529) 2022-06-18 11:04:24 -07:00