Commit graph

19 commits

Author SHA1 Message Date
Kurt
bb1d23e112 Minor clean
Use some enums, save a few virtual/static fetches
2021-01-16 12:01:40 -08:00
Kurt
99fe3b59b4 Fix contains indexing incorrectly
blame apr 17 2017 !
a5b1d72f06 (diff-53c2e8acc19c5af65034cf0460ba82ebc7dc00ba61eb142ef4aa2c0cbc1f7cffR2918)
2021-01-04 15:06:52 -08:00
Kurt
1f3d3112d3 Move some future-evolution tables to separate class 2021-01-02 19:11:46 -08:00
Kurt
09089da14e Use more expression return style
Reduces indentation & bracketing, a bit more concise
2021-01-01 17:08:49 -08:00
Kurt
24332b6979 Minor tweaks 2020-12-30 13:08:15 -08:00
Kurt
de840f40d4 Invert some "!is" to "is not" 2020-12-29 00:58:08 -08:00
Kurt
4a8a495d04 Condense some switch expressions
Should be it for now; exhaustively searched for all that made sense to change
2020-12-25 10:58:33 -08:00
Kurt
749fef0ac6 Minor clean 2020-12-24 15:23:38 -08:00
Kurt
98be0f6739 Target type'd new 2020-12-21 17:17:56 -08:00
Kurt
0303eada32 this is not that
clearer than before, yay
2020-12-21 17:12:39 -08:00
Kurt
62018cce1a Unify concepts with different names
AltForm & Form & Forme => Form
GenNumber & Generation => Generation

Extract out SpeciesForm interface, and re-add IGeneration

For those using PKHeX as a dependency, this should be a pretty straightforward manual replacement... GenNumber and AltForm should be quick find-replace`s.
2020-12-10 20:42:30 -08:00
Kurt
52a67f2425 Add Stadium2 Support
Introducing a new PKM format: SK2
Split ICaughtData2 off of PK2 so it can be shared with SK2 when type-checks occur
Add conversion for PK2<->SK2
Split the split-buffer handling for GBPKM to GBPKML (what a name), so that I can reuse shared accessor logic for SK2.
2020-10-02 18:08:40 -07:00
Kurt
c1adab9703 Refactoring
Move logic closer to where it is used rather than in larger static classes

EncounterStatic(7): move VC transfer template creation to class, simplify some sanity checks
EvoChain: g==2 case is never hit as the generation check at the top of the loop already skips
2020-09-05 12:11:43 -07:00
Kurt
75da70069c Remove access to modified captured variable
Get the variable rather than indexing into the array each time

Simplify some expressions in sav7 for readability
Make SAV_EventFlags use comboitem explicitly by type rather than an anonymous type with same member names
2020-08-30 15:48:11 -07:00
Kurt
e532a29e72 Allow gen1 moves on gen2 met data pk2's
Thanks MrPerson0 on discord for notifying us of this mechanic. Stadium 2 can utilize Gen1 learnset data while keeping them in PK2 format, retaining the met data.
2020-08-29 23:47:03 -07:00
Kurt
993673f0de Minor clean
no functional change
2020-06-27 23:36:53 -05:00
Kurt
645db23706 Extract EvoBase and MoveList from Core
These are really old bloated parts of the original legality checking logic; separating for now to rewrite.
2020-06-20 19:44:05 -05:00
Kurt
c730dfa1ba Remove empty ushort[1], improve item combo fetch
held item list now allocates less (concat arrays instead of ienumerables)
item list already prunes out of range items, so simplify data source fetch
simplify item list prune (return as list, so we can call RemoveAll instead of Where.ToList)
2020-01-24 23:29:45 -08:00
Kurt
c739af4767 Extract item restrictions to separate class
Move similar classes to folder
2020-01-16 19:27:29 -08:00
Renamed from PKHeX.Core/Legality/GBRestrictions.cs (Browse further)