GO imports that are created with their PK7 and PB7 movesets can bleed from their initial moves.
Example: Muk-Alola level 20 with Minimize can bleed into SV at level 20 (below the normal learn at level 21).
Like move validation, evolutions are the earliest thing we wish to traverse when determining what encounters may have originated the current Pokémon. To determine the permitted species-form-levels a Pokémon could originate with, we must devolve a Pokémon by traveling down-generation to origin. Once we have an encounter, we can then evolve it to the current species, traversing upwards from origin to the current format.
* Fix Pokemon tooltip for LA incorrectly referring to SwSh location table
* Fixes to comments referring to incorrect generation/version/game
---------
Co-authored-by: James Park <5295838+pencilethics@users.noreply.github.com>
Adds a basic editor for recorded Geonet/Unity Tower locations for the Gen 4/5 games, building on this [post by Danius88](https://projectpokemon.org/home/forums/topic/62055-bw-b2w2-unity-tower-geonet-and-passerby-research/).
So far, I've implemented buttons that set all locations (including unused ones), set all legal locations, and clear all recorded locations; and checkboxes to toggle whether the whole globe is visible (used in Japanese games) and whether the ferry to Unity Tower is unlocked.
Haven't implemented any UI for editing the status of individual locations, since I'm not sure how to lay it out.
Also haven't implemented anything related to how the data of the other players in Unity Tower is stored.
Restores strict checks for stuff prior to May 30th that were removed via 36a696e446
Add sim cards for Gen9 HOME starters
Allow tracker-less transfer matching for WC8
Helpful for generating bots who can't assign a legitimate tracker for direct-in-Gen9 injects.
Reused logic, easier unit testing, better performance.
Old method would do max of 6 properties (that each fetch 32bits and bitshift themselves); now we just fetch once and shift calc accordingly.
* Heavily rewrites the `PKH` abstractions.
* Uses HOME's core-side classes as the transfer middlemen instead of direct A->B transfers.
* Revises logic to account for most of HOME's quirks (scale/height copying, safe refuge PLA)
Future revisions hinge on better handling of evotree (need better metadata about existing as specific evolutions in each game).
---------
Co-authored-by: sora10pls <17801814+sora10pls@users.noreply.github.com>
Co-authored-by: Lusamine <30205550+Lusamine@users.noreply.github.com>
* Mapped Fashion items for S/V and added injection logic
* Added 'Unlock Clothes' button in Trainer Editor's misc section alongside ComboBox to select type to add all.
https://projectpokemon.org/home/forums/topic/63429-bdsp-slate/
The "Give All" cheat will skip adding unobtainable items.
Since the BDSP-exclusive Treasure (slate/shard) are unable to held, they were also skipped. Revise the logic to allow them to be added via "Give All", but still disallowed as held items (separate arrays needed).
Also condense the logic for BCAT-Dmax crystal IDs since they're all sequential. Just iterate a range instead of a span.
Closes#3878
Pictures are Zoom instead of AutoSize so there's no need to downscale or dynamically position the smaller 2.
Fix my oopsie on docked tabs (hid the Cancel/Save button!), change sizing.
Much easier to read.
Optionals no longer store the 3-byte header in their memory reference.
If they were smart, they could track per-game visitation date/time in a future header format...
Fixes adding new side-formats and an updated header not writing the first time.
Fixes GameDataPK8.CopyTo where PokeJob data copies from the wrong segment
More readonlyspan for the rest of the defined ushort[] arrays, less dictionary/hashset
Simplify some slot-empty checks, makes it easier to see an api for slot interaction (future?)
Perhaps one of the silliest things PKHeX could account for when it comes to legality 🥒🚫
Data has been added to PGET, but the issue has not been fixed yet, and Beast Ball is still up in the air. More to come?
- Add HeldItems_XY
- Fix that HeldItem_AO pointed to what should have been HeldItems_XY
- Fix HeldItem_AO being inconsistent with the rest of the HeldItems
- Correct HeldItems_AO only having XY held items and not ones added in ORAS
=Stat_ATK=*Stat_DEF
.Species=0
^ will delete a pkm if the defense stat is equal to the attack stat.
the `*`* allows you to use the value from that property, rather than a value from the instruction
already worked for property-modify (aka copy property value), this just allows you to compare-filter with properties.
* Uses LearnSource more throughout the codebase when appropriate, rather than loosely coupled pivot methods.
* Hides Learnset/EggMove data inside the LearnSource classes.
* Extracts functionality from the large Legal class & partial Table*.cs files into better performing helper classes.
* Cleans up some code from prior LearnSource commits.
Ruby & Sapphire had a bug that only looped when (rand) == 0 !!! instead of (rand & 7) == 0.
End result is that the pkrs giving method yields strains 0 & 8 with 30/255 & 1/255 rarity.
Gen2: z80 assembly does NOT work as intended, and has a separate bug that causes strains 9+ to never be obtainable. So close to a neat statistical separation.
Revise the GUI to disable the events on field loading, and allow for selecting Strain0 w/ days !0.
VC2->7 does not transfer pkrs; not that it matters since Gen3++ transfers can spread every strain.
Thanks @SNBeast for clarification on Gen2's assembly logic and repro!
Co-Authored-By: SNBeast <21327530+snbeast@users.noreply.github.com>
* Extract/encapsulate inventory legal arrays to interface+class
Hiding them behind methods allows these to be left as ReadOnlySpan<ushort> and thus never allocate on the heap.
Also refactors out some logic for checking if an item is legal.
End result feels more maintainable and is less bloaty (no more passing in a nullable func)
Batch editing
* Add HasType filter
```
=HasType=11
.HeldItem=Meadow Plate
```
slaps a meadow plate on any pkm with grass type
Use `=PersonalType1=11` for only primary grass types; only-secondary-type grass will not match it.
Gimmighoul can't increment its form argument counter, it can only ever be 999 on Gholdengo after evolving.
Also reorder switch cases according to National Dex indexes.
Instead of looping, if the moveset is full and a new move is added, the game shifts all arr[1..] down one slot then adds the move at the end.
Since we don't need to keep track of PP/PP Ups, we can just defer the shifting and do n % 4 rotations at the end instead of n rotations (one on each move added).
Note this is only SV types, so moves that had their type changed (=>dark/steel/fairy) will be inaccurate in past game formats.
Would need time to dump the info.
Unnoticed, undocumented, now both.
Pivot based on March 1st for the 4 gift-poke cards that already existed. On that day onward, games must be on v1.2.0 in order to redeem, and thus must follow the fixed scale spec.
Add Epoch1900Value based on Epoch1970Value's API and the method @Lusamine described in #3800 to access the Enrollment Date From Scarlet and Violet Save
NET 8 will have a Shuffle method, which can get rid of the overload in Util.
Batch Editor no longer crashes the program when selecting OT_Trash/HT_Trash/Nickname_Trash via dropdown.
Instead of allocating a buffer for Storage/General, just point within the raw Data, as a Memory<byte> reference. Most of the uses were already using it as span.
Runtime/jit repoints these to the dll rather than heap if we're Little Endian (always, otherwise will allocate like before).
Eliminates quite a few static constructors, so even faster startup. Items later.
Only fetch egg moves when using them
Localize KOR gen2 string directly instead of switch expression
Remap FRE gen4 chars directly, hot path instead of dictionary lookup
Uppercase chars in place
Follow up to #3235, this time closing the book for good.
From a bulk analysis perspective, having multiple patterns[0, 17] of Vivillon for the same Gen6/7 OT is illegal. Maybe not for traded eggs?
Skips the bucket array resizing steps
a 256 key dict will garbage 5KB; StringConverter2KOR wastes 100KB of garbage.
Zukan7b: save 144 bytes and eliminate cctor
* Add Geonet location to SAV4 and SAV5
* Allow commas to be escaped in subregion names
* Add missing 3DS subregions
* Add Geonet location editing
* Ensure null values are kept as the first option in GetCountryRegionList
* Add Geonet locations in CHS/CHT
No more stackalloc for temp string trimming/rebuilding. Really jank strings with multiple parens shouldn't need to be recognized.
Handle bad TeraType pkm values
Handle unrecognized Hidden Power types (Fairy), don't show "Normal"
Hide Tera Type import if requested for non-Tera formats, and gen8 props too.
Never will happen, but not worth arguing over because this is essentially what the ROM does. Entry to this method requires both OK.
91c040b081/src/save.c (L587-L605)Closes#3805
* Rename const_e_ja to const_e_ja.txt
* Rename const_rs_ja to const_rs_ja.txt
* Rename flags_e_ja to flags_e_ja.txt
* Rename flags_rs_ja to flags_rs_ja.txt