mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Add friend safari IV check
2 IVs have to be flawless
This commit is contained in:
parent
7df5072af7
commit
15f2f07b4a
1 changed files with 9 additions and 1 deletions
|
@ -276,7 +276,7 @@ namespace PKHeX
|
|||
}
|
||||
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 @@ namespace PKHeX
|
|||
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))
|
||||
|
|
Loading…
Reference in a new issue