Like move validation, evolutions are the earliest thing we wish to traverse when determining what encounters may have originated the current Pokémon. To determine the permitted species-form-levels a Pokémon could originate with, we must devolve a Pokémon by traveling down-generation to origin. Once we have an encounter, we can then evolve it to the current species, traversing upwards from origin to the current format.
Updates from net46->net7, dropping support for mono in favor of using the latest runtime (along with the performance/API improvements). Releases will be posted as 64bit only for now.
Refactors a good amount of internal API methods to be more performant and more customizable for future updates & fixes.
Adds functionality for Batch Editor commands to `>`, `<` and <=/>=
TID/SID properties renamed to TID16/SID16 for clarity; other properties exposed for Gen7 / display variants.
Main window has a new layout to account for DPI scaling (8 point grid)
Fixed: Tatsugiri and Paldean Tauros now output Showdown form names as Showdown expects
Changed: Gen9 species now interact based on the confirmed National Dex IDs (closes#3724)
Fixed: Pokedex set all no longer clears species with unavailable non-base forms (closes#3720)
Changed: Hyper Training suggestions now apply for level 50 in SV. (closes#3714)
Fixed: B2/W2 hatched egg met locations exclusive to specific versions are now explicitly checked (closes#3691)
Added: Properties for ribbon/mark count (closes#3659)
Fixed: Traded SV eggs are now checked correctly (closes#3692)
Can unroll the loop, but would look more ugly :)
JIT will probably do it for us.
Fix <= to < for IVs
Inline temp var (start is unused after assigning to low)
Big thanks to Parzival from the RNG discord community for chiseling the LCRNG search space down to the best performing implementation possible.
50x? Down from O(2^8) -> O(2^3) is 32x, but we no longer need to access two heap arrays (262KB no longer needed!). Everything can be calculated tightly with the stack.
f641f3eab2/RNG/LCG_Reversal.py (L31)
Rainbow tables is the only faster implementation. However, nobody is gonna hog many GB of RAM for O(1) reversals. This is ~O(2^3), down from O(2^8). Much better than the days of O(2^16)!
ShowdownSet: Lessen allocation
MoveTutor: Remove boxing by calling the generic method instead of object method
Xoro8b: Add more xmldoc, use positive constant instead of inverse negative for parity
StadiumUtil: Use built-in endianness reversal methods
Adds structures to read/write saved spawner data such as seeds, counts.
Adds generator and validator to emulate the FixInitSpec builder used by the game logic
Similar to SW/SH raids, validating these in-process is not feasible due to the number crunching required.
This does not handle the encounter slot call or the follow-up level range call. Just the inner FixInitSpec ctor & fill.
level is calc'd:
randFloat(sum) -> slot float
rand.Next() -> gen_seed (for all the details)
rand.NextInt(delta) +min -> level
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Existing `get`/`set` logic is flawed in that it doesn't work on Big Endian operating systems, and it allocates heap objects when it doesn't need to.
`System.Buffers.Binary.BinaryPrimitives` in the `System.Memory` NuGet package provides both Little Endian and Big Endian methods to read and write data; all the `get`/`set` operations have been reworked to use this new API. This removes the need for PKHeX's manual `BigEndian` class, as all functions are already covered by the BinaryPrimitives API.
The `StringConverter` has now been rewritten to accept a Span to read from & write to, no longer requiring a temporary StringBuilder.
Other Fixes included:
- The Super Training UI for Gen6 has been reworked according to the latest block structure additions.
- Cloning a Stadium2 Save File now works correctly (opening from the Folder browser list).
- Checksum & Sanity properties removed from parent PKM class, and is now implemented via interface.
Big thanks to @SciresM @sora10pls @Lusamine @architdate @ReignOfComputer for testing and contributing code / test cases. Can't add co-authors from the PR menu :(
Builds will fail because azure pipelines not yet updated with net6.