Account for revised evolution conditions for gen4 new-evos in gen8+

This commit is contained in:
Kurt 2020-10-08 14:28:34 -07:00
parent 9e4ec32e94
commit ea9076ad4c

View file

@ -128,7 +128,7 @@ namespace PKHeX.Core
if (Future_LevelUp.TryGetValue(species | (pkm.AltForm << 11), out var delta))
return met - delta;
if (generation < 4 && Future_LevelUp4.Contains(species))
if (generation < 4 && Future_LevelUp4.Contains(species) && (pkm.Format <= 7 || !Future_LevelUp4_Not8.Contains(species)))
return met - 1;
return met;
@ -163,6 +163,16 @@ namespace PKHeX.Core
(int)Probopass,
};
/// <summary>
/// Species introduced in Generation 4 that used to require a level up to evolve prior to Generation 8.
/// </summary>
private static readonly HashSet<int> Future_LevelUp4_Not8 = new HashSet<int>
{
(int)Magnezone, // Thunder Stone
(int)Leafeon, // Leaf Stone
(int)Glaceon, // Ice Stone
};
/// <summary>
/// Species introduced in Generation 6+ that require a level up to evolve into from a specimen that originated in a previous generation.
/// </summary>