mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-30 19:08:14 -05:00
Clamp level range to slot for 3/4=>5+ transfers
This commit is contained in:
@@ -146,7 +146,7 @@ public static EvoCriteria GetLevelConstraint<TEnc>(PKM pk, ReadOnlySpan<EvoCrite
|
||||
foreach (var evo in chain)
|
||||
{
|
||||
if (evo.Species == enc.Species)
|
||||
return evo;
|
||||
return evo with { LevelMin = Math.Max(evo.LevelMin, enc.LevelMin), LevelMax = Math.Min(evo.LevelMax, enc.LevelMax) };
|
||||
}
|
||||
throw new ArgumentException("No matching species found in the evolution chain.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user