Fix Zygarde Aura Break formechange detect

original was AltForm != 1, 0 is also invalid so >1 suffices.
remove parameter from method & update usages
This commit is contained in:
Kurt 2018-02-03 21:12:36 -08:00
parent 118a213b6c
commit 14fc71a5d2
2 changed files with 8 additions and 8 deletions

View file

@ -1265,13 +1265,13 @@ namespace PKHeX.Core
// This requires the pokemon to not have 4 other moves identified as egg moves or inherited level up moves.
return 4 > info.Moves.Count(m => m.Source == MoveSource.EggMove || m.Source == MoveSource.InheritLevelUp);
}
internal static bool IsFormChangeable(PKM pkm, int species, int form)
internal static bool IsFormChangeable(PKM pkm, int species)
{
if (FormChange.Contains(species))
return true;
if (IsEvolvedFormChange(pkm))
return true;
if (species == 718 && pkm.InhabitedGeneration(7) && form != 1)
if (species == 718 && pkm.InhabitedGeneration(7) && pkm.AltForm > 1)
return true;
return false;
}

View file

@ -521,7 +521,7 @@ namespace PKHeX.Core
if (e.Gender != -1 && e.Gender != pkm.Gender)
return false;
if (e.Form != pkm.AltForm && !e.SkipFormCheck && !IsFormChangeable(pkm, e.Species, e.Form))
if (e.Form != pkm.AltForm && !e.SkipFormCheck && !IsFormChangeable(pkm, e.Species))
return false;
if (e.EggLocation == 60002 && e.Relearn[0] == 0 && pkm.RelearnMoves.Any(z => z != 0)) // gen7 eevee edge case
return false;
@ -1049,7 +1049,7 @@ namespace PKHeX.Core
if (z.CurrentLevel != -1 && z.CurrentLevel > pkm.CurrentLevel)
return false;
if (z.Form != pkm.AltForm && !IsFormChangeable(pkm, pkm.Species, z.Form))
if (z.Form != pkm.AltForm && !IsFormChangeable(pkm, pkm.Species))
return false;
if (z.OTGender != -1 && z.OTGender != pkm.OT_Gender)
return false;
@ -1280,7 +1280,7 @@ namespace PKHeX.Core
return false;
}
if (wc.AltForm != pkm.AltForm && vs.All(dl => !IsFormChangeable(pkm, dl.Species, wc.AltForm)))
if (wc.AltForm != pkm.AltForm && vs.All(dl => !IsFormChangeable(pkm, dl.Species)))
return false;
if (wc.Ball != pkm.Ball) return false;
@ -1327,7 +1327,7 @@ namespace PKHeX.Core
return false;
}
if (wc.Form != pkm.AltForm && vs.All(dl => !IsFormChangeable(pkm, dl.Species, wc.Form))) return false;
if (wc.Form != pkm.AltForm && vs.All(dl => !IsFormChangeable(pkm, dl.Species))) return false;
if (wc.Level != pkm.Met_Level) return false;
if (wc.Ball != pkm.Ball) return false;
@ -1358,7 +1358,7 @@ namespace PKHeX.Core
if (wc.EncryptionConstant != 0 && wc.EncryptionConstant != pkm.EncryptionConstant) return false;
if (wc.Language != 0 && wc.Language != pkm.Language) return false;
}
if (wc.Form != pkm.AltForm && vs.All(dl => !IsFormChangeable(pkm, dl.Species, wc.Form))) return false;
if (wc.Form != pkm.AltForm && vs.All(dl => !IsFormChangeable(pkm, dl.Species))) return false;
if (wc.IsEgg)
{
@ -1408,7 +1408,7 @@ namespace PKHeX.Core
if (wc.EncryptionConstant != 0 && wc.EncryptionConstant != pkm.EncryptionConstant) return false;
if (wc.Language != 0 && wc.Language != pkm.Language) return false;
}
if (wc.Form != pkm.AltForm && vs.All(dl => !IsFormChangeable(pkm, dl.Species, wc.Form)))
if (wc.Form != pkm.AltForm && vs.All(dl => !IsFormChangeable(pkm, dl.Species)))
{
if (wc.Species == 744 && wc.Form == 1 && pkm.Species == 745 && pkm.AltForm == 2)
{