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
36684ab867
Minor clean
...
Simplify some expressions
2020-07-31 11:20:48 -07:00
Kurt
eb7ed44b29
Finish splitting gen1/2 encounter types from parent class
...
Results in a little more code, but each path is less tangled
simplify some expressions
remove RBDragonair content in favor of a strict filter for catch rate
Move gen1 trade trainer names to stringconverter, since pk1/pk2 shouldn't refer to legality classes
2020-07-19 13:32:40 -05:00
Kurt
35435b539e
Refactoring
...
move some logic around
2020-07-18 21:51:38 -05:00
Kurt
085889d419
Pass evolution to trade match check
2020-07-18 21:50:28 -05:00
Kurt
705822c965
Abstract some gen1/2 encounter types from their parent class
2020-07-18 15:36:30 -05:00
Kurt
8fae396b76
Inject matching dexlevel for form comparison
2020-07-18 13:29:16 -05:00
Kurt
4d3fd395e1
Add bypass for DP rotom, skip splitbreed if chain doesn't have splitbreed
2020-07-13 22:30:20 -05:00
Kurt
e04b96a9b3
Fix dizzy punch egg recognition & gen2 hatch conter verification
...
Closes #2939
Fixes #2938
Inline some logic where appropriate for egg levels
2020-07-12 20:58:07 -05:00
Kurt
53e2432818
Fix gen2 egg species get
...
feraligatr isn't in gen8 evolution table yet
Closes #2937
2020-07-11 11:40:20 -05:00
Kurt
993673f0de
Minor clean
...
no functional change
2020-06-27 23:36:53 -05:00
Kurt
3138fb20c6
Refactor some method signatures
...
vs -> chain (clarity on what it is; an evolution chain, rather than e.v.o.s - vs)
Clamp origin chain for transferred where we can use the max origin level
2020-06-27 22:18:29 -05:00
Archit Date
fd48938c8e
fix encounter criteria ability via number ( #2898 )
2020-06-22 22:41:15 -05:00
Kurt
a2d9f06350
Differentiate AbilityType from AbilityNumber
...
invert ability index favoring so that the first ability index is most favored
ability num:
-1=>0/1/2
0=>0/1,
1=>0
2 =>1
4=>2
Ability Type:
0,1,2=>0,1,2
3=>0/1
4=>0/1/2
Should probably get rid of AbilityNumber definition usage but it's so entwined in the trade/static definitions...
2020-06-22 22:01:42 -05:00
Kurt
fc4ba1df35
Bounds check ability requested
...
no longer exception's on RefreshAbility(negative number)
2020-06-21 18:16:18 -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
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
6970c3a5fb
Remove IVersion.set property, as separate interface
...
I don't want people to mutate IEncounterable.Version; it's only intended to be set on-load
2020-05-19 21:46:05 -07:00
Kurt
301350d32b
Make IEncounterable expose IVersion get
2020-05-19 21:07:30 -07:00
Kurt
6164884700
Merge IGeneration into IEncounterable
...
all but egg exposed it; now, just make egg expose it and remove the unnecessary interface
we still need to Set generation for non-eggs/mgift, so have a separate Settable interface for internal purposes.
2020-05-17 12:32:28 -07:00
Kurt
1b5292cb04
append shared egg-moves rather than early return
...
dl[0].Species is the same as pk.Species; more clear && array access might be slower
only append shared egg moves if shared egg moves exist
2020-05-15 22:49:11 -07:00
Kurt
c8a141534c
make enc move gen tree fetch non-pkm specific
...
just need to get all evo chains possible
fetching a GO leafeon, need to reverse leafeon->eevee, but the LGPE evo chains don't know about leafeon
works fine now
2020-05-15 21:59:06 -07:00
Kurt
b8814d2448
Split GG into LGPE (GP/GE), GG (LGPE||GO)
...
Update usages
2020-04-16 12:48:18 -07:00
Kurt
a9a748e82d
Update EncounterTradeGenerator.cs
2020-04-16 11:06:54 -07:00
Kurt
0ada4cbd77
Remove some unnecessary null checks
2020-04-12 13:20:40 -07:00
Kurt
30d21e4532
Extract out showdown set interface
2020-04-12 13:05:29 -07:00
Kurt
270d984130
Minor clean
...
Remove unnecessary null checks
Mark some methods with nullable type
2020-04-04 19:30:50 -07:00
Kurt
94d8125574
Split up Friend Safari checks & generator
...
removes one GetEnumerator call for non-fsafari encounters
2020-03-14 11:32:27 -07:00
Kurt
ed02f39224
Use another overload
...
Co-Authored-By: Archit Date <architdate@gmail.com>
2020-03-04 22:31:07 -08:00
Kurt
549e6f616b
allow shared eggmoves on format
2020-02-22 23:27:47 -08:00
Kurt
509e2f1fa3
Handle more evolution/form checks
...
Closes #2726
1. Add variant evolutions to form-match cases
2. Ban LGPE origin alolan raichu
3. Add egg form check for unavailable regional forms
4. Previous commit fixed mew (remove ribbon interface from WB7)
Co-Authored-By: Matt <sora10pls@users.noreply.github.com>
2020-02-20 22:11:48 -08:00
Kurt
e9e1e5e166
Fix encounter find for passed egg moves
...
https://projectpokemon.org/home/forums/topic/56188-encounter-database-froslass-error/
2020-02-08 13:36:37 -08:00
Kurt
63ea57436f
Make the template IV/contest stat array readonly
...
See prior commits
no longer need to clone subarrays, they're shared immutable
2020-01-18 19:11:29 -08:00
Kurt
843330a375
Remove unnecessary null checks
...
this is a null free project /s
dont provide null, else u deserve to get an exception
2020-01-18 16:57:25 -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
d5948b9dbe
Add relearn moves to Except comparison
...
Burn Up ho-oh is dumb
2020-01-12 16:09:35 -08:00
Kurt
48fd36a9a2
Handle g4 shedinja learn case too
...
change 291/292 to Shedinja/Ninjask for easy enum reference check
2020-01-12 14:34:29 -08:00
Kurt
0eca1bbd1c
g3 shedinja api usage fix
...
see comments in src for justification
need ninjask moves if gen3; dl.Count is guaranteed to be >= 1
2020-01-11 21:41:24 -08:00
Kurt
0dd4d1fe7a
Remove unnecessary casts
2020-01-06 17:50:18 -08:00
Kurt
3d581283c2
Minor clean
...
move Text.cs manual Courier new() to the designer, have it dispose when form is disposed. Set it as the numericupdown's font and just reuse that :)
2020-01-05 18:46:30 -08:00
Kurt
308e6fa291
Add temp workaround for version encounter fetch
...
PKX.Generation is 8, which returns SWSH evo tree; evo tree doesn't have
non-galar-native species data, so stuff like Ambipom don't get reversed
properly.
use math.max for tree fetch when appropriate:
- egg generator: pre-evolutions like pichu should be allowed if pk1
- don't fetch format twice, just do math.max
2020-01-04 11:14:25 -08:00
Kurt
4740fab5ec
Have separate encounter yielder for gen8
...
the "Strong" static encounters can be near-matches with wild encounter
slots; example is a evolved Cutiefly->Ribombee with Quiver Dance.
Remove unnecessary IsLink/FriendSafari check for this gen8 method
https://github.com/kwsch/PKHeX/issues/2573#issuecomment-569126371
2019-12-26 12:32:48 -08:00
Kurt
e6dcf64abe
Disallow Spiky Ear Pichu eggs
...
sneaky gen4 bad hacks are bad
2019-12-24 13:21:56 -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
861d7b6014
Remove unnecessary parameters for species fetch
...
#2567
2019-12-07 00:00:49 -08:00
Matt
7b7a161ac9
Minor fixes ( #2547 )
...
Fix Sinistea/Polteageist Form names (as per Strategy Guide)
Add Eternamax menu sprite
2019-11-30 13:19:22 -08:00
Kurt
e8bdc34a18
Tweak gift generator
...
Yield ranger manaphy gift as possible (encmoveset generator)
Move ranger manaphy equals check to PGT
2019-11-28 10:42:24 -08:00
Kurt
5dec94d456
Handle banned form eggs with more flexibility
...
Closes #2519
better to not generate the encounter as opposed to flagging it after
generation
2019-11-25 00:16:16 -08:00
Archit Date
f96eafa682
grab correct evo stage 1 from evocriteria list ( #2503 )
...
EncounterMovesetGenerator was using the de-evolution order in the passed evocriteria list
2019-11-23 09:01:09 -08:00
Kurt
b29fc5216e
Add shared moveset transfer
...
Closes #2501 for now
2019-11-23 07:27:06 -08:00