diff --git a/PKHeX.Core/Legality/Core.cs b/PKHeX.Core/Legality/Core.cs index 725fc142b..cf9d46f68 100644 --- a/PKHeX.Core/Legality/Core.cs +++ b/PKHeX.Core/Legality/Core.cs @@ -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; } diff --git a/PKHeX.Core/Legality/Encounters/EncounterGenerator.cs b/PKHeX.Core/Legality/Encounters/EncounterGenerator.cs index 9a18054af..05b52eca6 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterGenerator.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterGenerator.cs @@ -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) {