GameStrings: 10% of strings are unique; just mark everything. Stop a little early so we don't process the empty & (trade) string.
LearnsetReader: All empty entries are length==0; malformed should throw an exception (never).
EggMoves: Compute ptr inside the array fetch loop; don't use linq.
EggMoves & string shaves off 80ms of startup time according to profiling; some could be attributed to warm-up but yay more efficient.
Some special encounters don't set the Relearn Moves, so we can't really check the memory-moves unless we somehow late-reject a matching encounter. Not really worth the effort to try and verify cosmetic mismatches; just tag them as Fishy.
AltForm & Form & Forme => Form
GenNumber & Generation => Generation
Extract out SpeciesForm interface, and re-add IGeneration
For those using PKHeX as a dependency, this should be a pretty straightforward manual replacement... GenNumber and AltForm should be quick find-replace`s.
Metagross collision with wild beldum
deferral API is kinda crude, hence these janky workarounds. Was originally intended to hold onto close matches when there's no more possible matches to check.
I think a priority-deferral while only retaining a single encounter bad (instead of a list of retries) may work better than the current setup, but that would require more abstraction
Transporter remaps certain locale specific chars depending on the source ROM's version.
Since VC can trade between languages, there are 2 Spanish in-game trades that have glyphs subject to remapping, if it's transferred from a French game.
If the spanish trade is transferred from a french game, it must match the mutated string.
ty @Lusamine & helpers :D
Slap in friend safari at the end during object construction; saves about 1KB of allocation on startup (lol)
Change internal array types to match object types, similar to other encounter-generation definitions.
Trees:
- Only retain the objects needed after calculation
- Reduce size of TreeCoordinates and remove allocation penalty (now a struct)
No more warnings for Release compilation :D
I think this was a PKHeX issue that went unnoticed; originally, we didn't include the Á and Í chars in the dictionary.
I checked the transporter code:
The app maintains the international & japanese character tables, and depending on the ROM language, it may change a char to the language-specific entry. Refer to Bulbapedia's notes on the char tables for different languages:
https://bulbapedia.bulbagarden.net/wiki/Character_encoding_in_Generation_II
However, none of these char-changes are able to be reached with a legal char.
Á and Í (only accessible from the Spanish in-game trades) and the german 0xC0 && z <= 0xC6 chars are already in the international table. Every single difference in the VC1/VC2 table is an un-enterable char.
tl;dr -- all possible char codes are transferred fine with the VC2 table without extra language logic. We just keep out any inaccessible char (replaced with space).
Move form-info logic from FormConverter to AltFormInfo; now FormConverter is entirely form=>string[]
Add a bunch of xmldoc
Make pogo no-end-date cmp agaisnt UTCnow rather than local now.
from 319 (max HP-1) to 9999 (max saved value).
Causes a little bit of GUI lag when loading 10k items to the combobox; could be a number entry but meh. Lazily allocate the 10k strings; wait until it's requested.
Event Move special encounters are yielded after static encounters by the generator, so this iterator-picker will never behave as originally intended.
Since the encounter generator works fine for these events in its current form, we can just remove it. If we need to prefer GB era events before static, then we'd reinstate the priority and move the GenerateGBEvents before the static yielder.
bla bla bla this is just a cleanup from old preference code where we wanted to recognize the encounter as an event/trade as they're more recognizable. We just want to track the progress of the iterator so that g1/g2 follow a merged yielding order
Adds Nickname checks, thanks @ShadowMario3 for grabbing these into separate text files from Bulbapedia.
I reordered all the encounters to match Bulbapedia; each level is denoted if different if it can be sourced from RBY.
Extract common abstract class for GO transferred encounters
Clamp minlevel instead of met level
Add optional parameter for GO IV randomization
Update go legality binaries with latest
PKHeX.Core now accepts generated pkl binaries from PoGoEncounterTool (PGET).
Refer to pporg's repo. This will be treated like event data; occasionally updated.
took me less than an hour to do these changes, and i can flag bad form movesets no problemo
Expect tightening of restrictions (ball, level, shininess) later
if someone wants to curate met date restrictions, go ahead!
Sure it's nice to cache a valid array, but the amount of logic was small enough that it can be done with 10 lines of code rather than at the end of each verification method.
Reduces parameter passing & removes 1 field from the info object, as relearn suggestions are only done rarely after legality checking.
Allows for a simpler api surface (pkm, encounter) rather than a bigger object reference
4 legends have A/A/H on form-0, and B/B/B on form-1. You can get a form-1 by applying the patch on the form-0, and changing it to form-1 will retain the AbilityNumber=4.
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Closes#3070
Exclude all classified as Legends; everything else is permitted assuming it can exist in SW/SH.
Co-Authored-By: Chris <28743231+Bappsack@users.noreply.github.com>
Closes#3040
Ty @Atrius97 !
"The Japanese Aurora Ticket was only distributed in Summer 2004, before Emerald (Sept 16th 2004) was released. The software at that time had no support for Emerald games."
Alakazam in the Insular Sea (on the Isle of Armor)
Zapdos at Watchtower Ruins (in a Wild Area)
Zapdos at West Lake Axewell (in a Wild Area)
Moltres in the Soothing Wetlands (on the Isle of Armor)
Moltres on Challenge Beach (on the Isle of Armor)
Moltres in Loop Lagoon (on the Isle of Armor)
Dragapult in the Giant’s Bed (in the Crown Tundra)
Nidorina in Frostpoint Field (in the Crown Tundra)
Glalie on Snowslide Slope (in the Crown Tundra)
Closes#3027
Roamers: Get PID generated externally
NPokemon: Get PID from a fixed value
Forced (Anti)Shiny: Get PID altered
Thanks @LegoFigure11 && Princess Emily (discord 4650) !
Handles conditions when Ability Patch has been used to modify the PKM's ability => hidden ability.
Per the description, it goes 1/2=>H, not the other way around.
Verify ability bit first, as mystery gift case handling skips the bit check logic :P
Rather than do backtracking logic to see if the slot can be yielded, don't acknowledge the slot exists if it can't be yielded.
See pk3DS commit where we check EscapeRate for the base wild slot prior to adding it to the exported slot list.
A Gen3 level 26 sylveon with a met level of 25 in Generation 8:
Transferred as Eevee at level 25, and leveled up to 26=>Sylveon
If we use met_level (25), we need to decrease 1 as we evolve. No, use Current Level and ensure the max isn't above the bare minimum (met level)
Starting in Generation 8, hatched language-traded eggs will take the Language from the trainer that hatched it.
Transferring from Gen7->Gen8 realigns the Nickname string to the Language, if not nicknamed.
The game uses 0x5E if 0x5A+everstone, otherwise it uses 0x58
For determining the seed species-form, we want to use everstone breeds as that resolves to the correct species-form values.
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-Authored-By: Marty-D <1645989+Marty-D@users.noreply.github.com>
Handle yielding in the moveset generator as well
Future commits will trim down unused values/abstractions; probably can get all the stadium stuff handled innately
Revises the tradeback status to remove any index that could have been sourced from egg moves instead.
really should refactor this TradebackStatus away, but Move validation still remains one of the un-refined parts of the legality checks :P