mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-24 04:24:03 -05:00
Add friend safari IV check
2 IVs have to be flawless
This commit is contained in:
@@ -276,7 +276,7 @@ private void verifyEVs()
|
||||
}
|
||||
private void verifyIVs()
|
||||
{
|
||||
if (EncounterType == typeof (EncounterStatic) && (EncounterMatch as EncounterStatic)?.IV3 == true)
|
||||
if ((EncounterMatch as EncounterStatic)?.IV3 == true)
|
||||
{
|
||||
if (pkm.IVs.Count(iv => iv == 31) < 3)
|
||||
{
|
||||
@@ -284,6 +284,14 @@ private void verifyIVs()
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ((EncounterMatch as EncounterSlot[])?.All(slot => slot.Type == SlotType.FriendSafari) == true)
|
||||
{
|
||||
if (pkm.IVs.Count(iv => iv == 31) < 2)
|
||||
{
|
||||
AddLine(Severity.Invalid, "Friend Safari captures should have at least 2 IVs = 31.", CheckIdentifier.IVs);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (pkm.IVs.Sum() == 0)
|
||||
AddLine(Severity.Fishy, "All IVs are zero.", CheckIdentifier.IVs);
|
||||
else if (pkm.IVs[0] < 30 && pkm.IVs.All(iv => pkm.IVs[0] == iv))
|
||||
|
||||
Reference in New Issue
Block a user