Kurt
3c42978afa
Use IndexOf instead of FindIndex when possible
2021-01-16 12:47:02 -08:00
Kurt
c32b38a53c
Minor annotation tweaks
...
no functional change
2021-01-12 22:26:08 -08:00
Kurt
890ce9ea4e
Simplify some expressions
...
Search array for index rather than loop and check; gives early-break too -- was O(n) now is O(<~n)
2021-01-12 22:25:30 -08:00
Kurt
e663ffdd35
Fix comparison
2021-01-02 20:52:39 -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
04f8efec4f
Move more breeding logic to Breeding
...
Simplify some method signatures, reduce checks for MoveEgg.GetEggMoves
ran legality checks for 100,000 pkm, no more exceptions (Internal Error) -- added a "CanGameGenerateEggs" which filters out unused gameIDs
2021-01-01 15:01:22 -08:00
Kurt
080f6f827d
Replace pkm.GG references with direct version checks
...
No longer tied to met location
2020-12-31 17:45:11 -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
93910df2c6
Use new switch statements
2020-12-23 17:14:38 -08:00
Kurt
324ce9d6ac
Minor clean
2020-12-23 09:34:29 -08:00
Kurt
e34c8df044
Revise some method signatures
2020-12-22 20:50:33 -08:00
Kurt
d288a32ef5
Permit TR flags for "Can Relearn", split branching for TR checks
2020-12-22 09:10:10 -08:00
Kurt
997e0751f3
Minor clean
...
Handle remainder of c#9 sugar
Fix some spelling mistakes
2020-12-21 23:37:07 -08:00
Kurt
98be0f6739
Target type'd new
2020-12-21 17:17:56 -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
ebc1cec3da
Extract breeding info to separate class
...
Remove splitbreed check in encounteregg2 generator; gen is always 2, never >=3, so the splitbreed check is never executed
2020-12-07 20:54:55 -08:00
Kurt
0af0c05bac
Update go slot list yield and move fetch
2020-11-18 21:34:40 -08:00
Kurt
7cb6ee0060
Move some static arrays closer to where they're used
...
Split EvolutionRestrictions to its own class
Can probably refine things further to clamp down access to these arrays
2020-11-02 13:11:51 -08:00
Kurt
d257ad1b1a
Update MoveTutor.cs
2020-11-01 19:59:26 -08:00
Kurt
2303077ed1
Expose move source classes for api purposes
...
Not guaranteeing the method signature will be stable forever, but allows people to reference the public methods inside.
Closes #3056
2020-10-27 09:25:33 -07:00
Kurt
2e4af1afc5
Update legality comparisons for Crown Tundra
...
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2020-10-24 11:16:01 -07:00
Kurt
0741c8c035
Handle Calyrex TR bug
...
Co-Authored-By: ReignOfComputer <2667537+ReignOfComputer@users.noreply.github.com>
2020-10-24 11:12:25 -07:00
Kurt
7a01b1249c
Minor clean
...
Handle more messages, add more xmldoc
2020-10-18 09:43:41 -07:00
Kurt
367859c536
Make MoveEgg / MoveTM internal methods public
...
Closes #3031
2020-10-13 11:22:13 -07:00
Kurt
0de76b57b1
Handle incorrect bred stunfisk local form value
...
The game uses 0x5E if 0x5A+everstone, otherwise it uses 0x58
For determining the seed species-form, we want to use everstone breeds as that resolves to the correct species-form values.
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-Authored-By: Marty-D <1645989+Marty-D@users.noreply.github.com>
2020-10-08 13:12:25 -07:00
Kurt
fe7a4df17e
Clean out some gb era version flagging
2020-10-06 20:05:38 -07:00
Kurt
757456bf06
Move reset action to class
2020-10-04 12:08:16 -07:00
Kurt
5d3bc289b6
seal hunting
...
Mark things as sealed as they shouldn't be inherited from or overriden in a derived class.
2020-09-07 13:51:13 -07:00
Kurt
cf9e5ec37f
Minor refactoring
...
Change Ability array to IReadOnlyList, add method to check ability index in personal data
Suppress some message warnings
Change EvolutionChain short-circuit for VC to jump from gen6 directly down to gen2. There aren't any notradeback 1 situations, so a notradeback1 will always start with g=1, so no need for the other if-continue.
Simplify pk5 conversion
2020-09-06 10:53:13 -07:00
Kurt
12d9397c8c
Split GO from "GG" gameversion
...
Make Gen7b as the combined ver for that expression
2020-08-06 18:24:20 -07:00
Kurt
a7ba178005
Remove unreachable/const logic
...
Earlier compares result in some logic being unnecessary
The Gen7 level up move compare was actually an oversight, so it's a worthwhile fix :)
2020-06-27 22:44:14 -05:00
Kurt
5f58250b17
Pass species param to exists-in check
...
Closes #2905
2020-06-27 14:04:28 -05:00
Kurt
0836d3191d
Rewrite some magic gender value logic
...
it's always been a byte for ratios, but we never know; plus, it's a little more self documenting
2020-06-27 12:01:28 -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
36dd5ece21
Initial Isle of Armor support
...
Co-Authored-By: sciresm <sciresm@users.noreply.github.com>
Co-Authored-By: Matt <sora10pls@users.noreply.github.com>
Co-Authored-By: Archit Date <architdate@gmail.com>
2020-06-19 18:51:15 -05:00
Kurt
6aab8ca449
Minor renaming/type change of passed args
...
Next commit will have more changes where we remove some reliance on PKM.GenNumber, in favor of the passed encounter's generation
2020-05-31 12:12:07 -07:00
Kurt
afa368823e
Minor clean
...
handle some compiler messages
2020-05-26 16:59:47 -07:00
Kurt
ed02f39224
Use another overload
...
Co-Authored-By: Archit Date <architdate@gmail.com>
2020-03-04 22:31:07 -08:00
Kurt
15121c2945
Fix shared egg moves for non-galar origin
...
Use the private method; we already know the gen and that the egg moves are permitted
Relocate method to MoveEgg
2020-02-16 19:47:57 -08:00
Kurt
75d8635580
Fix lgpe moveset restriction
...
Closes #2704
Co-Authored-By: BetaLeaf <betaleaf@gmail.com>
2020-02-12 20:25:39 -08:00
Kurt
ffa70e7626
Move files
...
no functional change, just putting stuff in a more appropriate folder
2020-01-25 17:22:20 -08:00
Kurt
8312c52cc1
Make Move[] readonly list
...
contract: don't modify the template movesets
mystery gift now exposes IRelearn, remove unnecessary type checks
2020-01-18 16:46:38 -08:00
Kurt
bd9ec72d98
Misc tweaks
...
Add more direct legality analysis constructors
evo count is >= 1
fix invalid test message
disallow gen2 moves if transferred from gen1
use ^1 instead of len-1 for netcore test project
2020-01-16 23:22:54 -08:00
Kurt
0dd4d1fe7a
Remove unnecessary casts
2020-01-06 17:50:18 -08:00
Kurt
7889a0abe6
Simplify form egg move handling
...
Closes #2588
2019-12-21 13:37:20 -08:00
Kurt
8acb336d51
Use enum for species comparisons
...
slightly easier to read with named values
2019-12-08 17:39:19 -08:00
Kurt
9e4c408ac7
Fix galar form egg move fetch
...
Closes #2500
2019-11-22 21:32:05 -08:00
Kurt
f88388cb70
Add Form (AltForm) to IEncounterable interface
...
All of the encounterable templates have Form anyway; funny that I was
consistent naming them all differently than pkm.AltForm :)
Closes #2452
2019-11-18 22:20:55 -08:00
Kurt
13adc38ee8
Add elemental tutors
...
Closes #2443
Capture some array references to avoid re-fetching array -- array
reference is readonly so it probably won't matter
2019-11-17 11:13:57 -08:00
Kurt
cefb56a749
Sword/Shield Update
2019-11-15 17:52:08 -08:00