mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 04:24:36 -05:00
Tweak level/origin check for moves
Valid species/movepools are already determined via the dexlevel and prior methods, no need to check again with current species. edge case: sing froslass from CXD won't check gen3 moves (ie, sing)
This commit is contained in:
parent
e635755dfd
commit
86d39f2c81
|
|
@ -2132,7 +2132,7 @@ private static int GetMaxLevelGeneration(PKM pkm)
|
|||
private static int GetMaxLevelGeneration(PKM pkm, int generation)
|
||||
{
|
||||
if (!pkm.InhabitedGeneration(generation))
|
||||
return -1;
|
||||
return pkm.Met_Level;
|
||||
|
||||
if (pkm.Format <= 2)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -258,9 +258,6 @@ private static CheckMoveResult[] ParseMoves(PKM pkm, int[] moves, int[] special,
|
|||
int[] generations = GetGenMovesCheckOrder(pkm);
|
||||
foreach (var gen in generations)
|
||||
{
|
||||
if (!pkm.InhabitedGeneration(gen))
|
||||
continue;
|
||||
|
||||
var HMLearned = new int[0];
|
||||
// Check if pokemon knows HM moves from generation 3 and 4 but are not valid yet, that means it cant learn the HMs in future generations
|
||||
bool KnowDefogWhirlpool = false;
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ public bool InhabitedGeneration(int Generation, int species = -1)
|
|||
return false;
|
||||
|
||||
// Sanity Check Species ID
|
||||
if (Legal.GetMaxSpeciesOrigin(GenNumber) < species && !Legal.GetFutureGenEvolutions(GenNumber).Contains(species))
|
||||
if (Legal.GetMaxSpeciesOrigin(Generation) < species && !Legal.GetFutureGenEvolutions(Generation).Contains(species))
|
||||
return false;
|
||||
|
||||
// Trade generation 1 -> 2
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user