From c60ae57ab05b644e7ddeff26bf1710d97a801ac1 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 2 Nov 2020 16:38:00 -0800 Subject: [PATCH] Handle Ranked Battle Series 7 permissions Closes #3070 Exclude all classified as Legends; everything else is permitted assuming it can exist in SW/SH. Co-Authored-By: Chris <28743231+Bappsack@users.noreply.github.com> --- .../Verifiers/Ribbons/RibbonVerifier.cs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/PKHeX.Core/Legality/Verifiers/Ribbons/RibbonVerifier.cs b/PKHeX.Core/Legality/Verifiers/Ribbons/RibbonVerifier.cs index 4d92f410d..5b65d0f9b 100644 --- a/PKHeX.Core/Legality/Verifiers/Ribbons/RibbonVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/Ribbons/RibbonVerifier.cs @@ -403,20 +403,12 @@ namespace PKHeX.Core // Clamp to permitted species var spec = pkm.Species; - - if (638 <= spec && spec <= 640) - return true; // Sub Legends - if (722 <= spec && spec <= 730) - return true; // Gen7 starters + if (spec > Legal.MaxSpeciesID_8_R2) + return false; + if (Legal.Legends.Contains(spec)) + return false; var pi = (PersonalInfoSWSH)PersonalTable.SWSH[spec]; - var galarDex = pi.PokeDexIndex; - var armorDex = pi.ArmorDexIndex; - if (1 <= galarDex && galarDex <= 397) - return true; - if (1 <= armorDex && armorDex <= 210) - return true; - - return false; + return pi.HP != 0; // exists in game } private static IEnumerable GetInvalidRibbonsEvent1(PKM pkm, IEncounterable enc)