diff --git a/PKHeX.Core/Legality/Verifiers/MedalVerifier.cs b/PKHeX.Core/Legality/Verifiers/MedalVerifier.cs index d71ba53ae..199fa91d3 100644 --- a/PKHeX.Core/Legality/Verifiers/MedalVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/MedalVerifier.cs @@ -25,24 +25,41 @@ namespace PKHeX.Core data.AddLine(GetInvalid(LSuperUnused)); int TrainCount = pkm.SuperTrainingMedalCount(); - if (pkm.IsEgg && TrainCount > 0) - { - data.AddLine(GetInvalid(LSuperEgg)); - return; - } - if (TrainCount > 0 && Info.Generation > 6) - { - data.AddLine(GetInvalid(LSuperUnavailable)); - return; - } - if (pkm.Format >= 7) + if (pkm.IsEgg) { + // Can't have any super training data as an egg. + if (TrainCount > 0) + data.AddLine(GetInvalid(LSuperEgg)); if (pkm.SecretSuperTrainingUnlocked) data.AddLine(GetInvalid(LSuperNoUnlocked)); if (pkm.SecretSuperTrainingComplete) data.AddLine(GetInvalid(LSuperNoComplete)); return; } + + if (Info.Generation >= 7 || Info.Generation <= 2) + { + // Can't have any super training data if it never visited Gen6. + if (TrainCount > 0) + data.AddLine(GetInvalid(LSuperUnavailable)); + if (pkm.SecretSuperTrainingUnlocked) + data.AddLine(GetInvalid(LSuperNoUnlocked)); + if (pkm.SecretSuperTrainingComplete) + data.AddLine(GetInvalid(LSuperNoComplete)); + return; + } + + if (pkm.Format >= 7) + { + // Gen6->Gen7 transfer wipes the two Secret flags. + if (pkm.SecretSuperTrainingUnlocked) + data.AddLine(GetInvalid(LSuperNoUnlocked)); + if (pkm.SecretSuperTrainingComplete) + data.AddLine(GetInvalid(LSuperNoComplete)); + return; + } + + // Only reach here if Format==6. if (TrainCount == 30 ^ pkm.SecretSuperTrainingComplete) data.AddLine(GetInvalid(LSuperComplete)); }