From 89e10f0640948c9535ca9ed60cb38ef4575f087d Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 10 Nov 2025 18:43:18 -0600 Subject: [PATCH] Allow level 100 rare candy evo for SW/SH+BD/SP https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/page/34/#findComment-298102 ty JeongJeong --- PKHeX.Core/Legality/Evolutions/EvolutionChain.cs | 6 +++--- .../Evolutions/EvolutionGroup/EvolutionGroupHOME.cs | 4 ++-- PKHeX.Core/Legality/Evolutions/EvolutionRuleTweak.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PKHeX.Core/Legality/Evolutions/EvolutionChain.cs b/PKHeX.Core/Legality/Evolutions/EvolutionChain.cs index eda95513a..efa157183 100644 --- a/PKHeX.Core/Legality/Evolutions/EvolutionChain.cs +++ b/PKHeX.Core/Legality/Evolutions/EvolutionChain.cs @@ -68,10 +68,10 @@ private static EvolutionHistory EvolutionChainsSearch(PKM pk, EvolutionOrigin en while (true) { group.Evolve(chain, pk, enc, history); - var previous = group.GetNext(pk, enc); - if (previous is null) + var next = group.GetNext(pk, enc); + if (next is null) break; - group = previous; + group = next; } return history; } diff --git a/PKHeX.Core/Legality/Evolutions/EvolutionGroup/EvolutionGroupHOME.cs b/PKHeX.Core/Legality/Evolutions/EvolutionGroup/EvolutionGroupHOME.cs index 2ed0ec482..7a66e1662 100644 --- a/PKHeX.Core/Legality/Evolutions/EvolutionGroup/EvolutionGroupHOME.cs +++ b/PKHeX.Core/Legality/Evolutions/EvolutionGroup/EvolutionGroupHOME.cs @@ -236,7 +236,7 @@ private int EvolveSingle(Span result, PKM pk, in EvolutionOrigin en public sealed class EvolutionEnvironment8 : IEvolutionEnvironment { private static readonly EvolutionTree Tree = EvolutionTree.Evolves8; - private static EvolutionRuleTweak Tweak => EvolutionRuleTweak.Default; + private static EvolutionRuleTweak Tweak => EvolutionRuleTweak.Level100; public bool TryDevolve(T head, PKM pk, byte currentMaxLevel, byte levelMin, bool skipChecks, out EvoCriteria result) where T : ISpeciesForm { @@ -280,7 +280,7 @@ public sealed class EvolutionEnvironment8a : IEvolutionEnvironment public sealed class EvolutionEnvironment8b : IEvolutionEnvironment { private static readonly EvolutionTree Tree = EvolutionTree.Evolves8b; - private static EvolutionRuleTweak Tweak => EvolutionRuleTweak.Default; + private static EvolutionRuleTweak Tweak => EvolutionRuleTweak.Level100; public bool TryDevolve(T head, PKM pk, byte currentMaxLevel, byte levelMin, bool skipChecks, out EvoCriteria result) where T : ISpeciesForm => Tree.Reverse.TryDevolve(head, pk, currentMaxLevel, levelMin, skipChecks, Tweak, out result); diff --git a/PKHeX.Core/Legality/Evolutions/EvolutionRuleTweak.cs b/PKHeX.Core/Legality/Evolutions/EvolutionRuleTweak.cs index 053b5b149..94e29f683 100644 --- a/PKHeX.Core/Legality/Evolutions/EvolutionRuleTweak.cs +++ b/PKHeX.Core/Legality/Evolutions/EvolutionRuleTweak.cs @@ -11,7 +11,7 @@ public sealed class EvolutionRuleTweak public static readonly EvolutionRuleTweak Default = new(); /// - /// In Scarlet & Violet, level 100 Pokemon can trigger evolution methods via Rare Candy level up. + /// In Sword & Shield (Generation 8+), level 100 Pokemon can trigger evolution methods via Rare Candy level up. /// public static readonly EvolutionRuleTweak Level100 = new() { AllowLevelUpEvolution100 = true };