mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-30 02:02:18 -05:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ private int EvolveSingle(Span<EvoCriteria> 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>(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>(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);
|
||||
|
||||
@@ -11,7 +11,7 @@ public sealed class EvolutionRuleTweak
|
||||
public static readonly EvolutionRuleTweak Default = new();
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public static readonly EvolutionRuleTweak Level100 = new() { AllowLevelUpEvolution100 = true };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user