Closes#4418
Introduce a readonly record struct to contain all the settings selected. Add simple static get for none/all to disable/force the updates.
Split the UpdateRecord behavior out of UpdatePKM (adapt to save file) so that it behaves similarly to UpdateDex.
Only AdaptToSaveFile when opening a file in the PKM Editor.
* WC8: Handle HOME Keldeo
* WB7: Handle HOME Meltan fixed ability, scalars, AND HeightAbsolute and WeightAbsolute
* WB7: Fix PID get/set offset
* PB7: add ribbon get/set (Meltan has Souvenir ribbon and is retained on transfer to LGP/E)
* Legality: Verify Size Absolute for WB7 Home gifts, only check absolute scale when PB7
The function `IsTimeValid` checks if the received hour, minute, and
second of the Pokémon is below 24, 60, and 60 respectively. For some
reason the current code includes a "+1" for each check, which results in
some legitimate Pokémon being marked as having an invalid timestamp.
Fixed edge cases:
- Received on the 23rd hour.
- Received on the 59th minute.
- Received on the 59th second.
Shiny Meltan marks the first (and likely only) time where a LGPE event is server date restricted, so we need to extend those checks to include WB7s.
Also revise Manaphy & Enamorus start dates due to server date assignment logic changing at some point. In the past, it was always assigned according to UTC, but it is now determined by local server time, making January 27 possible in early time zones (Mountain, Pacific, etc.)
* Add Pokémon Day 2025 Flying Tera Type Eevee's date
* Refactor: add date bias for generate
---------
Co-authored-by: Kurt <kwsch@users.noreply.github.com>
BD/SP has Pokémon HOME as location 30018 and 40086; need to differentiate.
Revise the unit test to share the unique-check set across all location lists of that context
Ignore "empty" location values (dashes, empty). For deduplicating, ignore empty indexes as well.
Fixes shiny rayquaza
some lowering int->byte
Fix event3 random restricted seed fetch for gender
Fix gen8a encdb filters excluding static encounters, now will be properly excluded
When generating from templates with randomly correlated forms, the EncounterCriteria will now seek for a match for that feature if specified. Granted this is just a cosmetic seek for Generation 4 Unown -- Gen3 Unown is locked to a specific form for each encounter slot.
Also adds an interface to templates that expose a shortcut to SetPINGA's randomness, for those who know what seed they want to generate from. This is currently only implemented into encounters from Gen8 (Raids/8b Roamers), Gen9 (Tera Raids), and Gen3 events (Channel, as others can be found via IVs quickly -- Channel's reversal from IVs isn't performant).
* Support Gen5/3DS/Switch word filters
- Separate 3DS/Switch word filters
- Add/implement Gen5 word filter
- Adjust behavior of DisableWordFilterPastGen
* Implement halfwidth/fullwidth conversion
Only applies to alphanumeric and kana
When Max Battles first launched, the Master Ball was not available in the Poké Ball tray in the bonus challenge. This did not apply to the tutorial Wooloo or Skwovet/Wooloo from Special Research.
0.333.0, which released on September 27 2024, added a property named `canUseMasterBallPostBattle` for Max Battles. Players noted being able to use a Master Ball on Gigantamax Charizard when it debuted in the game, meaning this is the likely culprit.
Since all past Max Battles have other, less restrictive encounter methods where the Master Ball is permitted, this does not cause any potential invalid legality overlaps. Gigantamax Pokémon also can't be transferred, so they don't need to be accounted for.
* use pa8's current level for determining Mastered flag for Move Shop Records to ensure all flags are checked on encounters who learn moves close to their level mins
* use met level instead of current level to reduce unnecessary calculations
Was missing the worst case scenario; ran a bruteforce script to find a 539 after adding the final logic. We try to do the least amount of cpu instructions so this is probably the better arrangement anyway.
Revise the method signatures to exclude the scratchspace span reuse (not-obvious behavior). Just stackalloc a new span.
Add seed indication to legality formatting. #4416