Ban ball inheritance for bdsp fossils

This commit is contained in:
Kurt
2021-11-21 17:31:45 -08:00
parent 9b8f1c8305
commit ba9db5ae99
2 changed files with 15 additions and 3 deletions

View File

@@ -985,7 +985,7 @@ internal static class BallBreedLegality
};
/// <summary>
/// All egg species that can inherit a Safar Ball when bred in BD/SP.
/// All egg species that can inherit a Safari Ball when bred in BD/SP.
/// </summary>
internal static readonly HashSet<int> InheritSafari_BDSP = new()
{
@@ -1012,5 +1012,17 @@ internal static class BallBreedLegality
(int)Wooper,
(int)Yanma,
};
internal static readonly HashSet<int> BanInheritedBall_BDSP = new()
{
// Gen1 Fossils
(int)Aerodactyl, (int)Omanyte, (int)Kabuto,
// Gen3 Fossils
(int)Lileep, (int)Anorith,
// Gen4 Fossils
(int)Cranidos, (int)Shieldon,
(int)Phione,
};
}
}
}

View File

@@ -257,7 +257,7 @@ private CheckResult VerifyBallEggGen7(LegalityAnalysis data)
private CheckResult VerifyBallEggGen8BDSP(LegalityAnalysis data)
{
int species = data.EncounterMatch.Species;
if (species is (int)Species.Phione)
if (BallBreedLegality.BanInheritedBall_BDSP.Contains(species))
return VerifyBallEquals(data, (int)Poke);
if (data.pkm.Ball == (int)Safari)