Useful for code trimming gates to not trim interior/uses
Removes reflection use from EntityBlank, change signature to use EntityContext and Language for safest interaction.
Translate several strings to Simplified Chinese (zh-Hans). Updated legality_zh-hans.json (LevelBoostNotZero) and multiple UI text entries in lang_zh-Hans.txt, replacing English phrases with Chinese equivalents for sound prompts, menu labels, buttons, and trainer fields (e.g., PlaySoundOther, SAV_BattlePass.f_MAIN, SAV_Database.B_Add, SAV_Misc8b.TAB_Main, SAV_Trainer4BR.L_PlayerID, SID/TID).
Pt/HG/SS store the ROMCode, but D/P do not. In D/P, every "get version" function for the ROM is inlined to return a fixed value, not from the save file.
uint cast, was an "exclusive range" so it truncated back to 0, immediately terminating the loop and not searching the highest-end of seeds.
replace with tuple deconstruct so they stay as ulongs.
- Updated Ribbons for all languages to match the most recent official names.
- Finished off Italian UI and legality translations.
- Some updates to FRLG's Spanish Event Flags.
- Other miscellaneous additions, fixes, text fitting, and improvements for other languages.
Since BCC/Safari only roll PIDIV up to 4 times, a large amount of resulting-pk4 will still lack a 31 IV. These require the full recursion failure to be reached, so the traversal needs to travel up 4x before accepting an origin.
Reduce parameter passing by wrapping the immutables/derived in a struct.
Also clean up some level comparisons for lead:pressure boosting check, maybe DPPt's MethodJ impl was comparing wrong (didn't match MethodK). If we're above the encounter slot's level range, then it must have been pressure boosted. Don't bother checking for Grass type (the only type that can boost) as we already check that in the IsMatchExact yield.
Unrelated: Add a unit test of an obvious genned mon EVs I laughed at when scrolling thru my HG save file.
Thanks Unknown Warrior for reporting a BCC Volbeat that failed the detection. Not sure why I implemented the logic that way originally, but this cleans it up slightly. After looking at it further, it was missing a bit of tree pruning for Synchronization fails/lock-in, so we have a little bit of parameter passing hell happening. It's internal to the private methods, so I guess it's not too bad.
GPT-5.4 was given it as a first pass, of which it identified both existing bugs:
- seed was mutated in TryGetMatch before passing to the recursion
- frame reversal to origin inside the recursion (to get the seed that generates the rejected pid-iv) was off-by-one
The two fixes did allow it to solve, but it was missing the synchronize lock-in effect and sync-fail paths; no fault to GPT. Once those were added, everything worked as expected!
The frame-exit activation check was being run on the first-match of all lead candidates; due to leads consuming different amounts of calls, not all exit frame paths were checked. This resulted in a very very rare chance that a valid frame wouldn't be possible for non-sweet-scent encounters. So, those had to get inlined to each lead-check. Now, they're fully encounterable before being emitted to the "best result" aggregator at the top of the call chain. They're already preferentially emitted inside the lead-checker set (hence the weird if-else arrangement), just that separate PID-loop frames will possibly yield a less-restricted/more-common lead arrangement.
Peppers in a few more context dumps to help future me (or future AI) better maintain context. Also de-magics the Format numbers to better clarify what "0" does/means.
Unrelated: remove an unnecessary space (at the end of a line) in HomeQuirks
I'm pleasantly surprised that GPT-5.4 was able to deduce the two bugs in the implementation; I didn't provide enough context/requests, but it was quite confident in the two bugs (as it should have been -- it was correct) when I challenged it for explanation.
Extract gen3 default trash to trash class & folder
remove erroneous mismatch parse add (should be a pure method)
Set all purchased flags when shift is held
Gen3 LeafGreen french name detection tweaks (both fr & lg contain `feu`)
Gen4: Disable White Flute from boosting BugContest encounters
* Server date
* Only check for IV count if there's a specified Flawless value
* Calculate Shiny XOR from the correct ID32 value
* Do not require the legality checker to check for forced XOR 1
* Update text_ItemsG2_ja.txt
`ポイントアップ` means PP Up in Japanese, not HP Up.
HP Up is `マックスアップ`.
Updated unit tests to ensure all gen1-3 string lists are unique item names.
Gen3-5: Egg (breeding) requesting shiny now loops to match criteria.
Gen3: Add evolution nickname bypass for trash byte application
Gen3: Fix japanese OT prefill check from not actually working
Gen3: Add missing Voltorb encounter (was superseded by Wild slot, but aggressive checks since added).
Artwork Pokemon Sprites have artefacts when rendering Sprite Glow due to them having small-value ARGB pixels. PKHeX was originally designed with the assumption of pure pixels, and not blurred edges from downscaling.
Co-Authored-By: abcboy101 <16735361+abcboy101@users.noreply.github.com>
#4785#4785
HOME misapplying PLA's size fixing, fun. Seems it was fixed in 4.0.0 (after 3.2.1?) or server side. A last-minute redeem=>deposit was "fixed" to 255, so the full date range of the card is allowed to be mutated.
- Updated and revised the encountered Ground Tiles for generation 4 to match up with English in all other languages.
- Update Event Constants for some Spanish and Korean games.
- Additional translation additions, revisions, spacing adjustments, and typo fixes.
Fix box export (individual files) not including party data in the bin. Previous behavior would have 00'd party data if not force-calculated. Just calculate party stats if not present for the format. Log Database entity as party format, just to avoid using the Stored format size.
Revise gen2 odd egg declarations to group shiny eggs together, and enforce the Shiny property for object filtering. If IVs are specified, then Shininess property needs to be provided (rather than "random" which is untrue).
Simplify some logic paths for trade1/trade2. Extract some of the nuance of transferred Hiragana Dugtrio so the unit test is xref'd nicely.
also allow WA9 latam lang (get/set was defaulting to english which probably matched anyway)
add a sanity check to TryGetSpecies which was only used by Gen1 with a hardcoded language ID. maybe someone will use it in their own project, might as well prevent an exception.
Not really an issue cuz the game sets them to `0` or `1` on startup, but clearing boxes/slots should match runtime behavior. livehex after clearing boxes can result in slots that don't update until the game is rebooted. no more ;)
should probably refactor the API a little better to avoid virtual spaghetti