Commit graph

1445 commits

Author SHA1 Message Date
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
Samuel Magnan
90d000d640
Add villa furniture getter/setter for Platinum (#4120)
* Add VillaFurniture to SAV4Pt
2023-12-19 20:50:32 -08:00
Kurt
a89b13027b Update gen9 sketch disallow 2023-12-18 20:27:57 -08:00
Jonathan Herbert
80faf97425
Use Explicit Types Instead Of SaveFile For Forms (#4116) 2023-12-18 20:24:24 -08:00
Kurt
d95f424c62 Add another sav size 2023-12-18 00:47:53 -08:00
Kurt
61d958e07a Fix blueberry raids & stellar showdown parse 2023-12-17 19:45:13 -08:00
Kurt
c892225a55 Oops 2023-12-17 17:26:38 -08:00
Kurt
10cae1316e Update 23.12.18 2023-12-17 17:06:39 -08:00
Kurt
01c82e472e
Add support for Indigo Disk (#4111) 2023-12-17 16:41:15 -08:00
abcboy101
69cd3455be
Add Chatter Editor (#4101)
* Add Chatter accessors

* Add Chatter Editor

* Update translations
2023-12-17 16:39:15 -08:00
Kurt
59e409bbd7 Update pk3.HeldMailID when not holding mail
https://projectpokemon.org/home/forums/topic/64361-bugs-when-editing-g3-japanese-version-pokemon/?do=findComment&comment=287038
2023-12-17 08:57:56 -08:00
Kurt
0769300803 Handle language-specific fateful bitflag location
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.
2023-12-10 20:58:58 -08:00
Kurt
1fe2b4f29b ArgumentOutOfRangeException
Use the new NET8 API
2023-12-09 15:21:10 -08:00
Kurt
ef68886554 Add more annotations
Fix typo in swsh block name
2023-12-07 00:07:55 -08:00
Jonathan Herbert
d3452deb80
Document Dojo Watt Donation Related Flags and Values (#4085) 2023-12-06 18:27:17 -08:00
Kurt
762a2a0c41 Fix gen4 complete dex operation for female-only
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.
2023-12-05 18:51:32 -08:00
Kurt
c09890366b Fix wc no nickname check, gen3 bvid return
Closes #4081
2023-12-04 18:38:05 -08:00
Kurt
d47bb1d297
Update .NET Runtime to .NET 8.0 (#4082)
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.
2023-12-03 20:13:20 -08:00