mgriffin

Seen 6 Hours Ago
Posted 9 Hours Ago
707 posts
5.5 Years
Maybe we just need this:
Spoiler:

  # Masuda method and Shiny Charm
  shinyretries=0
  shinyretries+=5 if father.language!=mother.language
  shinyretries+=2 if hasConst?(PBItems,:SHINYCHARM) && $PokemonBag.pbHasItem?(:SHINYCHARM)
  if shinyretries>0
    for i in 0...shinyretries
      break if egg.isShiny?
      egg.personalID=rand(65536)|(rand(65536)<<16)
    end
  end
  if ditto0 || ditto1
    egg.makeShiny if mother.isShiny? || father.isShiny?
  end    
  # Inheriting ability from the mother
Looks pretty close, although I think it's slightly buggy in one situation. An exercise for tasmania12 perhaps :)