diff --git a/PKHeX/Legality/Checks.cs b/PKHeX/Legality/Checks.cs index c56883906..277b03931 100644 --- a/PKHeX/Legality/Checks.cs +++ b/PKHeX/Legality/Checks.cs @@ -1365,6 +1365,9 @@ namespace PKHeX } break; } + + if (pkm.Format >= 7 && pkm.AltForm != 0 && Legal.AlolanOriginForms.Contains(pkm.Species)) + { AddLine(Severity.Invalid, "Form cannot be obtained for pre-Alola generation games.", CheckIdentifier.Form); return; } if (pkm.AltForm > 0 && new[] {Legal.BattleForms, Legal.BattleMegas, Legal.BattlePrimals}.Any(arr => arr.Contains(pkm.Species))) { AddLine(Severity.Invalid, "Form cannot exist outside of a battle.", CheckIdentifier.Form); return; } diff --git a/PKHeX/Legality/Tables7.cs b/PKHeX/Legality/Tables7.cs index 119013481..8e9d9424c 100644 --- a/PKHeX/Legality/Tables7.cs +++ b/PKHeX/Legality/Tables7.cs @@ -268,8 +268,6 @@ namespace PKHeX new EncounterStatic { Species = 103, Form = 1, Level = 40, Relearn = new[]{000, 000, 000, 000}, Ability = 1, Location = -1, }, // Exeggutor-1 new EncounterStatic { Species = 785, Form = 0, Level = 60, Relearn = new[]{000, 000, 000, 000}, Shiny = false, Ability = 1, Location = 030, }, // Tapu Koko new EncounterStatic { Species = 542, Form = 0, Level = 57, Relearn = new[]{382, 437, 014, 494}, Location = -1, }, // Leavanny - - }; private static readonly EncounterTrade[] TradeGift_SM = // @ a\1\5\5 { @@ -293,6 +291,26 @@ namespace PKHeX 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // Johto Balls 0x1A, // Beast }; + internal static readonly int[] AlolanOriginForms = + { + 019, // Rattata + 020, // Raticate + 025, // Pikachu (Cosplay not transferrable) + 026, // Raichu + 027, // Sandshrew + 028, // Sandslash + 037, // Vulpix + 038, // Ninetails + 050, // Diglett + 051, // Dugtrio + 052, // Meowth + 053, // Persian + 074, // Geodude + 075, // Graveler + 076, // Golem + 088, // Grimer + 089, // Muk + }; internal static readonly int[] PastGenAlolanNatives = { 010, 011, 012, 019, 020, 021, 022, 025, 026, 027, 028, 035, 036, 037, 038, 039, 040, 041, 042, 046, 047, 050,