Guest User

Untitled

a guest
Aug 20th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. match &filters {
  2. Some(f) => {
  3. if !prng.finished {
  4. let frame = prng.get_frame();
  5. prng.advance();
  6. let iv_check = frame.hp_iv == f.hp_iv
  7. && frame.attack_iv == f.attack_iv
  8. && frame.defense_iv == f.defense_iv
  9. && frame.special_attack_iv == f.special_attack_iv
  10. && frame.special_defense_iv == f.special_defense_iv
  11. && frame.speed_iv == f.speed_iv
  12. && frame.nature() == f.nature;
  13. let shiny_check = match f.shiny_only {
  14. true => frame.is_shiny(f.tid, f.sid),
  15. false => true,
  16. };
  17. if iv_check && shiny_check {
  18. result_sender.send(SearchResult::Match(frame));
  19. filters = None;
  20. }
  21. } else {
  22. result_sender.send(SearchResult::NoMatch);
  23. }
  24. }
  25. None => {}
  26. }
Add Comment
Please, Sign In to add comment