Commit graph

2482 commits

Author SHA1 Message Date
Kurt
be8b12dbbe Add Prev for xorshift implementation
Add some unit tests (why not?)
2022-01-12 17:05:16 -08:00
Kurt
bb2a63bbce Split min sheen calc for 3 & 4, revise limits
Thanks @SadisticMystic!

https: //github.com/kwsch/PKHeX/commit/9ce0da6c46ebea3c7c6edd1f1e0571e5ecbec739#r63579484
Co-Authored-By: Russell Jones <questiondesk@gmail.com>
2022-01-11 23:29:01 -08:00
Kurt
da9d09ea76 Misc tweaks
No functional change
2022-01-11 22:53:20 -08:00
Kurt
0742c1b891 More sneaky updates
Revises initial seeding mechanism to match games
Use structlayout to get/init 64bit state numbers
2022-01-10 22:33:37 -08:00
Kurt
79e22be419 Add more constructors
Ease of use
2022-01-10 22:06:22 -08:00
Kurt
73575624cf Define specific moveset for Odd Egg / extremespeed mons
Closes #3370
2022-01-10 21:27:04 -08:00
Kurt
03cedd4d8b Split xorshift128 to separate RNG
Blame ILCA for using RandomRangeInt to generate unsigned 32bit numbers :D
2022-01-10 21:07:27 -08:00
Kurt
659fc9978b Stackalloc marking set & raid IV gen 2022-01-08 22:48:33 -08:00
Kurt
9cde291595
Enumerate ability permissions in encounter templates, misc updates (#3368) 2022-01-08 22:34:04 -08:00
Kurt
437c79925d More poffin min sheen fudge 2022-01-08 10:57:51 -08:00
Kurt
933294b3c9 Update NicknameVerifier.cs 2022-01-08 10:43:53 -08:00
Kurt
75a438ca44 Misc tweaks 2022-01-08 10:33:02 -08:00
Kurt
209d295f58 More handling for traded Meister magikarp
what a meme
All these edge cases make me want to move all this trade OT/Nick validation into the EncounterTrade classes and just get an enum indicating what is wrong with the trainer/OT details...
2022-01-08 09:59: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
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
36bf73818e Source trainers for encounter database
Closes #3364
Related: #3358
2022-01-03 19:33:10 -08: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
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
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
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
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
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
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
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
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
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
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
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