Commit Graph

311 Commits

Author SHA1 Message Date
Kurt
3c1e7bdc6c Misc tweaks
Overworld8a: acknowledge Nature request
8U/8N: remove unnecessary auto-mint (not applied anywhere else)
Nature: use extension properties, use the `IsFixed` check throughout codebase
Wallpaper: add PLA default to pasture (not-obvious prior behavior was removed in refactor).
Tests: fix ck3 file with OT trash bytes (now cleared)
Tests: fix pk3 file with OT trash bytes now passes (added 1 trash pattern, future work)
Trash3: initial stubs for default OT trash recognition (one included to pass above ^)
2026-03-18 01:17:17 -05:00
Kurt
c037829b29 Initial gen3 virtual console checks
Disables branching when virtual console is the current save file
2026-02-27 13:26:05 -06:00
Kurt
2efa19e5e3 Refactor batch editor to smaller components
Did something similar for NHSE years ago. Allows for much easier reuse elsewhere and clearer usage.
2026-02-21 00:22:32 -06:00
Kurt
b6ae27e4e8 Add optional delegate for mid-batch-modify
Currently unused by everything; allows a compiled function to be run between the Filters and Modifiers
2026-02-19 09:37:25 -06:00
Kurt
aab826ef13 Misc tweaks
Rename args for better clarity
Fix invalid pokerus on gen2 unit test case (apparently pkrs in gen2 was unchecked until recent miscverifier fix)
2026-02-18 07:46:39 -06:00
Kurt
53c684a223 Add numeric operators to StringInstruction set
okay can we stop asking for this now? your "random fudging of EXP" to make it seem more legit really is ugly, and doesn't fool anyone lol
2026-02-16 23:14:38 -06:00
Kurt
f816b06d97 Update check for Barb Barrage evolution move
Closes #4698
2026-01-23 23:41:02 -06:00
Kurt
ad96b048b2 ShowdownSet: Parse wrong-ordered EVs
Previously were ignored.

Thanks Claude Opus 4.5, it 1-shot the entire thing from my detailed prompt & unit test follow up request.
I added a skip-blank line for ParseLines when people import a set with a trailing newline. Rather than a blank "invalid line length {0}"
2026-01-23 16:41:16 -06:00
Kurt
3489555f74 Add edge case handling for forgotten initial moves
bdsp/sv/swsh eggs in PLA: original egg relearn are unable to be referenced, so we need to permit all
similar for BDSP Underground special moves (egg move sharing via daycare though). Also for any oddballs in SWSH that had relearn moves for special moves.
2026-01-12 21:48:02 -06:00
Kurt
2560b7c677 Check all languages for correct lengths
pesky eol
2026-01-12 21:05:25 -06:00
Kurt
5f65b333ba Update dependencies
Minor simplification in QRCode gen
2025-12-31 02:12:20 -06:00
Kurt
2c541ad422
Update to .NET 10 (#4676)
* Update to .NET 10
* Property fields
* API signature updates
* Extension method blocks

* Completed dark mode support
  Outside of my control:
- vertical tab control (pkm editor)
- datetimepicker controls
- lgpe event flags (no idea)
- some control types having white-borders when they should really be gray

Box background is 50% transparency to effectively darken the image.

* Custom legality report popup
* Event diff dialog, version select dialog
* Add quick overwrite popup for export sav
* Extension methods
* Dark Mode: glow currently editing sprite
* Add invalid encounter hint for trade evolutions
* Extension properties
* Append legality hint on hover card
* Slot image loading: clear the screen-reader description if a slot is empty/invalid, rather than retain the previous description. Changing boxes would easily confuse users on this.
2025-12-31 01:42:05 -06:00
Kurt
c8eb4f548f Update 25.12.15 2025-12-15 23:19:16 -06:00
Kurt
34f3624b64
Changes for Legends: Z-A (Mega Dimension) support (#4653)
Refer to pull request notes and the eventual changelog for a high-level summary.

Co-authored-by: Matt <17801814+sora10pls@users.noreply.github.com>
Co-authored-by: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-authored-by: SciresM <8676005+SciresM@users.noreply.github.com>
2025-12-12 01:30:35 -06:00
Kurt
85cf53fe8e Gen4: Add Mic Test possible IV seeds 2025-11-25 00:19:58 -08:00
Kurt
a437fecab8 Reuse EntityGender magic ratio values 2025-11-24 17:21:49 -08:00
Kurt
a83ee19757 Minor clean 2025-11-02 17:54:23 -06:00
Kurt
048f7cfe30 Revise PIDIV check return value to enum
Deduplicates slightly by indicating the true-"ignore" better.
Add deferral for Alpha Moves (flagged later via ZA Verifier, not needing a generic Partial error)
2025-10-30 22:50:38 -05:00
abcboy101
b5f5f35f2c
Update text resources from Z-A, support LATAM Spanish as a program language (#4599)
* Split zh text resources

* Reorganize language text resources

* Update language codes

Z-A uses the same abbreviations in all languages

* Update characteristics text from Z-A

* Update LATAM text resources from Z-A

* Support LATAM Spanish as a program language

* Handle duplicates
2025-10-27 11:03:48 -05:00
Kurt
82744a12ef Update dependencies 2025-08-22 16:33:04 -05:00
Kurt
ea85d5e6b0 Minor clean 2025-08-16 09:21:16 -05:00
drabu96
3e8c355ef7
Fix pk1/pk2 char conversion to >=pk7 (#4545)
* Fix pk1/pk2 char conversion to >=pk7

Fixed conversion of a gen1/2 "․" to ASCII "." when converting to pk7 or newer.
Added a test that verifies the fix.

Addresses the issue: https://github.com/kwsch/PKHeX/issues/4543

* Update StringTests.cs
2025-08-15 13:30:07 -05:00
Kurt
ff0f4727dd Extract logic from SaveUtil
BlankSaveFile -> creation of blank save files
SaveFileType -> listing of all savefile types

Blank save file arg passing is now clearer
Instead of SaveFile? return, use TryGet pattern with nullable annotations to indicate success
2025-08-09 21:55:55 -05:00
Kurt
d732520762 Rewrite Gen5 dex editor & backend
Closes #4533
2025-08-03 14:24:22 -05:00
Kurt
efefd78caa Update dependencies
pipeline will stay broken until nuget 6.15 releases (it's been 2 month
2025-07-28 21:51:10 -05:00
Kurt
47092a2df0 Misc tweaks 2025-07-28 18:45:30 -05:00
Kurt
13a4d472bc
Deferred Humanization of LegalityAnalysis (#4531) 2025-07-27 20:54:58 -05:00
Kurt
607901dda1 Misc tweaks 2025-07-04 16:06:26 -05:00
Kurt
a57914cf27 Add MonochromeRNG (gen5) generating methods
Extracts a bunch of logic from PIDGenerator
2025-06-14 21:42:47 -05:00
Kurt
422a082f98 Split shadow team tests from shadow test
Use TheoryData to wrap instead of `object`
2025-06-14 21:41:01 -05:00
Kurt
416e519073 Misc tweaks
No functional change, just xmldoc and small inlining
2025-06-14 21:39:49 -05:00
Kurt
ba2245d7d8 Add more xmldoc
Updated PIDIV tests to use IV32 rather than IV sequence checks. Now marked as Obsolete to prevent myself from reusing PKM.IVs getter :)
2025-06-07 09:41:02 -05:00
Kurt
93d9292d83 Minor clean 2025-05-30 17:41:54 -05:00
Kurt
533c870ca5 Revise stat abbreviations
Closes #4495

fix german's order (speed last)
2025-05-18 18:13:51 -05:00
Kurt
7442e86d65 level int -> byte
Might refactor the learnset level get to byte later as a TryGet so -1 is never returned.
2025-05-17 14:45:49 -05:00
Kurt
85f5950f28
Split EncounterEgg into derived classes (#4490)
Splits EncounterEgg into derived classes, allowing for fine-tuned control of each generation's egg generation & pattern matching.

Adds an interface to check if the encounter is a bred egg (useful for many scenarios when checking for move inheritance, in general).

Enhances the deferral rating for PIDIV matches in eggs based on global legality check settings.

Adds date/time indicators for Gen3/4 eggs and other Method 1 encounters.
2025-05-11 22:31:36 -05:00
Kurt
a85f919630 ShowdownSet: handling for context-locked forms
Retconned forms like Totems and Cosplay Pikachu that only exist in a specific context now get recognized again
Current-Context has shifted from Gen6->Gen7->Gen8+, so a "get form list for species" won't return these forms.

Not a perfect implementation, but better for now.
2025-05-04 13:19:40 -05:00
Kurt
f730f7d19a
Feature: Localization of Battle Templates (Showdown Set) (#4482)
* Localization capability for each language, import & export
* Lines with stat names (IVs/EVs) can be configured to many representations (X/X/X/X/X/X, HABCDS, etc).
* Add nonstandard localizations
* Add token types for Showdown's new set format
* Add new program settings for hover & export styles. Allows users to select which presentation format they want for the hover previews, as well as the set export format.
* Revises preview hover GUI to use new settings
* Revises export events to use new settings
* Moves no longer indicate end of set
* Enhance robustness of stat parsing
* Expand all settings in settings editor on form load
* Extract clipboard -> sets operation to api for maintainability & reusability
2025-05-01 23:16:36 -05:00
Kurt
87d2f10c7f Misc tweaks
Add date validation for lgpe go park encounters (deferred, now finally remembered to implement?)
2025-04-21 00:57:23 -05:00
Kurt
32887b5659 Revise LockFinder to accept u32, not pidiv 2025-03-12 21:24:38 -05:00
Kurt
ca81fcd250 CXD: check naming screen->TID/SID frame pattern
Adapted from e5255b1313/PokemonCoRNGLibrary/Util/LCGExtensions.cs (L15)
2025-03-10 22:25:53 -05:00
Kurt
5bf9865f3f Add pokespot reverse/forward methods
Also adds partial IV specifying for cxd generating
2025-03-09 20:09:17 -05:00
Kurt
9dedd33694 Duplicate locations: across lists, not each array
BD/SP has Pokémon HOME as location 30018 and 40086; need to differentiate.
Revise the unit test to share the unique-check set across all location lists of that context

Ignore "empty" location values (dashes, empty). For deduplicating, ignore empty indexes as well.
2025-02-01 19:23:11 -06:00
Kurt
7d59e3416a Minor tweaks
== null
to
is null
2025-01-27 16:37:37 -06:00
abcboy101
6c3eec3314
Support Gen5/3DS/Switch word filters (#4423)
* Support Gen5/3DS/Switch word filters

- Separate 3DS/Switch word filters
- Add/implement Gen5 word filter
- Adjust behavior of DisableWordFilterPastGen

* Implement halfwidth/fullwidth conversion

Only applies to alphanumeric and kana
2025-01-26 10:38:21 -06:00
Kurt
eced651024 Pokewalker: Handle 539 stroll, revise signatures
Was missing the worst case scenario; ran a bruteforce script to find a 539 after adding the final logic. We try to do the least amount of cpu instructions so this is probably the better arrangement anyway.

Revise the method signatures to exclude the scratchspace span reuse (not-obvious behavior). Just stackalloc a new span.

Add seed indication to legality formatting. #4416
2025-01-15 01:26:49 -06:00
Kurt
9f0812cb8b Pokewalker: Don't check slots for stroll seeds
Closes #4416
Majority of the changelog here is additional/revised comments/xmldoc or "unused code". Only `GetFirstSeed`'s behavior has changed on line 154 (new). Since there is no longer the need to refer to Species and Course, remove from the method signatures & usages.

Refer to the discussion in the ^ mentioned issue.

Co-Authored-By: HappyLappy1 <86489014+happylappy1@users.noreply.github.com>
Co-Authored-By: NickPlayeZ <80699972+nickplayez@users.noreply.github.com>
2025-01-13 23:24:18 -06:00
Kurt
ab215d0721
Enhance EncounterCriteria and template->pkm adherance (#4411)
Change the EncounterCriteria object to a readonly record struct, and introduce extra properties to indicate how flexible we are with random results.
2025-01-04 22:45:30 -06:00
Kurt
c1f0c9e7ae Update dependencies
for .NET 9.0 there's a few
2025-01-04 01:25:14 -06:00
Kurt
52351bf0e7 Generator: Gen3/4 slots w/ IVs & not-min level
Previously would only generate with minimum levels when IVs are provided
Now that it generates not-min levels, need to set the correct level.

Might be possible in the future to have IV-spec also respect a Level request, but for now it's only forceMin which nobody currently uses (no usage of the setter).
2024-11-18 18:56:18 -06:00