ty @Atrius97 for finally nailing the repro on this
Co-Authored-By: Atrius97 <39707481+Atrius97@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Only allocations that remain are the runtime `new string(...)` that is required for the gen1-5 species name quirks.
Inlines some logic for language fetch, and requires slightly less memory.
Many years ago, PKX used to be a >4,000 line bloated file, which spun off multiple classes like CommonEdits and most of the early non-GUI PKM related logic. Now, it's just a stub to source the latest generation & personal table.
Separate files = more concise info, and more room to grow to do more advanced things.
Makes the IsPresent methods public (no longer internal).
* Draft checks for encounter slot mastery
* Check encounter mastery flags
* Add moves for LA static encounters that don't follow learnset
* Add moves on crossover LA static encounters
* add alpha moveset population method
Now generates and applies moves as the game does
Updates some handling of other methods to use Span
* Show better message for bad mastery init flags
* Insert descending if candidates have same level
Level 78 Yanmega:
- [01] [10] Quick Attack
- [06] [15] Gust
- [11] [20] Silver Wind
- [18] [28] Hypnosis
- [25] [35] Air Slash
- [34] [45] Ancient Power
- [43] [54] Crunch
- [43] [54] Bug Buzz
Yields:
AlphaMove
Crunch*
Bug Buzz*
Ancient Power
* Descending order due to iteration
Co-authored-by: Lusamine <30205550+Lusamine@users.noreply.github.com>
Add Get/Set Relearn method to PKM.cs
Alpha Mastered move now indicates incomplete text entry (like moves/relearn)
Split up legal move indication helper class, use DI to allow other implementations of DataSource to be returned (pkhex mobile?).
Remove unused gender refresh method (see previous added UserControl commit)
Add helper method to center control within control
Instantiating from template now follows group seed -> spawn 1 correlation, including alpha move.
Differentiates static encounters that don't follow the ow8a correlation, scrambles EC to disassociate.
Adds rand64 to get initial seeds
Set correct level range to match slotSeed; not respecting the slot roll being valid, but whatever.
net6 was 4x faster than 461 with the old implementation; now it is faster for both but not as disparate.
New implementation performance is always at least 30% better than the old implementation; even better for smaller chunks of data (40% less time).
Pretty much mimics bare metal value writes
* Reuses move parse result objects for each encounter parsed in a LegalityCheck attempt, instead of creating a new object.
* Ensures the objects are never-null, and makes cleanup easier.
Slightly adjusts some other parts of the moveset validation to reduce allocations.
Was writing kor string, then writing en after (all terminators).
Make method signature match other SetString, with write buffer as first arg
Closes#3440
* Accurately implement height/weight calc
* Handle GUI reads
Having Auto off will read and write the values correctly
F6 will handle all the decimal points possible
* Remove no longer needed tolerance check