mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Update vc1 invalid transfer pruning
Closes #2065 Thanks @WEERSOQUEER ! Single evo species weren't getting flagged in the evolution verification as they early returned (species matched), just move the sanity check before that
This commit is contained in:
parent
69e7d49d03
commit
9a91619580
4 changed files with 6 additions and 2 deletions
|
@ -29,14 +29,14 @@ namespace PKHeX.Core
|
|||
/// <returns>Evolution is valid or not</returns>
|
||||
private static bool IsValidEvolution(PKM pkm, LegalInfo info)
|
||||
{
|
||||
if (info.EvoChainsAllGens[pkm.Format].Count == 0)
|
||||
return false; // Can't exist as current species
|
||||
int species = pkm.Species;
|
||||
if (info.EncounterMatch.Species == species)
|
||||
return true;
|
||||
if (info.EncounterMatch.EggEncounter && species == 350 && pkm.Format >= 5 && !pkm.IsUntraded) // Prism Scale
|
||||
return true;
|
||||
|
||||
if (EvolutionChain.GetEvoChainSpeciesIndex(info.EvoChainsAllGens[pkm.Format], pkm.Species) < 0)
|
||||
return false; // Can't exist as current species
|
||||
if (info.Generation > 0 && info.EvoChainsAllGens[info.Generation].All(z => z.Species != info.EncounterMatch.Species))
|
||||
return false; // Can't exist as origin species
|
||||
|
||||
|
|
|
@ -69,7 +69,11 @@ namespace PKHeX.Core
|
|||
while (mostEvolved.Species > maxspeciesgen)
|
||||
{
|
||||
if (queue.Count == 0)
|
||||
{
|
||||
if (g <= 2 && pkm.VC1)
|
||||
GensEvoChains[pkm.Format] = NONE; // invalidate here since we haven't reached the regular invalidation
|
||||
return GensEvoChains;
|
||||
}
|
||||
if (mostEvolved.RequiresLvlUp)
|
||||
{
|
||||
// This is a gen 3 pokemon in a gen 4 phase evolution that requires level up and then transfered to gen 5+
|
||||
|
|
BIN
Tests/PKHeX.Tests/Legality/Illegal/Misc/VC1 Celebi transfer.pk7
Normal file
BIN
Tests/PKHeX.Tests/Legality/Illegal/Misc/VC1 Celebi transfer.pk7
Normal file
Binary file not shown.
BIN
Tests/PKHeX.Tests/Legality/Illegal/Misc/VC1 Sentret transfer.pk7
Normal file
BIN
Tests/PKHeX.Tests/Legality/Illegal/Misc/VC1 Sentret transfer.pk7
Normal file
Binary file not shown.
Loading…
Reference in a new issue