Commit Graph

10452 Commits

Author SHA1 Message Date
Kurt
93c7b765c3 Minor tweaks
Handle ARNG egg manaphy for gen4 trainer, force hatch
add xmldoc/comments
expand expressions for version/language selection, disallow languages correctly
2025-01-08 00:36:02 -06:00
Kurt
c60efc7d14 Revise Manaphy PIDIV checks for antishiny+egg
Handles all permutations correctly
set correct version value for blank DP save (not valid saved ver, need to fall back to D)
2025-01-07 23:45:56 -06:00
Kurt
e1773e83b9 Allow B2W2 Funfest Stunky/Glameow from both games
https: //github.com/kwsch/PKHeX.EncounterSlotDumper/pull/2
Co-Authored-By: Parnassius <11491745+parnassius@users.noreply.github.com>
2025-01-06 21:36:15 -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
c1f0c9e7ae Update dependencies
for .NET 9.0 there's a few
2025-01-04 01:25:14 -06:00
Kurt
b94ab9acb4 Minor clean
No functional change
2025-01-04 01:24:29 -06:00
Kurt
520c849287 Fix Gen1 party+clear
Closes #4410

Also fix trash bytes persistence (only overwrite nickname with default if it visually differs from what is present in the textbox).
Add trash edits to Gen3 HoF
2025-01-03 21:33:22 -06:00
Kurt
674a778bf9 Fix form centering to non-primary screen
The first screen is configured with origin coordinates 0,0; any other screens that are arranged to the left or below will have coordinates in the negative. Negative coordinates are valid; don't sanitize.
2025-01-03 13:35:54 -06:00
Kurt
a1a15fe5b2 Fix opening Gen3 HoF editor
Closes #4409
(icon reference needed to point to the static resource)

Add SAV3 property to check for misconfigured (small) sizes, to disallow editing extdata blocks that don't exist (no exception thrown for the small saves, can't open the GUI)
Rearrange GUI, handle exception when copypasting bad PID and saving, add sprite, add Clear button instead of auto-clearing on species:0, add shiny checkbox (readonly)
2025-01-03 13:32:24 -06:00
Kurt
fdcd71a3b6 Minor clean
Enhance the API for SV's item pouch/items, if anyone bothers to use it
2025-01-02 20:59:37 -06:00
Kurt
d7ecbfe667 Move PLA verifier into MiscVerifier
Only checks PLA stats in PA8 format; no need to type check this in the main method. Might be a good idea to extract format-specific verifiers into classes.

Extract size checks to top level method. A wasted type check isn't too bad compared to all the duplicate logic.
2025-01-02 20:33:15 -06:00
Kurt
9ef46b5f8c Correctly filter dummied moves in BDSP and SV
Less noise in the user drop-downs for moves that aren't available in the game. Unlike SW/SH that has all moves from the past, there's no need to confuse the user with impossible options (unless they turn on HaX, which is unchanged).

Add performant path for dummied move list fetch for Gen8a+
Skip duplicate work for Relearn list fetch (always same as Moves, except for Gen7 relearn)
2025-01-02 20:29:58 -06:00
Kurt
abc1e785d8 Remove fullness/enjoyment from PKM, use interface
No need to carry this baggage further since SV ditched it. PLA and BDSP only have it because there's a gap in the structure that *we assume* is unused (rather than reserved), and is worth checking for legality (unused bytes shouldn't be used).
2025-01-02 20:19:29 -06:00
Kurt
30fdfb29e7 Add context to TrashByte editor
rather than just Generation, context is also important to help select glyphs for different games (Gen7b differing from Gen7?)
2025-01-02 20:17:17 -06:00
Kurt
cb967ef283 Minor adjustments
Inline some gameversion calls, replace `is IAlpha` with immutable interface instead
Add interface to get the mastery object for a given a learnset source & species-form (rather than calling it statically)
Shorten the BallUseLegality expression
Defer ec%100 context to PKX (easy to miss in a future update if any others added down the road)
Rewrite Alpha mark check logic to require entry in to HOME (tracker present) as that's the method of obtaining the mark
Make SaveUtil not allocate, and let the compiler optimize size checks.
2025-01-02 20:15:53 -06:00
Kurt
a6beb0293c Don't bother passing evos for hypertrain check
if it exists in PLA, then it can exist in SWSH/BDSP/SV (as of latest DLC!). Only need to check if it has visited (tracker present).
2025-01-02 20:04:04 -06:00
Kurt
8ec1c8cc81 Extract some magic numbers
If Legends: ZA adds more megas (likely), would have to refactor this monster. Rename the mega check, as SV doesn't have megas, but if ZA is Gen9(a?) we need to segregate somehow.
2025-01-02 19:57:38 -06:00
Kurt
92d49e858f Extract SV Runtime Language get/set
Useful for get to check if things are misaligned in a save file. If future games continue doing this, then we can reuse the enum.
2025-01-02 19:54:46 -06:00
Kurt
a41f32c66b Hide PKX.Personal behind methods
No need to have the entire master personal table visible within the assembly when it is only used for gender fetching. Add 2 methods that return the info that the previous consumers were wanting from the previous logic.
2025-01-02 19:53:29 -06:00
Kurt
88c7256841 Extract common technical record applications
Get a neat API for it to provide an "option" of what all you want set.
Ends up deduplicating some logic in batch editor as well.
2025-01-02 19:51:03 -06:00
Kurt
f77899ab73 Extract entity extension list fetch
No need to have a static member in PKM for something that is only used outside of PKM.cs (save files, GUI, aka file naming)
2025-01-02 19:48:56 -06:00
Kurt
243c4102dc Reduce some allocations in SpeciesName
implement the net9 shortcut for species name lookup from span
don't fetch japanese/spanish names twice or build dictionaries for them
2024-12-31 13:15:02 -06:00
Kurt
e2086d2a0d Misc tweaks
Allow pkm batch editor to take readonlyspan property names
concrete types over `default` for clarity
encounterverifier: use const values for egg levels for clarity
batchediting: fetch all properties only once
etrade4: reduce object size/init by having Contest as a property
2024-12-31 12:53:51 -06:00
Professor Dirty
e4f63848ad Add new translations to CHS and remove obsolete paragraphs (#4406) 2024-12-24 10:58:40 -08:00
Kurt
83df635e04 Add more DPPt underground stats, update names
Closes #4405
2024-12-23 19:31:01 -08:00
sora10pls
e6a8df366d Add latest distribution raid/outbreak data ⚫🐉✨ 2024-12-19 19:03:51 -05:00
Kurt
341106d48f Gift leniency: wish m2>1/4 & frlg togepi m1>4
Closes #4404
Future improvements can add value ranges to restrict based on PIDs (e.g. M1 Wish must be below X, M4 must be above Y, or if it's a range, likewise. Or, if it's a certain %24 result for shuffling considerations).

Co-Authored-By: notblisy <50887637+notblisy@users.noreply.github.com>
2024-12-18 18:35:02 -06:00
R-YaTian
c198ab08e0 Gen 6: Fix Pokemon Link data saving, enable modify BP and PM (#4401)
* Gen6: Fix Pokemon Link data saving, enable modify BP and PM
2024-12-16 20:35:48 -06:00
Pasquale Nardiello
8e42776610 Fixed HallFame3 logic and added GUI for manipulation (#4395)
* Fixed HallFame3 logic and added GUI for manipulation
2024-12-16 20:28:42 -06:00
Pasquale Nardiello
a75e09780c Added Initial edito for Secret Bases in RSE (#4386)
* Started making Secret base 3 editor

* Completed Initial RSE secret bases manipulation.
2024-12-16 20:23:50 -06:00
Kurt
872c79f124 Add gen1 hall of fame editor
Closes #4403

Co-Authored-By: ShadowMario3 <36941677+ShadowMario3@users.noreply.github.com>
2024-12-16 19:37:58 -06:00
Kurt
013cf4cf93 Fix cloning of gen1-3 saves in subeditors
Clone'd saves no longer retain same byte[] refs as original

evident in GUI editors and canceled changes somehow being saved
(gen3 isn't required, because it's unpacked into the blocks, but just be consistent)
2024-12-16 19:37:03 -06:00
sora10pls
e83ae026d6 Add latest distribution raid/outbreak data 😡🐵♟️🦒 2024-12-12 19:04:20 -05:00
Kurt
c6307b40ef Misc tweaks
SAV3: extract struct slice fetch
Metadata: allow setting `Memory<byte>` instead of `byte[]`
Stats: deduplicate gen1/2 mask set
remove some unnecessary spaces (lol)
2024-12-09 01:02:14 -06:00
Kurt
6397cf7723 Revise Gen7b FlagCount
Closes #4396

Co-Authored-By: Fábio H. Attard <fattard@users.noreply.github.com>
2024-12-07 08:20:03 -06:00
Professor Dirty
933c9d03cd Added CHS translation and some corrections to the detection prompts (#4402) 2024-12-06 12:14:34 -06:00
Ka-n00b
0a27880ce6 Update Event Flags (#4398) 2024-12-06 12:13:59 -06:00
sora10pls
a2c03fc0a9 Add latest distribution raid/outbreak data 🐰🔵🟤 2024-12-05 19:04:03 -05:00
sora10pls
ff452bf5a6 Add latest distribution raid/outbreak data 🐦‍⬛🐸🥚 2024-11-28 19:15:36 -05:00
Professor Dirty
7fdd5abc52 Added CHS translation and corrected typos (#4393) 2024-11-27 17:03:06 -05:00
9Bitdo
a4b1da542c Add Korea(KOR) Operation Get Mythical Keldeo, Zarude & Deoxys's date (#4394) 2024-11-27 17:02:35 -05:00
NimbusFox
f2dfeb20af Fixing StatusCondition to report sleep correctly (#4397) 2024-11-27 16:45:56 -05:00
9Bitdo
a60e76f16d Add Operation Get Mythical Keldeo, Zarude & Deoxys's date (#4392) 2024-11-21 21:43:17 -06:00
Kurt
231b3ffe57 IEncounterable: Add down-level interface 2024-11-18 21:58:09 -06:00
Kurt
8c37d9b4b5 Slot3/4: Filter met level on generate 2024-11-18 21:19:53 -06:00
Kurt
c30a335404 Update EncounterCriteria.cs 2024-11-18 20:46:50 -06:00
Kurt
594d133fae Update WA8.cs 2024-11-18 20:40:03 -06:00
Kurt
0b686d428b Change EncounterCriteria to use Level Range 2024-11-18 20:33:33 -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