Add Shedinja encounter check

This commit is contained in:
Kaphotics 2016-03-14 17:04:03 -07:00
parent 9ab50c1342
commit c7cb52ecbd

View file

@ -119,6 +119,28 @@ namespace PKHeX
? new LegalityCheck(Severity.Valid, $"Matches #{MatchedWC6.CardID.ToString("0000")} ({MatchedWC6.CardTitle})")
: new LegalityCheck(Severity.Invalid, "Not a valid Wonder Card gift.");
}
if (pk6.Species == 292) // Shedinja
{
if (pk6.Ball != 4)
return new LegalityCheck(Severity.Invalid, "Invalid Shedinja ball.");
if (pk6.Egg_Location != 0)
return new LegalityCheck(Severity.Invalid, "Shedinja should not have an Egg Met date/location.");
if (pk6.Version < 26) // XY
{
var lc = Legal.ValidMet_XY.Contains(pk6.Met_Location)
? new LegalityCheck(Severity.Valid, "Valid X/Y Shedinja.")
: new LegalityCheck(Severity.Invalid, "Invalid X/Y location for Shedinja.");
return lc;
}
if (pk6.Version < 28)
{
var lc = Legal.ValidMet_AO.Contains(pk6.Met_Location)
? new LegalityCheck(Severity.Valid, "Valid OR/AS Shedinja.")
: new LegalityCheck(Severity.Invalid, "Invalid OR/AS location for Shedinja.");
return lc;
}
return new LegalityCheck(Severity.Invalid, "Invalid Shedinja encounter.");
}
if (pk6.WasEgg)
{
// Check Hatch Locations