From 2a13874aee5f51b5c2764a9fe97a5d1015a7ac8a Mon Sep 17 00:00:00 2001 From: Kurt Date: Thu, 21 Dec 2023 16:18:44 -0800 Subject: [PATCH] Rewrite evo move double-check If (evolved into {species}), must have known {move} I think Swinub->Mamoswine and Mankey->Annihilape might have evaded the check prior; was the only other 3-stage evo (now +Hydrapple). --- .../Restrictions/EvolutionRestrictions.cs | 35 ++++++++++--------- PKHeX.Core/Legality/Tables/SpeciesCategory.cs | 2 +- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/PKHeX.Core/Legality/Restrictions/EvolutionRestrictions.cs b/PKHeX.Core/Legality/Restrictions/EvolutionRestrictions.cs index d2681812a..a46279e13 100644 --- a/PKHeX.Core/Legality/Restrictions/EvolutionRestrictions.cs +++ b/PKHeX.Core/Legality/Restrictions/EvolutionRestrictions.cs @@ -17,21 +17,22 @@ internal static class EvolutionRestrictions /// private static ushort GetSpeciesEvolutionMove(ushort species) => species switch { - (int)Eevee => EEVEE, - (int)MimeJr => (int)Mimic, - (int)Bonsly => (int)Mimic, - (int)Aipom => (int)DoubleHit, - (int)Lickitung => (int)Rollout, - (int)Tangela => (int)AncientPower, - (int)Yanma => (int)AncientPower, - (int)Piloswine => (int)AncientPower, - (int)Steenee => (int)Stomp, - (int)Clobbopus => (int)Taunt, - (int)Stantler => (int)PsyshieldBash, - (int)Qwilfish => (int)BarbBarrage, - (int)Primeape => (int)RageFist, - (int)Girafarig => (int)TwinBeam, - (int)Dunsparce => (int)HyperDrill, + (int)Sylveon => EEVEE, + (int)MrMime => (int)Mimic, + (int)Sudowoodo => (int)Mimic, + (int)Ambipom => (int)DoubleHit, + (int)Lickilicky => (int)Rollout, + (int)Tangrowth => (int)AncientPower, + (int)Yanmega => (int)AncientPower, + (int)Mamoswine => (int)AncientPower, + (int)Tsareena => (int)Stomp, + (int)Grapploct => (int)Taunt, + (int)Wyrdeer => (int)PsyshieldBash, + (int)Overqwil => (int)BarbBarrage, + (int)Annihilape => (int)RageFist, + (int)Farigiraf => (int)TwinBeam, + (int)Dudunsparce => (int)HyperDrill, + (int)Hydrapple => (int)DragonCheer, _ => NONE, }; @@ -61,11 +62,11 @@ public static bool IsValidEvolutionWithMove(PKM pk, LegalInfo info) return true; // Exclude evolution paths that did not require a move w/level-up evolution - var move = GetSpeciesEvolutionMove(enc.Species); + var move = GetSpeciesEvolutionMove(species); if (move is NONE) return true; // not a move evolution if (move is EEVEE) - return species != (int)Sylveon || IsValidEvolutionWithMoveSylveon(pk, enc, info); + return IsValidEvolutionWithMoveSylveon(pk, enc, info); if (!IsMoveSlotAvailable(info.Moves)) return false; diff --git a/PKHeX.Core/Legality/Tables/SpeciesCategory.cs b/PKHeX.Core/Legality/Tables/SpeciesCategory.cs index a1152af55..c685e5ca5 100644 --- a/PKHeX.Core/Legality/Tables/SpeciesCategory.cs +++ b/PKHeX.Core/Legality/Tables/SpeciesCategory.cs @@ -66,8 +66,8 @@ public static class SpeciesCategory /// Checks if the is a Paradox Pokémon. /// public static bool IsParadox(ushort species) => species is (>= (int)GreatTusk and <= (int)IronThorns) - or (int)WalkingWake or (int)IronLeaves or (int)RoaringMoon or (int)IronValiant + or (int)WalkingWake or (int)IronLeaves or (int)GougingFire or (int)RagingBolt or (int)IronBoulder or (int)IronCrown; public static bool IsFixedGenderFromDual(ushort currentSpecies) => currentSpecies switch