Commit graph

1462 commits

Author SHA1 Message Date
Kurt
9c6f030861 Fix gen4 mystery gift misalignment
indicate the card type in the preview pane
2024-03-14 02:32:20 -05:00
Kurt
1241e6eff6 Double check some bounds checks
still have some issues with gen4 mystery gifts and some groundtile flagging (to be resolved later)
2024-03-13 00:08:10 -05:00
Jonathan Herbert
8a29320724
Minor Changes To EpochDateTime (#4214)
- Fix Epoch0000DateTime.DisplayValue  having seconds in the output even though they aren't stored
- Introduce RawYear and RawMonth in EpochDateTime to reduce duplicated logic
2024-03-11 14:07:59 -06:00
Kurt
7122c5c3f5 Fix database search returning empty w/ unfiltered
Closes #4211
Also fix box dump not creating folder and Surprise Trade block optionally existing in SV saves.
2024-03-11 13:00:08 -05:00
Kurt
b6739e5547 Fix Mystery Gift edit form save
Closes #4213
Also fixes XY/AO saves not having the button available when they should
2024-03-11 12:47:10 -05:00
Jonathan Herbert
c651c6f6cd
Deduplicate Gen 6-8 PlayTime Logic (#4208)
Slightly overengineered but a fun experiment to de-duplicate some logic.
2024-03-10 08:50:32 -06:00
BlackShark
25c7b3cc8c
Expose Gen 2 Palette to Block Editor (#4209) 2024-03-10 08:36:25 -06:00
Jonathan Herbert
78fba23eae
Replace Epoch1900DateTimeValue Duplicate Logic Instances (#4207)
* Replace LastSaved8a With Epoch1900DateTimeValue

Since LastSaved8a basically implemented the same logic, replace it and update Epoch1900DateTimeValue.DisplayValue to not display seconds if they aren't present

* Replace PlayTime8 With PlayTime7b
2024-03-09 00:41:26 -06:00
Kurt
d86469266b Enhance bv5 checksum documentation
add for gen4 so there's no more mystery on that

change span to memory for direct injecting to a bv obj
2024-03-08 21:31:17 -06:00
Kurt
994c063537 Misc tweaks 2024-03-08 21:30:21 -06:00
Jonathan Herbert
0693825f96
Correct SM and USUM GameTime7 Offsets (#4205) 2024-03-08 01:02:15 -06:00
Kurt
6dc785da0c Add gen5 battle video reads 2024-03-08 00:53:35 -06:00
Kurt
df7c25d43f Rename battle video classes, allow bv4 recognition 2024-03-07 00:34:21 -06:00
Kurt
802974a42c Add BV4 reading for SAV4
D/P don't store battle videos, so the SAV4 get will always return null for those games. Still can return null if the extdata blocks aren't present.
2024-03-06 21:02:33 -06:00
Kurt
efe0f5e0cf Update WB7Records.cs 2024-03-05 10:04:04 -06:00
Kurt
f32a1ddc7a Misc fixes
event flag editor gen5-7
rs/frlg/dp/hgss enc->pkm version choice
pb7 party stats loading
daycare slot now shows when present
remove unnecessary `GameVersion.Unknown`, use Invalid instead. Might be worth removing Invalid in favor of changing `Any=0` to `None=0`.
2024-03-05 09:42:20 -06:00
Kurt
4e87fd7eca Misc fixes
ty matt & foohyfooh
2024-03-04 23:46:11 -06:00
Kurt
fa80dac2ac
Refactoring: Rework saveblock to be Memory<byte> based (#4200) 2024-03-03 23:13:16 -06:00
Kurt
0f936f88f4 Gen3: Fix jump/berry max 9999->99990 2024-03-02 13:53:00 -06:00
BlackShark
378b28bc07
Fixed national magic for FRLG (#4199) 2024-03-02 13:51:28 -06:00
Kurt
645d65bf3b Update SaveBlockAccessor7b.cs 2024-02-25 23:51:53 -06:00
Kurt
8b5e4e798b Add NSO save handler for Gen1/2 saves
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.
2024-02-24 21:53:21 -06:00
Kurt
88569d1107 RBY: Add bool toggle for silph lapras
Closes #4188
2024-02-24 20:14:04 -06:00
Kurt
5334f1ef78 Fix IsMysteryGiftUnlocked checked
Closes #4106
2024-02-24 19:51:42 -06:00
Kurt
276a1952fb GSC: Add setter for daycare occupied/egg available
Closes #3862
2024-02-24 19:47:46 -06:00
Kurt
8da8f34896 Use TimeProvider.System instead of manual impl
Introduced in .NET 8; use it.
Remove unnecessary [Serializable] tags (binary/XML serialization are not used), will eventually be obsoleted by c# ;)
2024-02-23 20:37:29 -06:00
Kurt
034658b764 Remove extra Memory forcing
Closes #4133
Refactors most of the `Trade` methods
Fix default egg friendship to 120
Fix Version value exposed for Gen4 saves (and others)
2024-02-23 17:01:36 -06:00
Jonathan Herbert
65d8ab025d
Update PlayerGeoLocation7b To Match Changes To SaveBlock Constructor (#4194) 2024-02-23 14:32:20 -06:00
Kurt
4f568b1497 Add slot-set Count update bypass setting 2024-02-23 13:20:59 -06:00
Jonathan Herbert
4974371100
SaveBlock Constructor Changes (#4191)
* 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
2024-02-23 13:20:24 -06:00
Jonathan Herbert
92c964d6fa
Refactor And Deduplicate Some Switch Games Common Logic (#4187)
- 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.
2024-02-23 13:19:17 -06:00
Jonathan Herbert
cf274bba70
Add LGPE Adventure Begin Date (#4189) 2024-02-23 13:19:01 -06:00
Kurt
95fbf66a6e
Refactor: Gen3/4 Lead Encounters, property fixing (#4193)
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.
2024-02-22 21:20:54 -06:00
Jonathan Herbert
247340dff4
Handle SwSh and SV Team Locks (#4186) 2024-02-15 08:33:25 -06:00
Jonathan Herbert
704a7036ea
Determine Scarlet and Violet Save Time (#4183) 2024-02-14 22:56:41 -06:00
Lusamine
da83f1005a Label SV Surprise Trade storage block 2024-02-09 23:43:43 -06:00
Kurt
10c5adadb8 Misc tweaks
Add more xmldoc
Move files/functions to better spot
Less allocation on hover glow
fix honeytree dppt group/slot/shake rand call (ty real.96)
2024-02-03 14:11:17 -06:00
Kurt
48b0f0c6a3 Pt: Swap roamer indexes (moltres, articuno)
f3604018fe/include/roaming_pokemon.h (L10-L12)
Closes #4176
2024-01-29 16:14:17 -08:00
Jonathan Herbert
a00a6a7308
Label Scarlet and Violet Team Names (#4164) 2024-01-17 20:49:38 -08:00
Kurt
2aec7572f8 Fix club board fetch for pre-indigo saves 2024-01-15 23:22:00 -08:00
Jonathan Herbert
5a5ce7c273
Scarlet and Violet Blueberry Clubroom Support Board + Style (#4162)
* Scarlet and Violet Blueberry Clubroom Support Board + Style

* Sync to master

* Fix BaseballClub2TwirlingNinja Flags

---------

Co-authored-by: Kurt <kaphotics@gmail.com>
2024-01-15 19:29:39 -08:00
Jonathan Herbert
690de20687
Add Support For SV Throw Style (#4153)
* Add Support For SV Throw Style
* Change Support Board To Club Room
The block contains more than just the support board so correcting name.
2024-01-15 18:50:17 -08:00
sora10pls
a39712e5cd Add Mochi Mayhem related content 2024-01-11 09:16:04 -05:00
Samuel Magnan
dbb4df6ddc
Add getter/setter for Sav Gen3/4 Trendy Word, Trainer Hill, Berry Blender, Accessory, Backdrop, Wallpaper (#4152) 2024-01-06 16:44:58 -08:00
Kurt
424cbcff21 Misc tweaks
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
2024-01-02 15:45:35 -08:00
Kurt
d3a48968e0 Revise runtime localization language setter
Closes #4138
ty @fattard
2023-12-29 10:17:50 -08:00
Kurt
f7a888cc57 Extract some logic to SAV4
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.
2023-12-28 00:11:56 -08:00
sora10pls
807b9031b1 Add more save block labels, Necrozma fusion move handling 2023-12-26 09:36:13 -05:00
Jonathan Herbert
24a5b05fcb
Handle Seven Star Raids Change From Teal Mask Update (#4119)
* 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.
2023-12-21 10:51:09 -08:00
Jonathan Herbert
54d3f377e9
Make Raid Editors Edit Copies Rather Than Origin Save's Data (#4118)
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.
2023-12-19 20:53:10 -08:00