private static bool GetIsDeferredWC6(PKM pkm, WC6 wc) { switch (wc.CardID) { case 0525 when wc.IV_HP == 0xFE: // Diancie was distributed with no IV enforcement & 3IVs case 0504 when wc.RibbonClassic != ((IRibbonSetEvent4)pkm).RibbonClassic: // magmar with/without classic return(true); } if (wc.RestrictLanguage != 0 && wc.RestrictLanguage != pkm.Language) { return(true); } if (!wc.CanBeReceivedByVersion(pkm.Version)) { return(true); } return(wc.Species != pkm.Species); }
private static bool GetIsMatchWC6(PKM pkm, WC6 wc, IEnumerable <DexLevel> vs) { if (pkm.Egg_Location == 0) // Not Egg { if (wc.CardID != pkm.SID) { return(false); } if (wc.TID != pkm.TID) { return(false); } if (wc.OT_Name != pkm.OT_Name) { return(false); } if (wc.OTGender != pkm.OT_Gender) { return(false); } if (wc.PIDType == Shiny.FixedValue && pkm.PID != wc.PID) { return(false); } if (!wc.PIDType.IsValid(pkm)) { return(false); } if (wc.OriginGame != 0 && wc.OriginGame != pkm.Version) { return(false); } if (wc.EncryptionConstant != 0 && wc.EncryptionConstant != pkm.EncryptionConstant) { return(false); } if (wc.Language != 0 && wc.Language != pkm.Language) { return(false); } } if (wc.Form != pkm.AltForm && vs.All(dl => !IsFormChangeable(pkm, dl.Species))) { return(false); } if (wc.IsEgg) { if (wc.EggLocation != pkm.Egg_Location) // traded { if (pkm.Egg_Location != 30002) { return(false); } } else if (wc.PIDType == 0 && pkm.IsShiny) { return(false); // can't be traded away for unshiny } if (pkm.IsEgg && !pkm.IsNative) { return(false); } } else { if (wc.EggLocation != pkm.Egg_Location) { return(false); } if (wc.MetLocation != pkm.Met_Location) { return(false); } } if (wc.Level != pkm.Met_Level) { return(false); } if (wc.Ball != pkm.Ball) { return(false); } if (wc.OTGender < 3 && wc.OTGender != pkm.OT_Gender) { return(false); } if (wc.Nature != 0xFF && wc.Nature != pkm.Nature) { return(false); } if (wc.Gender != 3 && wc.Gender != pkm.Gender) { return(false); } if (pkm.IsContestBelow(wc)) { return(false); } return(true); }