From bee4a54148ec4637bf78820f7c7160a2d71ac24f Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 2 Jan 2022 15:03:04 -0800 Subject: [PATCH] Ignore encounter if bad catch rate Waffling on this, let's just be less lenient in error messages and just outright reject the encounter. --- PKHeX.Core/Legality/Areas/EncounterArea1.cs | 2 +- .../Legality/Encounters/EncounterStatic/EncounterStatic1.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/PKHeX.Core/Legality/Areas/EncounterArea1.cs b/PKHeX.Core/Legality/Areas/EncounterArea1.cs index 40935e4a2..54ee9da2d 100644 --- a/PKHeX.Core/Legality/Areas/EncounterArea1.cs +++ b/PKHeX.Core/Legality/Areas/EncounterArea1.cs @@ -60,7 +60,7 @@ namespace PKHeX.Core if (rate != -1) { var expect = (slot.Version == GameVersion.YW ? PersonalTable.Y : PersonalTable.RB)[slot.Species].CatchRate; - if (expect != rate && !GBRestrictions.IsTradebackCatchRate(rate)) + if (expect != rate && !(ParseSettings.AllowGen1Tradeback && GBRestrictions.IsTradebackCatchRate(rate))) break; } yield return slot; diff --git a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic1.cs b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic1.cs index 01b710936..247cc5b85 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic1.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic1.cs @@ -48,6 +48,8 @@ protected override bool IsMatchPartial(PKM pkm) { + if (ParseSettings.AllowGen1Tradeback) + return false; if (pkm is not PK1 pk1) return false; if (IsCatchRateValid(pk1))