diff --git a/PKHeX/Legality/Checks.cs b/PKHeX/Legality/Checks.cs index 9cd5864b1..66472a572 100644 --- a/PKHeX/Legality/Checks.cs +++ b/PKHeX/Legality/Checks.cs @@ -942,22 +942,12 @@ private void verifyEggBallGen7() } if (0x10 < pkm.Ball && pkm.Ball < 0x18) // Apricorn Ball { - if ((pkm.Species > 731 && pkm.Species <= 785) || Lineage.Any(e => Legal.PastGenAlolanNatives.Contains(e))) + if ((pkm.Species > 731 && pkm.Species <= 785) + || Lineage.Any(e => Legal.PastGenAlolanNatives.Contains(e)) + || Lineage.Any(e => Legal.PastGenAlolanScans.Contains(e)) + || Lineage.Any(e => Legal.Inherit_Apricorn.Contains(e))) // past gen { AddLine(Severity.Valid, "Apricorn Ball possible for species.", CheckIdentifier.Ball); - return; - } - if (Lineage.Any(e => Legal.PastGenAlolanScans.Contains(e))) - { - AddLine(Severity.Valid, "Apricorn Ball possible for species.", CheckIdentifier.Ball); - if (pkm.AbilityNumber == 4) - AddLine(Severity.Invalid, "Apricorn Ball with Hidden Ability.", CheckIdentifier.Ball); - } - if (Lineage.Any(e => Legal.Inherit_Apricorn.Contains(e))) - { - AddLine(Severity.Valid, "Apricorn Ball possible for species.", CheckIdentifier.Ball); - if (pkm.AbilityNumber == 4) - AddLine(Severity.Invalid, "Apricorn Ball with Hidden Ability.", CheckIdentifier.Ball); } else AddLine(Severity.Invalid, "Apricorn Ball not possible for species.", CheckIdentifier.Ball); @@ -971,16 +961,13 @@ private void verifyEggBallGen7() else AddLine(Severity.Valid, "Sport Ball possible for species.", CheckIdentifier.Ball); - if (pkm.AbilityNumber == 4) - AddLine(Severity.Invalid, "Sport Ball with Hidden Ability.", CheckIdentifier.Ball); - return; } if (pkm.Ball == 0x19) // Dream Ball { if (Lineage.Any(e => Legal.Inherit_Dream.Contains(e))) AddLine(Severity.Valid, "Dream Ball inheritance possible from Female species.", CheckIdentifier.Ball); - else if (Lineage.Any(e => Legal.InheritDreamMale.Contains(e))) + else if (Lineage.Any(e => Legal.Inherit_DreamMale.Contains(e))) { if (pkm.AbilityNumber != 4) AddLine(Severity.Valid, "Dream Ball inheritance possible from Male/Genderless species.", CheckIdentifier.Ball); @@ -999,8 +986,6 @@ private void verifyEggBallGen7() { if (!Legal.Ban_Gen4Ball_AllowG7.Contains(pkm.Species)) AddLine(Severity.Invalid, "Unobtainable capture for Gen4 Ball.", CheckIdentifier.Ball); - else if (pkm.AbilityNumber == 4) - AddLine(Severity.Invalid, "Ball not possible for species with hidden ability.", CheckIdentifier.Ball); else AddLine(Severity.Valid, "Obtainable capture for Gen4 Ball.", CheckIdentifier.Ball); } @@ -1020,8 +1005,6 @@ private void verifyEggBallGen7() } else if (Legal.Ban_Gen3Ball.Contains(pkm.Species)) AddLine(Severity.Invalid, "Unobtainable capture for Gen3 Ball.", CheckIdentifier.Ball); - else if (pkm.AbilityNumber == 4 && 152 <= pkm.Species && pkm.Species <= 160) - AddLine(Severity.Invalid, "Ball not possible for species with hidden ability.", CheckIdentifier.Ball); else AddLine(Severity.Valid, "Obtainable capture for Gen3Ball.", CheckIdentifier.Ball); @@ -1038,8 +1021,6 @@ private void verifyEggBallGen7() if (Lineage.Any(e => Legal.PastGenAlolanScans.Contains(e))) { AddLine(Severity.Valid, "Scanned Beast Ball possible for species.", CheckIdentifier.Ball); - if (pkm.AbilityNumber == 4) - AddLine(Severity.Invalid, "Scanned Beast Ball with Hidden Ability.", CheckIdentifier.Ball); return; } // next statement catches all new alolans diff --git a/PKHeX/Legality/Tables7.cs b/PKHeX/Legality/Tables7.cs index b139bf040..5a1122119 100644 --- a/PKHeX/Legality/Tables7.cs +++ b/PKHeX/Legality/Tables7.cs @@ -361,15 +361,47 @@ public static partial class Legal }; internal static readonly int[] Inherit_SafariMale = { - 081, 100, 128, 337, 338, 374, 436, + 128, // Tauros }; - internal static readonly int[] InheritDreamMale = + internal static readonly int[] Inherit_SafariDitto = { - 001, 004, 007, 25, 81, 100, 236, 120, 128, 137, - 172, - 252, 255, 258, 337, 338, 343, 374, - 387, 390, 393, 436, 479, - 511, 513, 515, 538, 539, 574, 599, 622, + 081, // Magnemite + 100, // Voltorb + 337, // Lunatone + 338, // Solrock + 374, // Beldum + 436, // Bronzor + }; + internal static readonly int[] Inherit_DreamMale = + { + // Starting with Gen7, Males pass Ball via breeding with Ditto. + 001, 004, 007, // Gen1 Starters + 025, // Pikachu + 128, // Tauros + 172, // Pichu + 236, // Tyrogue (100% Male) + 252, 255, 258, // Gen2 Starters + 387, 390, 393, // Gen3 Starters + 511, 513, 515, // Gen5 Monkeys + 538, // Throh + 539, // Sawk + 574, // Gothita + }; + internal static readonly int[] Inherit_DreamDitto = + { + // Not actually possible, but just store as documentation + 081, // Magnemite + 100, // Voltorb + 120, // Staryu + 137, // Porygon + 337, // Lunatone + 338, // Solrock + 343, // Baltoy + 374, // Beldum + 436, // Bronzor + 479, // Rotom + 599, // Klink + 622, // Golett }; internal static readonly int[] Ban_Gen3Ball_AllowG7 = {