Kurt
b96e2cacd7
Add xmldoc
2022-01-08 09:54:32 -08:00
Kurt
9bddc89c07
Use span if possible instead of new arrays
2022-01-07 20:56:44 -08:00
Kurt
01f1be6f89
Fix incorrect g1 trade trainer char reference
2022-01-07 20:52:26 -08:00
Kurt
8f5f80b391
Only remove space in gen1/2
...
prior version removed all spaces if < 3, this just early returns before span trimming.
2022-01-07 20:34:35 -08:00
Lusamine
522790b8e6
Add Giant's Bed static encounter Trevenant crossover
...
Co-Authored-By: Skadiv <62726360+Skadiv@users.noreply.github.com>
2022-01-07 21:00:44 -06:00
Kurt
7743b30b2f
Fix species being replaced with incorrect mapping
...
XD shadow monitor stores the Gen3-mainline-SpeciesID instead of nationaldex ID.
Remap the values on the fly.
Pass the data via span to save a 8KB allocation for sav ctor
Closes #3365
2022-01-07 17:48:12 -08:00
Kurt
f83a9bf833
Expose shiny potential value
...
Not really digging it currently as it doesn't cover multi-state like AlwaysStar-Or-Never, but that single edge case can be handled elsewhere
2022-01-07 17:48:12 -08:00
Kurt
a08330ffd4
Update MoveSetApplicator.cs
2022-01-03 22:27:20 -08:00
Kurt
36bf73818e
Source trainers for encounter database
...
Closes #3364
Related: #3358
2022-01-03 19:33:10 -08:00
sora10pls
3f1335e19f
Add Zone unlock cheat to BDSP Misc Editor
...
As with most event work tampering, make sure you keep save backups. Accessing areas before you're intended to will almost certainly break story progression.
2022-01-03 11:06:06 -05:00
Kurt
47071b41f3
Refactoring: Span-based value writes and method signatures ( #3361 )
...
Existing `get`/`set` logic is flawed in that it doesn't work on Big Endian operating systems, and it allocates heap objects when it doesn't need to.
`System.Buffers.Binary.BinaryPrimitives` in the `System.Memory` NuGet package provides both Little Endian and Big Endian methods to read and write data; all the `get`/`set` operations have been reworked to use this new API. This removes the need for PKHeX's manual `BigEndian` class, as all functions are already covered by the BinaryPrimitives API.
The `StringConverter` has now been rewritten to accept a Span to read from & write to, no longer requiring a temporary StringBuilder.
Other Fixes included:
- The Super Training UI for Gen6 has been reworked according to the latest block structure additions.
- Cloning a Stadium2 Save File now works correctly (opening from the Folder browser list).
- Checksum & Sanity properties removed from parent PKM class, and is now implemented via interface.
2022-01-02 21:35:59 -08:00
Lusamine
a9896022ed
Allow Ninjask moves on Gen 4 Sport Ball Shedinja
2022-01-02 21:12:46 -06:00
MewTracker
d5a79079c0
Added named constant for BDSP swarms ( #3362 )
2022-01-02 15:43:18 -08:00
Kurt
bee4a54148
Ignore encounter if bad catch rate
...
Waffling on this, let's just be less lenient in error messages and just outright reject the encounter.
2022-01-02 15:03:04 -08:00
Kurt
3f769d6f52
Update 22.01.01
2022-01-02 00:53:37 -08:00
Kurt
7b4099030a
Properly flag gmax in bdsp
2022-01-01 23:11:45 -08:00
sora10pls
eb71576803
Add New Year's distribution raid data
2021-12-31 19:04:35 -05:00
Kurt
ac1136615e
Fix rival string read/write to General
2021-12-31 13:52:50 -08:00
Kurt
2de2ed4985
Merge branch 'master' of https://github.com/kwsch/PKHeX
2021-12-31 13:52:37 -08:00
sora10pls
a02e97a8af
Unban alternate Lake Verity zone
...
As you progress the story in the Sinnoh games, the water level in Lake Verity will rise allowing you to Surf and reach the Verity Cavern. When this happens differs between DP/BDSP and Pt.
Zone 323 has nothing to do with it being early-game and only when Rowan's briefcase is present, but rather the differing water level. Riley's Riolu Egg can be hatched here without trading, as well.
Co-Authored-By: Billo-PS <63661653+Billo-PS@users.noreply.github.com>
2021-12-28 17:26:05 -05:00
Kurt
dc4a9136ea
Remove trailing whitespace
2021-12-27 14:03:41 -08:00
Kurt
a2f61166e4
Use System.Memory for BigEndian value reads
...
Temp testing commit; will improve performance in the future
2021-12-27 13:56:52 -08:00
Kurt
76cac85243
Minor clean
2021-12-27 13:50:21 -08:00
Kurt
cc8ac7a4f1
Remove unnecessary warning suppression
...
fixed dat .editorconfig in vs22
Catching general exceptions is okay because this program handles user modified data that can potentially be corrupt.
2021-12-27 12:09:15 -08:00
Kurt
5f7caf9ca2
Tweak PB8.FixMemories for importing eggs & handler quirk
2021-12-27 01:53:28 -08:00
Kurt
29fd17a6f9
Add friendsafari to HA metadata permission
2021-12-26 23:05:25 -08:00
Kurt
24e1898410
Update gen4 Shedinja handling
...
PK4->PK5 fixes gendered Shedinja -> genderless.
Clean up PK4 ball value setters and expose those 2 properties separately.
Add edge case permission for HG/SS Sport Ball Shedinja being legal if evolved on DP (DP doesn't change 0x86, lol)
Copy PokéathlonStat and ball values individually for BK4<->PK4 conversion
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2021-12-26 20:13:36 -08:00
Kurt
f50684b794
Remove childless xmldoc
2021-12-26 19:44:04 -08:00
Kurt
749293fc75
Move BoxManip to subfolder
2021-12-26 19:43:42 -08:00
Kurt
3d7967fcfe
Fix recognition for cutecharm Nincada->Shedinja
...
GetGender would return 2, which would abort the Cute Charm check since genderless is not able to be cute-charm'd.
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=271537
2021-12-26 18:22:41 -08:00
Kurt
11039f1119
Extract some event unlocking logic for core
2021-12-26 18:21:34 -08:00
Kurt
76ab09f024
Inline constant value
2021-12-26 01:06:30 -08:00
Kurt
1d0993f852
Remove EvoBase, relocate functions to call sites
...
Utilize FormInfo to remap battle forms into hatch forms so the encounter matches something valid, and is flagged later in FormVerifier
2021-12-26 00:57:40 -08:00
Kurt
b348e38a3e
Don't do DP english->jpn bug for BDSP
2021-12-26 00:06:10 -08:00
Kurt
192ef23052
Allow gen5 deerling and sawsbuck slots to be any form [0,3]
2021-12-26 00:00:38 -08:00
Kurt
49a2cd19d0
template=>pk4: Only ENG->JPN if DP, not Pt
...
Language bug was fixed after ENG DP (for other localizations, and Pt)
2021-12-25 23:59:18 -08:00
Kurt
ac6fd085ba
Update translation files
2021-12-25 19:03:11 -08:00
tastymeatball
2d3fae889b
Update flags_e_en.txt ( #3350 )
...
add a lot of flags to emerald
2021-12-25 18:57:02 -08:00
Kurt
9ce0da6c46
Add bdsp approximations for min sheen calcs
...
Closes #3351
2021-12-25 18:51:02 -08:00
Kurt
fbb9e0bf0e
Flag original catchrates on g1->g2->g1 transfers
...
Closes #3328
2021-12-25 18:44:37 -08:00
Kurt
13e0f35e00
Add munchlax slot checking for DPPt/BDSP honey trees
...
Closes #3352
2021-12-25 13:48:28 -08:00
Kurt
2d34411203
Fix g8 meister magikarp matching
...
5b2ad8703c
2021-12-25 12:57:05 -08:00
Kurt
defae6727d
Check bdsp version exclusive hatch locations
...
lol srsly
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2021-12-24 18:39:54 -08:00
Lusamine
8612404f84
Add Slippery Slope Weavile static encounter
2021-12-24 20:06:31 -06:00
Kurt
42d24ad183
Add sketch check for bdsp legends signature moves
...
Can't learn these yet
2021-12-23 01:57:53 -08:00
Kurt
46f5a9c29a
Remove inaccessible zone IDs from hatch location list
...
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2021-12-23 01:25:14 -08:00
Kurt
606818b835
Bounds check sketch move IDs for generation
...
Smeargle no longer permitted to have Eerie Spell in gen6 format :)
2021-12-23 01:24:47 -08:00
Kurt
4e7e23cb88
Add battle tower record editing
2021-12-20 23:48:05 -08:00
Kurt
36a97a6eda
Add misc edit to defeat all trainers & rebattle all
2021-12-20 19:26:07 -08:00
Kurt
39f8e9173e
Add contest stat batch modification
2021-12-20 19:16:23 -08:00
Kurt
1e0ac7fb26
Ban more BDSP egg moves before HOME
...
https: //github.com/kwsch/UnityDPtools/pull/2
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2021-12-20 19:00:48 -08:00
Kurt
38a4135bcd
Span-ify the unpacking of mini arcs
...
cuts out some of the internal c# sanity checking for better perf
2021-12-20 18:37:45 -08:00
sora10pls
260036a90b
Add Holiday 2021 distribution raid data 🎄
2021-12-16 19:04:28 -05:00
Kurt
98713f4d7b
Move inventory item clearing to class
...
Fixes ClearItem offset being wrong
2021-12-13 18:31:00 -08:00
sora10pls
57efeff0ee
Expose WK_SCENE_GAME_START in Work Values
...
hilarious that you can use this to skip the opening movie
2021-12-13 18:43:31 -05:00
Kurt
6b2ea0894e
Bypass encounter slot check for radar slots
...
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=271406
https://discord.com/channels/401014193211441153/679178558597496872/908489378043686944
2021-12-12 13:16:27 -08:00
sora10pls
3e92d5a85d
Add Dialga/Palkia + Roamer resets to Misc Editor
...
For roamers, go back to Lake Valor/Fullmoon Island, and re-interact with Mesprit/Cresselia so that the game can generate a new one.
Also add Rotom rebattle event flag, and fix consistency with flag labels.
2021-12-12 11:28:48 -05:00
sora10pls
c05b79b532
Handle Route 229 <=> Route 230 crossover case
2021-12-12 09:18:57 -05:00
Kurt
5b2ad8703c
Handle g8 meister magikarp language goofiness
...
Only 5 & 1 language IDs are used
2021-12-11 22:23:05 -08:00
Kurt
47a1fd10e4
Allow surf crossover from r223<->pkmleague
...
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2021-12-11 21:31:32 -08:00
Kurt
aa968f56aa
File scoped namespace for drawing projects
...
Extract color util to separate class as it's not entirely image related.
2021-12-10 00:15:04 -08:00
Kurt
9f920405df
Revise gen3 sheen max extrapolation
...
any contest stat sum above 73 can have any sheen if you really give it trash blocks, lol
not trying to bruteforce the exact combination of consumed blocks/poffins, so these clamps may permit impossible intermediate values, but these are infrequent and meh.
Closes #3325
2021-12-09 23:33:54 -08:00
Kurt
e5efbdcbf0
Remove head smash from hgss nosepass eggmoves
...
Closes #3327
2021-12-09 22:41:14 -08:00
Kurt
2e20e75168
Temp handling for bdsp case
2021-12-09 19:53:43 -08:00
Kurt
f1fe2f6a8c
Minor clean
2021-12-09 19:30:12 -08:00
Kurt
e84932badd
Remove unnecessary trailing comma
...
nit
2021-12-09 19:10:50 -08:00
Kurt
d7e1f65faa
Add some xmldoc, file scoped namespaces
...
Not much of a git diff history for these files so I don't mind them being reformatted.
2021-12-09 18:58:30 -08:00
Kurt
18469a78aa
Set legal default ball for bdsp bred egg templates
2021-12-09 18:39:03 -08:00
Kurt
22cd12ee8d
Recategorize bdsp Honey Tree encounters from Grass to HoneyTree
...
Now they no longer show as Radar possible (no longer "grass")
2021-12-09 15:55:14 -08:00
Lusamine
e617beb604
Add Lost Tower to zones where Radar can't be used
2021-12-09 11:02:12 -06:00
Kurt
6e0170f938
Update eggmove_bdsp.pkl
...
Of all the available Pokémon in BDSP, the following cannot have these corresponding Egg Moves:
Snorlax: Power-Up Punch
Taillow: Boomburst
Chatot: Boomburst
Revert this commit when HOME is available for BDSP
2021-12-09 01:30:20 -08:00
Kurt
870a38c607
Use primary constructors for some records
2021-12-09 01:08:46 -08:00
Kurt
51c75dd102
Explicitly implement IFixedAbilityNumber on all templates
2021-12-09 00:46:59 -08:00
Kurt
90956f3b05
Flag encounter slots that cannot obtain HA or use ability patch
...
Ex: old chateau Gastly in bdsp cannot have HA as it is not different from base abilities
2021-12-08 23:43:32 -08:00
Kurt
aa78152856
Implement hidden ability (pokeradar) possibility for slots
...
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2021-12-08 23:41:50 -08:00
Kurt
0bb4534870
Reset contest stats to enc instead of zeroed
...
Can't lower contest stats, but there's no cases of them giving a pkm with contest stats in a game that can't obtain contest stats -- let's just reset instead of zero for futureproofing.
Make them extension methods too; add an overload if you want to purposefully maximize them.
2021-12-08 22:43:56 -08:00
sora10pls
88822b4e68
Update minimum Egg hatch cycle legality
...
0 is legal in most cases except for Gen2 and BDSP!
...it's technically possible to get 0 in BDSP if you have autosave turned on and have an Egg in your party after hatching one before it, but it will hatch immediately on your next game startup, so disallow it anyway.
2021-12-07 20:38:00 -05:00
Kurt
543359fff6
Add contest stat sheen checking
...
Closes #3324
2021-12-07 00:54:39 -08:00
Kurt
fcd97d5989
Don't add TR moves as possible for BDSP origin
2021-12-06 00:01:13 -08:00
Kurt
cacd6e9965
More records/sealing
2021-12-05 23:54:59 -08:00
sora10pls
ffebc74b90
Update National Dex Underground encounter minimum requirements
...
See https://github.com/kwsch/UnityDPtools/pull/1/files for more details.
2021-12-05 12:00:51 -05:00
Kurt
7e4877e7de
Add 3 more useless blocks
...
Spinda registers correctly now, lol
2021-12-04 23:52:33 -08:00
Kurt
40ed5898af
Merge extended property patterns
2021-12-04 18:37:47 -08:00
Kurt
88ddc5822e
c#10: readonly record structs
...
Reduces some boilerplate constructors/equality compares
2021-12-04 18:32:35 -08:00
Kurt
f55c5bea66
Minor clean
...
no functional change
2021-12-04 17:56:56 -08:00
Kurt
9a1b2719ec
Add simple legal item filtering for giveall
...
Closes #3318
Gen8: if held item, only give if can be legally held; if dmax crystal, only give if available.
Gen8b: if held item, only give if can be legally held
Others: unimplemented; pull requests accepted.
2021-12-04 12:24:32 -08:00
Kurt
4cb80b5463
Update memory feeling localization files for gen8
...
Keep the old localizations around for displaying gen6 format memories in their original localization.
I didn't rename the files so the git diff was clean for showing the re-localized lines.
Closes #3302
2021-12-04 11:40:40 -08:00
Kurt
3e59d481c4
Move bred pokeball short circuit to gen-specific function
...
Now flags safari-exclusive species in pokeballs
2021-12-04 10:52:57 -08:00
Lusamine
aef7987f82
Enable SWSH restaurant memory
...
Obtained by eating at the Circhester restaurant in story mode!
2021-12-03 16:58:07 -06:00
Kurt
e50bb8f288
Abstract-ify pouch items; acknowledge sort order
...
Closes #3320
Should better handle bdsp inventory format; shows sort order with the now-zero slots
2021-12-02 23:31:48 -08:00
Kurt
95454246b8
Skip eggs for EncounterTrade check
...
yay reusing Link Trade egg met locations wrong, ty ilca
2021-12-01 10:38:12 -08:00
Matt
483547f631
Update Tables8bs.cs
2021-12-01 06:16:45 -05:00
Kurt
4046ea0840
Handle encrypted pb8 file detection as pb8
2021-11-30 22:08:15 -08:00
Kurt
b74283560d
Add more useless bdsp saveblock objects
2021-11-30 22:05:20 -08:00
Kurt
8c9fb3a872
Add FieldObjectSave browser
2021-11-30 17:31:46 -08:00
Kurt
1c82b707f3
Add xmldoc, add egglevel get central location
2021-11-30 17:09:46 -08:00
Kurt
091e2c28cd
Add safari-only breed balls
2021-11-30 15:41:47 -08:00
Kurt
ef183ca1ff
Rearrange special case
2021-11-30 15:16:04 -08:00
XxPhoenix1996xX
1481831ec6
Update (ES) localization ( #3317 )
...
* Create flag_bdsp_es.txt
* Update flag_bdsp_es.txt
* Update lang_es.txt
* Update flags_c_es.txt
2021-11-30 13:19:06 -08:00
sora10pls
03c3f4a343
Force Poké Ball for all Riolu Eggs
...
Happiny not affected because Chansey is in the wild.
2021-11-30 16:14:53 -05:00