private static void VerifyWC3Shiny(LegalityAnalysis data, WC3 g3) { // check for shiny locked gifts if (!g3.Shiny.IsValid(data.pkm)) { data.AddLine(GetInvalid(LEncGiftShinyMismatch, CheckIdentifier.Fateful)); } }
private static bool GetIsMatchWC3(PKM pkm, WC3 wc) { // Gen3 Version MUST match. if (wc.Version != 0 && !((GameVersion)wc.Version).Contains((GameVersion)pkm.Version)) { return(false); } bool hatchedEgg = wc.IsEgg && !pkm.IsEgg; if (!hatchedEgg) { if (wc.SID != -1 && wc.SID != pkm.SID) { return(false); } if (wc.TID != -1 && wc.TID != pkm.TID) { return(false); } if (wc.OT_Name != null && wc.OT_Name != pkm.OT_Name) { return(false); } if (wc.OT_Gender < 3 && wc.OT_Gender != pkm.OT_Gender) { return(false); } } if (wc.Language != -1 && wc.Language != pkm.Language) { return(false); } if (wc.Ball != pkm.Ball) { return(false); } if (wc.Fateful != pkm.FatefulEncounter) { // XD Gifts only at level 20 get flagged after transfer bool valid = wc.Level == 20 && pkm is XK3; if (!valid) { return(false); } } if (pkm.IsNative) { if (wc.Met_Level != pkm.Met_Level) { return(false); } if (wc.Location != pkm.Met_Location && (!wc.IsEgg || pkm.IsEgg)) { return(false); } } else { if (pkm.IsEgg) { return(false); } if (wc.Level > pkm.Met_Level) { return(false); } } return(true); }
private static bool GetIsMatchWC3(PKM pkm, WC3 wc) { // Gen3 Version MUST match. if (wc.Version != 0 && !(wc.Version).Contains((GameVersion)pkm.Version)) { return(false); } bool hatchedEgg = wc.IsEgg && !pkm.IsEgg; if (!hatchedEgg) { if (wc.SID != -1 && wc.SID != pkm.SID) { return(false); } if (wc.TID != -1 && wc.TID != pkm.TID) { return(false); } if (wc.OT_Name != null && wc.OT_Name != pkm.OT_Name) { return(false); } if (wc.OT_Gender < 3 && wc.OT_Gender != pkm.OT_Gender) { return(false); } } if (wc.Language != -1 && wc.Language != pkm.Language) { return(false); } if (wc.Ball != pkm.Ball) { return(false); } if (wc.Fateful != pkm.FatefulEncounter) { // XD Gifts only at level 20 get flagged after transfer if (wc.Version == GameVersion.XD != pkm is XK3) { return(false); } } if (pkm.IsNative) { if (hatchedEgg) { return(true); // defer egg specific checks to later. } if (wc.Met_Level != pkm.Met_Level) { return(false); } if (wc.Location != pkm.Met_Location) { return(false); } } else { if (pkm.IsEgg) { return(false); } if (wc.Level > pkm.Met_Level) { return(false); } } return(true); }