mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-16 21:38:40 +00:00
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).
This commit is contained in:
parent
245f267b03
commit
2a13874aee
2 changed files with 19 additions and 18 deletions
|
@ -17,21 +17,22 @@ internal static class EvolutionRestrictions
|
|||
/// </summary>
|
||||
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 @@ internal static class EvolutionRestrictions
|
|||
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;
|
||||
|
||||
|
|
|
@ -66,8 +66,8 @@ public static class SpeciesCategory
|
|||
/// Checks if the <see cref="species"/> is a Paradox Pokémon.
|
||||
/// </summary>
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue