Commit Graph

481 Commits

Author SHA1 Message Date
Kurt
3ad376be44 Misc tweaks
Add rejections for shiny criteria for gen8+ generators

Unrelated: use recent c# lang feature for settings property field
2026-03-19 09:38:02 -05:00
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
6f9daaed04 Small tweaks to HGSS ball check
small lol
would need fully implemented pal park trash byte checks, big sad
leave stuff stubbed for now, can clamp down later.

restrict some method sigs for IEncounterTemplate (rather than more-derived IEncounterable) for consistency
2026-02-20 01:36:46 -06:00
Kurt
9792455f34 Refactor to use Context over Generation
Generation was always more weak; am I paranoid about potential VC3? maybe
Better indicates the move source for LGPE exclusive moves, etc.
2026-02-15 02:15:50 -06:00
André Bastos Dias
7621087e7e
Fix EncounterCriteria#IsSpecifiedIVs xmldoc description (#4683) 2026-01-03 18:38:37 -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
84912a16e7 Misc encounter search/mutating fixes
ty santacrab
2025-12-15 22:33:42 -06:00
Kurt
1c4070b6a8 Update hyperspace encounters, misc checks
Adds pickle from all possible random encounter sets in hyperspace
Updates some formarg checks for certain species
Updates plus move checks for movesets that were revised by DLC

Hyperspace encounters are in a separate array, with a different slot type

Add note for Teensy/Humungo for wild encounters causing a fixed scale value rather than random.

Should be noted that this is a first-stab at encounters, and things have not been tested sufficiently to ensure the level ranges/etc are actually good data. please don't use the encounters yet; this just gets it out to testers for finding more edge cases.
2025-12-14 20:01:07 -06:00
Kurt
a437fecab8 Reuse EntityGender magic ratio values 2025-11-24 17:21:49 -08:00
Kurt
84e5382134 Update EncounterGenerator9X.cs
Nobody cares about SW/SH for a month eh
2025-11-18 00:25:02 -06:00
Kurt
d5bf6e67d5 Extract bonus move interface from slot6ao/8b-under 2025-11-15 22:15:25 -06:00
Kurt
404bd1036c Fix recognition of Gen9 eggs
Closes #4605
2025-10-27 19:53:10 -05:00
Kurt
fd1c538cc5
Changes for Legends: Z-A support (#4596)
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-10-26 19:01:44 -05:00
Kurt
dd5d6a4e39 Minor tweaks
no functional change
2025-08-22 16:33:04 -05:00
Kurt
e25b2037e2 game->version 2025-08-16 09:21:16 -05:00
Kurt
d4bbb6dd02 Misc tweaks
Ball: all ball IDs are in a sequence +1'd. No need to have an array when we can just increment within the range. Ez removal of static constructor and allocation, and better iteration (and skips index 0!)
Disallow E/FR/LG item deposits of anything besides general pouch (R/S is like G/S/C, any pouch). Confirmed via testing in-game and matches Bulbapedia's testing.
Disallow Gen2 held item being an HM; no longer considered valid as a tradeback catch rate value. Oops that HMs were "allowed" for so long!
Encode Gen2 held items to bitflag array to not need to compute the merged array. Relocate duplicated logic to a single location in ItemConverter.
Fix gender-changing marill edge case comparing the wrong ratio
2025-08-08 23:43:22 -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
747d083975 Update EncounterEnumerator5.cs 2025-07-23 23:13:53 -05:00
Kurt
b4edc389bb Rearrange gen3/4 deferral enum
null check necessary for unset deferral needing to ignore max
2025-07-12 01:29:37 -05:00
Kurt
cdb5770f5f Minor tweaks
Fixes cosmetic issue on gen4 seed example times
no functional change otherwise
2025-07-08 23:00:27 -05:00
Kurt
0b77aa5729 Add swsh string check
Replace debug assert in SWSH encounter finder
Add dir arg for pogo pickle reload for debug builds
re-add latest outbreaks
2025-07-06 18:48:49 -05:00
Kurt
607901dda1 Misc tweaks 2025-07-04 16:06:26 -05:00
Kurt
fbde4f585d Small enhancement to encdb ui
Shift click type checkbox to un-check others
Search button disables itself if the search would return nothing
When using tabs as criteria, if hyper training is available, only require the specified imperfect IVs for the encounter

enc9: be a little nicer and allow a slight search lag by only considering actual encounterable attempts (passing slot check). Can infrequently obtain a 0-speed shiny Foongus via encDB with a few attempts.
2025-07-04 01:35:48 -05:00
Kurt
416e519073 Misc tweaks
No functional change, just xmldoc and small inlining
2025-06-14 21:39:49 -05:00
Kurt
d072f14570 Update EncounterCriteria.cs 2025-06-10 18:53:29 -05:00
Kurt
602b1b6371 Add more xmldoc 2025-06-01 11:08:07 -05:00
Kurt
bf9e53efa1 Misc tweaks
Add more xmldoc
Simplify some expressions
Reduce unnecessary logic
2025-05-31 22:51:55 -05:00
Kurt
1d9fc99413 Misc tweaks
Add Count to IPersonalTable
Revise EncounterOrigin for evo chain search to use Context instead of Version
Use ITrainerID*ReadOnly as pivot for Trainer ID verification skip
Add more xmldoc
Reconfigure pla dex task fetch to be nullable, match fbs field ordering for clarity
2025-05-24 22:59:13 -05:00
Kurt
48954533b5 Make mysterygifts memory-backed objects 2025-05-24 00:10:57 -05:00
Kurt
47bc45d854 GetLevelLearnMove->TryGetLevelLearnMove
As alluded to in 7442e86d65
2025-05-18 01:36:05 -05:00
Kurt
83bc2bf653 Set egg form for gen5-9
Missed this in the PR
gen5 needs form for basculin
2025-05-14 01:35:11 -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
77f1b637c9 Misc tweaks 2025-05-02 01:34:49 -05:00
Kurt
8a19968321 Minor clean 2025-04-13 11:55:20 -05:00
Kurt
92cd8feaf1 Use entitycontext for xmldoc instead of lump 2025-04-13 11:34:17 -05:00
Kurt
83aff8b889 Add murkrow rebattle empty set
ty Unknown Warrior on discord for reporting

enhance heracross' note
2025-03-27 00:15:49 -05:00
Kurt
32887b5659 Revise LockFinder to accept u32, not pidiv 2025-03-12 21:24:38 -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
0de0bd4c0b Add setting to allow colliding gen3/4 egg pidivs
For those who think it is funny to RNG abuse egg PID/IVs to match a recognizable algorithm type. Opt-in setting because 99.9% of the time it's going to be a hack.
#4347
#3894
#3092
2025-03-06 09:37:26 -06:00
Kurt
a084291532 Gen3 rse swarm: fix gen on rs, match
don't complain on random discords, actually report issues k thx
2025-03-02 22:45:51 -06:00
Kurt
e04ad2c6b2 Misc tweaks
Fixes shiny rayquaza
some lowering int->byte
Fix event3 random restricted seed fetch for gender
Fix gen8a encdb filters excluding static encounters, now will be properly excluded
2025-02-01 10:42:26 -06:00
Kurt
8e5de20881
Add Form to EncounterCriteria, apply from seed interface (#4433)
When generating from templates with randomly correlated forms, the EncounterCriteria will now seek for a match for that feature if specified. Granted this is just a cosmetic seek for Generation 4 Unown -- Gen3 Unown is locked to a specific form for each encounter slot.

Also adds an interface to templates that expose a shortcut to SetPINGA's randomness, for those who know what seed they want to generate from. This is currently only implemented into encounters from Gen8 (Raids/8b Roamers), Gen9 (Tera Raids), and Gen3 events (Channel, as others can be found via IVs quickly -- Channel's reversal from IVs isn't performant).
2025-01-31 21:08:27 -06:00
Kurt
7d59e3416a Minor tweaks
== null
to
is null
2025-01-27 16:37:37 -06:00
Kurt
46c808d118 Enhance fail-retry PID generation for raids
try with criteria -> try with critera-w/o-IVs, try without any criteria
2025-01-08 01:02:00 -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
37e4b06a9e Misc tweaks
Make nick/trainer'd encounters use RoM instead of string[] to truly make them readonly records, and skip 1 dereference on access
add some xmldoc
fix open file suggesting main from another folder
2025-01-04 21:43:55 -06:00
Kurt
c30a335404 Update EncounterCriteria.cs 2024-11-18 20:46:50 -06:00
Kurt
0b686d428b Change EncounterCriteria to use Level Range 2024-11-18 20:33:33 -06:00
Kurt
ceb669c112
Update to .NET 9, c# 13 (#4390) 2024-11-17 13:13:58 -06:00