Commit graph

2722 commits

Author SHA1 Message Date
Lusamine
a97e74e628 Correct Arceus Chronicles Growlithe dates 2022-09-02 02:40:40 -05:00
Lusamine
7bab0270bb Fix Wish Ralts moveset
Thanks @Kermalis !
2022-09-01 23:27:58 -05:00
Kurt
59c518f268 Condense moveset deletion check 2022-09-01 20:57:39 -07:00
Lusamine
8ecbd08efd Add start date for Arceus Chronicles Growlithe event 2022-09-01 21:04:56 -05:00
Kurt
e8aa2c8ed1 Correctly check xy/sm if not ao/usum levelup 2022-09-01 09:34:40 -07:00
Kurt
f4f9df3a81 Don't add new gs moves to pk1 permit array
Out of range
https://projectpokemon.org/home/forums/topic/62190-user-message-an-unhandled-exception-has-occurred-you-can-continue-running-pkhex-but-please-report-this-error
2022-08-31 21:03:26 -07:00
Kurt
88ac14946d Don't be as strict with shedinja evo moves
EncounterMovesetGenerator doesn't specify a clean encounter, don't check it as thoroughly.
2022-08-31 19:09:06 -07:00
Kurt
fb9deab202 Specify full gift egg wc3 moveset
PKHeX needs the exact moveset rather than a "permit this extra move" because our recent logic improvements check for strict moveset matching when it is still an egg.
Closes #3577 thanks @wararjey !
2022-08-31 18:55:17 -07:00
Kurt
71e08222cf Update 22.08.31 2022-08-30 22:49:54 -07:00
Kurt
d350bb7fee Misc fixes & pickle updates 2022-08-30 21:15:07 -07:00
Kurt
66e0613d82 Minor clean 2022-08-30 15:00:45 -07:00
Kurt
f18e884407 Remove unused BDSP bcat logic
ded game, underground distributions unused. no need to differentiate, no need to allocate unused collections.
2022-08-29 17:37:54 -07:00
Kurt
bf37be3ea1 Update LearnVerifierEgg.cs
Order of operations being spooky
2022-08-29 16:08:56 -07:00
Kurt
40649084b3 stackalloc temp unreleased item arrays 2022-08-29 16:08:30 -07:00
Kurt
d8fe34011d Remove some bounds checks, int->byte form oops
https://github.com/kwsch/PKHeX/pull/3575#issuecomment-1229244453
ty @Kermalis !
2022-08-27 12:53:30 -07:00
Kurt
3c232505e5
Refactoring: Narrow some value types (Species, Move, Form) (#3575)
In this pull request I've changed a ton of method signatures to reflect the more-narrow types of Species, Move# and Form; additionally, I've narrowed other large collections that stored lists of species / permitted values, and reworked them to be more performant with the latest API spaghetti that PKHeX provides. Roamer met locations, usually in a range of [max-min]<64, can be quickly checked using a bitflag operation on a UInt64. Other collections (like "Is this from Colosseum or XD") were eliminated -- shadow state is not transferred COLO<->XD, so having a Shadow ID or matching the met location from a gift/wild encounter is a sufficient check for "originated in XD".
2022-08-26 23:43:36 -07:00
Kurt
444c3d2209 Narrow more types 2022-08-26 10:07:24 -07:00
Kurt
6e4613a3a7 Narrow met location value checks for eggs s32->u16 2022-08-26 10:03:46 -07:00
Kurt
28d726da80 Simplify wild ball permitted checks 2022-08-26 01:20:49 -07:00
Kurt
e700a0e3e6 Handle traded BDSP egg transfers 2022-08-25 23:04:38 -07:00
Kurt
ad28f7b261 Delete old utility methods (unused)
MoveEgg: already range check in the Safe method
Inline some logic
2022-08-24 23:49:00 -07:00
Kurt
b241c19520 Simplify some memory args 2022-08-24 23:29:03 -07:00
Kurt
d3c2d77d11 Misc move/memory tweaks
Disallow max moves from Sketch
Hide dmax moves from legal dropdown lists
Pass ushort for moves for validating memories
Internal class for move pp (hide empty class from dll users)
2022-08-24 20:32:40 -07:00
Kurt
43871e856c Specify some lambdas as static
Rewrite some usages to be more clear
bikeshedding at its finest, ignoring more important things to update/fix :)
2022-08-23 23:11:26 -07:00
Kurt
26b1453002 Narrow ribbon count type from int->byte, split interface
Fix RibbonVerifier4 not checking gen4 contest ribbons correctly
Split IRibbonCommon6 to have memory ribbons separate, as they are not implemented in mystery gifts. Also, we can add the boolean flags to the interface, and check that the boolean is set if count is nonzero.
Fix adding ribbons to Gen8 gift templates
Improve Gen8 template ribbon fetch (no closure, faster IndexOf)
2022-08-23 21:25:22 -07:00
Kurt
eb2cef10c9 Minor clean
Stability intensifies
2022-08-22 23:18:53 -07:00
Kurt
0b458395f1 Fix handling for USUM banned species bypass
Tweak EReader check for Shadow3, more straightforward since we can just check the location ID (nothing else uses that location ID).
2022-08-21 19:15:02 -07:00
Kurt
6441bdadd8
Add specialized struct for Moveset and IV specs (#3572)
`Moveset` struct stores 4 moves, and exposes methods to interact with a moveset.
`IndividualValueSet` stores a 6 IV template (signed).

Performance impact:
* Less allocating on the heap: Moves - (8 bytes member ptr, 20 bytes heap->8 bytes member)
* Less allocating on the heap: IVs - (8 bytes member ptr, 28 bytes heap->8 bytes member)
* No heap pointers, no need to jump to grab data.
* Easy to inline logic for checking if moves are present (no linq usage with temporary collections).

End result is faster ctor times, less memory used, faster program.
2022-08-21 17:34:32 -07:00
Kurt
2cb2531288 Add more xmldoc 2022-08-21 01:39:16 -07:00
Kurt
d0ca8403a9 Minor tweaks
Flag enigma berry on ck3/xk3
Suggest national ribbon if missing
Flag N's pkm if any IV is != 30, even if sum is 180.
2022-08-19 22:37:27 -07:00
Kurt
db0b77c493 Update RibbonVerifierCommon7.cs
Closes #3571
2022-08-19 13:22:39 -07:00
Kurt
44c8e772a3 Fix incorrect method call
Copypasta oops, previous commit at fault.
2022-08-18 01:17:03 -07:00
Kurt
3dde8a7cfa Reduce linq usage, minor perf 2022-08-17 23:48:37 -07:00
Kurt
5140c47e84 Pass missing flag so that remove all can revert 2022-08-17 23:47:15 -07:00
Kurt
136f742299 Flag cross-transfer presence if tracker missing
Can't get a Pioneer Ribbon on SW/SH alolan vulpix lacking a HOME Tracker, assuming you have the HOME Tracker setting enabled.
2022-08-16 15:50:35 -07:00
Kurt
912023d756 Fix 7->prev EncounterMovesetGenerator traversal
The dummy EncounterInvalid has Generation:0, when 7->6/2 depends on which generation the encounter originated on. Change it so that the origin generation gets passed along.
2022-08-16 13:14:48 -07:00
Kurt
f62597cc24 Add shared egg moves to GetAllMoves fetch 2022-08-16 12:42:40 -07:00
Kurt
768047cd80
Legality: Rewrite Ribbon Verifier (#3570)
* Rewrite ribbon verification
* Explicitly verifies all ribbons instead of chained iterators.
* Verifies using only the stack, using `struct` and `Span<T>`. No allocation on heap, or `IEnumerable` iterators.
* Verifies all egg ribbons using a separate method, explicitly implemented. No reflection overhead.
* Separates each ribbon interface to separate `static` classes. Easier to identify code needing change on new game update.
* Extracted logic for specific ribbons. Can easily revise complicated ribbon's acquisition rules.
* Simplifies GiveAll/RemoveAll legal ribbon mutations. No reflection overhead, and no allocation.
* Can be expanded in the future if we need to track conditions for ribbon acquisition (was Sinnoh Champ received in BDSP or Gen4?)

End result is a more performant implementation and easier to maintain & reuse logic.
2022-08-15 21:04:30 -07:00
Kurt
3cccb3a9cd Revise alola champ ribbon check 2022-08-12 10:16:12 -07:00
Kurt
b900361ad3 Permit alolan champ ribbon from mystery gift
silly world pikachu gift
2022-08-11 21:03:08 -07:00
sora10pls
7ad70a04c7 Add latest distribution raid data 👿 2022-08-11 20:07:02 -04:00
Kurt
7c4e5e7b04 Add more xmldoc 2022-08-11 00:46:41 -07:00
Kurt
af87d038aa Delete unused logic 2022-08-11 00:25:16 -07:00
Kurt
d1959d90a4 Move files 2022-08-11 00:24:59 -07:00
Kurt
30f2450a30 Minor clean, xmldoc personal tables 2022-08-11 00:24:25 -07:00
Kurt
59fad0e8cf Minor tweaks
Extract some logic (origin markings)
Revise directives for NET7 targeting, remove old net5 refs
2022-08-05 16:18:42 -07:00
Kurt
54910b8fba Early return if no evos
GO transfers like Snivy can be viewed but shouldn't exist in Gen8. This avoids any exception being thrown for shared move check.
2022-08-05 16:18:06 -07:00
Kurt
999caedf6e Allow viewing of un-convertible GO encounters 2022-08-05 11:23:48 -07:00
Kurt
538d651aef Misc tweaks
Add xmldoc, simplify some expressions
2022-08-05 11:23:28 -07:00
Kurt
87e45b14c8 Disallow BD/SP Tower Master ribbon w/mythicals
Thanks TFSthegreat !
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=278427
2022-08-03 20:27:13 -07:00