mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
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:
parent
0cdaae1d51
commit
744646e30d
2 changed files with 5 additions and 0 deletions
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue