Add gold bottle cap bypass for LGPE

All IVs are flagged in LGPE even if they're perfect :(
Might have to revisit this for future games and if LGPE transfer out and
maintain these bad flags (this is bad for inspecting parents before
breeding).

Closes #2229 , thanks @SteelPhase (report) and @sora10pls (verified)!
This commit is contained in:
Kurt 2019-01-06 16:21:34 -08:00
parent 0cdaae1d51
commit 744646e30d
2 changed files with 5 additions and 0 deletions

View file

@ -31,6 +31,10 @@ namespace PKHeX.Core
return;
}
// LGPE gold bottle cap applies to all IVs regardless
if (pkm.GG && t.IsHyperTrainedAll()) // already checked for 6IV, therefore we're flawed on at least one IV
return;
for (int i = 0; i < 6; i++) // Check individual IVs
{
if (pkm.GetIV(i) != max || !t.IsHyperTrained(i))

View file

@ -35,6 +35,7 @@ namespace PKHeX.Core
return false;
}
public static bool IsHyperTrainedAll(this IHyperTrain t) => t.HyperTrainFlags == 0x3F;
public static void HyperTrainClear(this IHyperTrain t) => t.HyperTrainFlags = 0;
public static bool IsHyperTrained(this IHyperTrain t) => t.HyperTrainFlags != 0;