Ensure GO IVs are respecting the min floor
Add some comments, reuse PersonalInfo reference instead of refetch
Fix Hoopa Unbound SlotWrite changing to 3
Check HT move memories in Gen9 appropriately for deferral cases
Add missing ID32 set for GO8->PKM
Slight pre-work for Mightiest Mark Mew method signatures
the groundtile bit permission was causing the Route 201 to set Water which isn't possible to encounter them on, so use the lowest bit instead of highest bit
EncounterEgg now indicates FixedBall(Poke) for Gen2-5
EncounterSlot2 now indicates Form Random for Gen2 Unown, database
EncounterStatic3 now generates FRLG Gen2 Roamers with correct location
EncounterCriteria now used more heavily for requested IVs
EncounterPossible3 now correctly skips Eggs if eggs are not requested
EncounterGift3Colo now generates Japanese Bonus disk gifts only in Japanese, doesn't validate non-Japanese
Due to how the game generates the Pokémon data, the first two (or three) RNG calls are used to set the 32-bit `EncryptionConstant` and `PID`. With 2x 32-bit and 1x 64-bit values, we can algorithmically reverse the movement & manipulation of bits to recover the initial seed. Notably, certain bits of the initial state are not captured by our first two (or three) outputs, so we must brute-force guess at the initial state, and verify the RNG's output yields the expected values.
**With the ability for real-time Xoroshiro128+ seed reversal, we can now validate RNG correlations for SW/SH raid encounters natively within the program.** For now, the legality fail error message is extremely vague and any validated seed won't be "remembered" for the Legality Parse like other RNG methods. These seeds are 64bit, while every other "remembered" `PID/IV` seed-info is 32-bit.
Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
We implement simple state machine iterators to iterate through every split type encounter array, and more finely control the path we iterate through. And, by using generics, we can have the compiler generate optimized code to avoid virtual calls.
In addition to this, we shift away from the big-5 encounter types and not inherit from an abstract class. This allows for creating a PK* of a specific type and directly writing properties (no virtual calls). Plus we can now fine-tune each encounter type to call specific code, and not have to worry about future game encounter types bothering the generation routines.
Inline logic for Meowstic form branch evo
Pass levelup byte value directly instead of recompute
With EvolutionSet all shared, reorder the constructor so the primary ctor doesn't need manually ordered properties (8 byte total struct size)
Hoopa cannot know both moves due to form reversion
Kyurem cannot know both moves due to form reversion
Kyurem cannot know Scary Face when fused in past games
Add dexnav for AtAnyTime/HOME lookback when original moveset deleted (no longer in local relearn moves)
BDSP Underground encounters w/ egg moves can be shared by other means
Relocate checksum adders to Checksums class, improve performance by eliminating slice calls
Improve HOME sharing for GO8 and IMoveset encounters: actually sanity check GO8, and skip other non-PK7/PB7 cases.
Move enum -> ushort instead of int
Redo handling of HOME Volt Tackle (disallow on SWSH Cap Pikachu)
Pass spans instead of strings to use span methods
Reset encounter filters on early abort
Reformat all pickles to the same serialization format (latest)
(format ignores all empty evo entries, to skip allocation of dead entries)
346KB -> 60.3KB, -200 lines of code
Nintendo + ILCA = no nicknames allowed ;)
While we're here, streamline Gen4/5 evo pickles too -- trim out unused bytes, no longer need to scan for array length (perf). Adjust method IDs for gen4 so we can use the same code for gen4 & gen5.
Add sound for adding all XY fashion items (was silent)
Fix Gen7 Resort PKM loading (4 bytes extra per slot)
Fix Gen6 HallOfFame TID/SID validation dropping leading zeroes
Fix Gen6 Best Friends ribbon validation
Treat GO8 as server date restricted, give detailed message outside window
HasTracker => must have HT name
No backwards transfer to LGP/E, and this behavior is only encountered if you turn off specific filtering settings as the generator filters them out afterwards.
Improve cctor times for Breeding; direct calls for splitbreed checks; inlined binary searches via generated IL instead of hashset
Fix permitting alpha ribbon on non-alphas in Gen8/8a/8b, disallow Gen8a/8b ribbons for Gen7 Alolan Raichu
Improve some IL generation of EvoChain logic
Add xmldoc for new evotree additions