Closes#3921
Not sure if the RTC handling is correct (always 0x20 length?) but at least we have a non-fixed-sized header handled with some leniency for different builds.
* SaveBlock Constructor Changes
- Add primary constructor for SaveBlock with default offset
- Update SaveBlock subclasses to specify offset in contructor rather than as the constructor body
* Fix MyItem Subclasses Using SaveFile Rather Than Specific Classes
- Improve Epoch 1900 classes using similar logic from PlayTime7b.
- Move Time Classes into non Gen specific folder since it appears the logic is shared across a few of them.
- Use Epoch1900DateTimeValue for LastSaved in PlayTime7b since the logic is the same.
- Remove TeamIndexes9 since it is a duplicate of TeamIndexes9. Use the similar pattern like Box8 where it is reused in multiple locations.
- Add BlueberryClubRoom9 to ISaveBlock9Main since it wasn't added when the class was introduced.
- Simplify RaidSevenStar9 creation since GetBlockSafe does basically what the if-else block does.
- Change SAV8SWSH Base Raid to RaidGalar to match the same way the SAV9SV does for its Base Raid.
In addition to the Method 1 (and other sibling PIDIV types) correlation, an encounter can only be triggered if the calls prior land on the Method {1} seed. The RNG community has dubbed these patterns as "Method J" (D/P/Pt), "Method K" (HG/SS), and "Method H" (Gen3, coined by yours truly). The basic gist of these is that they are pre-requisites, like the Shadow locks of Colosseum/XD.
Rename/re-type a bunch of properties to get the codebase more in line with correct property names & more obvious underlying types.
ShowdownSet: Fix indentation, use explicit const
ItemStorage8BDSP: Rename GetAll->GetAllHeld to match others
EncounterLearn: Guard against >4 length enumerables, use explicit versions for S/V
EggMoves: Read u16[] directly rather than manually
SaveFinder: simplify expression
SAV_Database: extract func
SAV_Encounters: use RoM to match Moveset generator
Closes#4128
I don't want to decipher to manual interactions to the Battle Frontier structures now. Prints were just work values, and fly flags were event flags.
* Handle Seven Star Raids Change From Teal Mask Update
* Refer To RaidSevenStarCaptured9.CountAll Rather Than Recalculate It
* Fix Wrong SevenStarRaid Size Variable Referenced
While they are the same value correcting the mistake so that there isn't confusion while looking at the code.
Use an enum to know which raids to use rather than passing the specific raids so that the save changes copy back operation only happens when a user saves modifications and thus won't flag the save as modified if nothing was changed.
Closes#4072
ty @Lusamine for checking japanese and english for complete clarity on this multi-year flip-flop.
historically, we used 0xFB.bit0 until jpn complained, changing it to 0xC9.bit4 to match the pk3 struct. Both were correct, and neither were correct.
Closes#4047
SetSeen(species) will set the seen flag but leave both bits 0-0; old code would SetSeen and fail to revise it to 1-1. Since we're setting both to their "complete" state, a "complete" state for a single gender is just a "new" registration operation.
With the new version of Visual Studio bringing C# 12, we can revise our logic for better readability as well as use new methods/APIs introduced in the .NET 8.0 BCL.
* Named a few useful blocks
* Named a few useful blocks
* Renames for consistency as per suggestion
* Withdrawing hidden items blocks for more investigations
* Identification for Hidden Items blocks
Closes#4069
Chinese localizations copied from English (was not an available language until Gen7), contributions welcome!
Co-Authored-By: Jonathan Herbert <3344332+foohyfooh@users.noreply.github.com>