Commit graph

9535 commits

Author SHA1 Message Date
Kurt
3285ecada9 Add MemoryCard detection as latest sav, pkmdb 2023-05-01 16:51:17 -07:00
sora10pls
e5cc0ffd6b SAV5: expose number of unlocked boxes 2023-04-30 18:59:51 -04:00
sora10pls
d55bf21466 Minor fix to LGPE fashion cheat
oops
2023-04-30 12:14:05 -04:00
sora10pls
6eb82e3847 Add unlock all fashion cheat for LGPE 2023-04-30 12:01:08 -04:00
sora10pls
7e2552d918 Expose LGPE current fashion/appearance 2023-04-28 21:14:24 -04:00
sora10pls
94f98d66f5 Add latest distribution raid data 🦎 2023-04-27 20:03:51 -04:00
Eelen
ce431d1df4
Update CHS translations (#3869)
Co-authored-by: Leo <103500840+wubinwww@users.noreply.github.com>
2023-04-27 15:35:10 -07:00
Kurt
583a036d65 Remove eager check of Current
The SaveUtil's ienumerable can be of different collection types, and the result is usually is a collection with >0 count
I think I was initially confused (years and years ago) about "MoveNext" if it discarded the first result.

Remove the eager check of the enumerator's current value because it hasn't yet been moved from the uninitialized state.

Closes #3871

Dispose of the enumerator on the early empty return, since the later async code will dispose once all have been iterated.
2023-04-26 21:41:38 -07:00
sora10pls
d4d353c087 Pokémon GO 0.269 Premier Ball Considerations
Perhaps one of the silliest things PKHeX could account for when it comes to legality 🥒🚫

Data has been added to PGET, but the issue has not been fixed yet, and Beast Ball is still up in the air. More to come?
2023-04-23 22:40:52 -04:00
Kurt
de17753733 Extract iterator flag mask check logic, reuse 2023-04-23 16:43:47 -07:00
Kurt
907ed0b32f struct CheckResult
tiny object, eliminate allocation for them since they're 10-16 bytes at most.
2023-04-23 16:04:04 -07:00
Kurt
b417964193 Condense some expressions for move fetch 2023-04-23 15:51:48 -07:00
Jonathan Herbert
599387e7aa
Fix ORAS Held Items Using XY Held Items By Mistake (#3866)
- Add HeldItems_XY
- Fix that HeldItem_AO pointed to what should have been HeldItems_XY
- Fix HeldItem_AO being inconsistent with the rest of the HeldItems
- Correct HeldItems_AO only having XY  held items and not ones added in ORAS
2023-04-23 01:35:26 -07:00
Kurt
f2ffd2ad1f Allow pointer property references for filters
=Stat_ATK=*Stat_DEF
.Species=0

^ will delete a pkm if the defense stat is equal to the attack stat.
the `*`* allows you to use the value from that property, rather than a value from the instruction

already worked for property-modify (aka copy property value), this just allows you to compare-filter with properties.
2023-04-22 17:58:36 -07:00
Kurt
998b8f1ce0 Minor tweaks
Add unit test for VC kata/hiragana edge case
De-duplicate some slot change notifications
Span in more spots
2023-04-22 17:51:32 -07:00
Lusamine
62173f4deb Add dates for Pokémon Center Mini/Jumbo Pikachu events 2023-04-22 10:00:29 -05:00
Lusamine
62597d17e1 Update Designer automatic code generation 2023-04-21 23:29:50 -05:00
Lusamine
18cbb8158c Standardize MinDate/MaxDate values
3DS ranges from 1/1/2000 to 12/31/2050. After that, it rolls to
1/1/2050. Switch ranges from 1/1/2000 to 12/31/2060 as the settable
range. However, date continues advancing normally after 12/31/2060.
Allow the maximum Switch date range to be 12/31/2099 to match maximum
Met date. This should be comfortably far in advance for anyone who is
alive today.
2023-04-21 22:27:22 -05:00
Kurt
0c1221eae1 Update Pokerus.cs 2023-04-21 00:22:44 -07:00
Kurt
5bdc6b9ef8
Privatize some static fields, more robust legal helper classes. (#3865)
* Uses LearnSource more throughout the codebase when appropriate, rather than loosely coupled pivot methods.
* Hides Learnset/EggMove data inside the LearnSource classes.
* Extracts functionality from the large Legal class & partial Table*.cs files into better performing helper classes.
* Cleans up some code from prior LearnSource commits.
2023-04-20 21:23:15 -07:00
Kurt
9a768dded3 Permit pkrs strain 0 & 8 on Gen3+ context
Ruby & Sapphire had a bug that only looped when (rand) == 0 !!! instead of (rand & 7) == 0.
End result is that the pkrs giving method yields strains 0 & 8 with 30/255 & 1/255 rarity.

Gen2: z80 assembly does NOT work as intended, and has a separate bug that causes strains 9+ to never be obtainable. So close to a neat statistical separation.

Revise the GUI to disable the events on field loading, and allow for selecting Strain0 w/ days !0.
VC2->7 does not transfer pkrs; not that it matters since Gen3++ transfers can spread every strain.

Thanks @SNBeast for clarification on Gen2's assembly logic and repro!

Co-Authored-By: SNBeast <21327530+snbeast@users.noreply.github.com>
2023-04-20 21:20:25 -07:00
Lusamine
b08581aecf Final adjustments to SV Trainer Editor, update localization files 2023-04-16 18:16:41 -05:00
Lusamine
78031f09f1 Better align components of gen 9 Trainer Data Editor 2023-04-16 18:16:41 -05:00
sora10pls
8d452d1cc8 Add pre-Gen 6 move types
Curse unaccounted for because ??? type has no icon, better off displaying as Ghost in all cases
2023-04-16 18:58:59 -04:00
Jonathan Herbert
8fca2075d9
Add Game Start Time Editor For Scarlet and Violet (#3861) 2023-04-16 13:16:34 -07:00
Kurt
fa9a809751
Encapsulate item pouch arrays/etc for finer control (#3860)
* Extract/encapsulate inventory legal arrays to interface+class

Hiding them behind methods allows these to be left as ReadOnlySpan<ushort> and thus never allocate on the heap.
Also refactors out some logic for checking if an item is legal.

End result feels more maintainable and is less bloaty (no more passing in a nullable func)

Batch editing
* Add HasType filter

```
=HasType=11
.HeldItem=Meadow Plate
```

slaps a meadow plate on any pkm with grass type
Use `=PersonalType1=11` for only primary grass types; only-secondary-type grass will not match it.
2023-04-16 12:58:07 -07:00
Jonathan Herbert
52a24a7bb0
Expose FashionUnlock8 From SAV8SWSH (#3859)
Also document what the relevant regions are as constants.
2023-04-16 12:32:25 -07:00
Kurt
5b484f5712 Use byte[] instead of int[] for tile sel 2023-04-15 11:28:35 -07:00
sora10pls
f433d02052 Label profile picture/trainer icon save blocks 2023-04-15 11:59:55 -04:00
Kurt
c73264d4f3 Minor minor perf
Small changes to reduce some allocations
2023-04-15 01:58:37 -07:00
sora10pls
e2fd292ffa Add Gavin's Palafin eligible date range 2023-04-14 08:16:52 -04:00
sora10pls
47f5799fef Add latest distribution raids
Scale: 0
tiny boi
2023-04-13 20:04:00 -04:00
sora10pls
f0a34f68ad Disallow form argument on Gimmighoul
Gimmighoul can't increment its form argument counter, it can only ever be 999 on Gholdengo after evolving.

Also reorder switch cases according to National Dex indexes.
2023-04-13 11:28:05 -04:00
Kurt
ecef31f167 Minor clean 2023-04-13 00:05:10 -07:00
Kurt
b5262d69b0 Dispose of file-loaded bitmap after use
Image.FromFile locks the file until the object is disposed; adjust all uses of Image.FromFile to dispose when finished.

Closes #3857 ty @SNBeast !
2023-04-12 23:22:33 -07:00
Kurt
4caf749064 Misc tweaks
do things a little more directly

blank ctor: we already have the ctor, just invoke it ourselves instead of having to rediscover it
2023-04-10 01:26:54 -07:00
Kurt
ebd061dcd9 location list public (class still internal) 2023-04-10 00:50:11 -07:00
Kurt
6d0c2d9520 Add more overload methods
Learnset: slightly quicker check.
SCBlock: assists when you have Key separate from the encoded data.
2023-04-10 00:49:39 -07:00
Kurt
6182f889a6 Add learnset moves similar to games
Instead of looping, if the moveset is full and a new move is added, the game shifts all arr[1..] down one slot then adds the move at the end.
Since we don't need to keep track of PP/PP Ups, we can just defer the shifting and do n % 4 rotations at the end instead of n rotations (one on each move added).
2023-04-08 12:20:18 -07:00
Kurt
7b0313aa6a Update 23.04.06 2023-04-06 21:52:23 -07:00
Jonathan Herbert
7ea0e21b7d
Add Button To Unlock All Fashion in BDSP Misc Edits (#3856) 2023-04-06 20:54:42 -07:00
Kurt
0dfb012e5c Add Ditto distribution raids 👛
Adds a helper method for SCBlock to measure a size from header.
2023-04-06 19:28:10 -07:00
Kurt
340578b671 Update PGT.cs 2023-04-04 15:03:14 -07:00
Kurt
aeb6595887 Show move elemental type in PKM Editor
Note this is only SV types, so moves that had their type changed (=>dark/steel/fairy) will be inaccurate in past game formats.

Would need time to dump the info.
2023-04-04 14:38:07 -07:00
Manu
43c67fd455
Add wc5full compatibility (#3854)
* Add WC5Full compatibility

* Add .wc5full to mystery gift filter
2023-04-04 07:19:54 -07:00
Kurt
e53ca4b1af Allow setting to 11th slot for !PCD
Oops
2023-04-03 15:43:13 -07:00
Kurt
d6ec64fb00 Update MoveListSuggest.cs 2023-04-02 16:19:56 -07:00
Kurt
fcad4f8e08 Handle WC9.Scale spec per v1.2.0 patch changes
Unnoticed, undocumented, now both.
Pivot based on March 1st for the 4 gift-poke cards that already existed. On that day onward, games must be on v1.2.0 in order to redeem, and thus must follow the fixed scale spec.
2023-04-02 01:19:33 -07:00
Kurt
37eb076bd4 Use placeholder sprite for not-yet-affixed
ty matt
2023-04-01 17:46:10 -07:00
Kurt
c3e51d414d Add click event for affixing ribbons easier
Click affix ribbon via cosmetic tab to open Ribbons (same as Ribbons Button). None affixed, but ribbons/marked available, will show an empty square.
Click possessed ribbon to affix.
2023-04-01 17:23:04 -07:00