diff --git a/PKHeX.Core/Legality/Verifiers/BallVerifier.cs b/PKHeX.Core/Legality/Verifiers/BallVerifier.cs index 6348d1b55..0540be575 100644 --- a/PKHeX.Core/Legality/Verifiers/BallVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/BallVerifier.cs @@ -260,6 +260,13 @@ namespace PKHeX.Core if (810 <= species && species <= 818) // G8 Starters return VerifyBallEquals(data, (int)Poke); + if (IsGalarCapture(species)) + { + if (!Legal.WildPokeballs8.Contains(pkm.Ball)) + return GetInvalid(LBallSpecies); + return GetValid(LBallSpeciesPass); + } + Ball ball = (Ball)pkm.Ball; if (ball == Safari) @@ -328,6 +335,18 @@ namespace PKHeX.Core return NONE; } + public bool IsGalarCapture(int species) + { + if (810 <= species && species <= 818) // starter + return false; + if (880 <= species && species <= 883) // fossil + return false; + var pt = PersonalTable.SWSH; + if (((PersonalInfoSWSH) pt.GetFormeEntry(species, 0)).IsPresentInGame) + return true; + return true; + } + private CheckResult VerifyBallEquals(LegalityAnalysis data, int ball) => GetResult(ball == data.pkm.Ball); private CheckResult VerifyBallEquals(LegalityAnalysis data, HashSet balls) => GetResult(balls.Contains(data.pkm.Ball)); private CheckResult VerifyBallEquals(LegalityAnalysis data, ICollection balls) => GetResult(balls.Contains(data.pkm.Ball));