public bool check(Frame_Misc f) { if (Pokerus && f.Pokerus == 0) { return(false); } if (CurrentSeed != null && !System.Text.RegularExpressions.Regex.IsMatch(f.CurrentSeed, CurrentSeed)) { return(false); } if (Random) { switch (CompareType) { case 0: if (f.RandN >= Value) { return(false); } break; case 1: if (f.RandN < Value) { return(false); } break; case 2: if (f.RandN != Value) { return(false); } break; } } if (SOS) { if (Success && !f.Srt.Success) { return(false); } if (HA && !f.Srt.HA) { return(false); } if (Sync && !f.Srt.Sync) { return(false); } if (Slot.Any(n => n) && !Slot[f.Srt.Slot]) { return(false); } } if (Capture && Success && !f.Crt.Gotta) { return(false); } if (FacilityFilter?.IsDifferentFrom(f.frt) ?? false) { return(false); } if (TrainerFilter?.IsDifferentFrom(f.trt) ?? false) { return(false); } return(true); }
public bool check(Frame_Misc f) { if (Pokerus && f.Pokerus == 0) { return(false); } if (BaseTime.Visible && (CurrentSeed != null && BaseTime.Text != "")) { string sum = ((f.Rand32 + ulong.Parse(BaseTime.Text, NumberStyles.HexNumber)) & 0xFFFFFFFF).ToString(); string currentSeedDec = ulong.Parse(CurrentSeed, NumberStyles.HexNumber).ToString(); if (sum.Length >= 2 && currentSeedDec.Length >= 2 && sum.Length == currentSeedDec.Length && sum.Substring(sum.Length - 3) == currentSeedDec.Substring(currentSeedDec.Length - 3) && sum.Substring(0, 1) == currentSeedDec.Substring(0, 1)) { return(true); } else { return(false); } } if (CurrentSeed != null && !System.Text.RegularExpressions.Regex.IsMatch(f.CurrentSeed, CurrentSeed)) { return(false); } if (Random) { switch (CompareType) { case 0: if (f.RandN >= Value) { return(false); } break; case 1: if (f.RandN < Value) { return(false); } break; case 2: if (f.RandN != Value) { return(false); } break; } } if (SOS) { if (Success && !f.Srt.Success) { return(false); } if (HA && !f.Srt.HA) { return(false); } if (Sync && !f.Srt.Sync) { return(false); } if (Slot.Any(n => n) && !Slot[f.Srt.Slot]) { return(false); } } if (Capture && Success && !f.Crt.Gotta) { return(false); } if (FacilityFilter?.IsDifferentFrom(f.frt) ?? false) { return(false); } if (TrainerFilter?.IsDifferentFrom(f.trt) ?? false) { return(false); } return(true); }