Vendily

Multiple Forms Egg Moves

Jun 29th, 2017
145
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #edits
  2. #PField_DayCare
  3.   if movefather.isMale?
  4. =begin Replace and possibly delete comment, It kept giving me syntax errors
  5.     pbRgssOpen("Data/eggEmerald.dat","rb"){|f|
  6.        f.pos=(babyspecies-1)*8
  7.        offset=f.fgetdw
  8.        length=f.fgetdw
  9.        if length>0
  10.          f.pos=offset
  11.          i=0; loop do break unless i<length
  12.            atk=f.fgetw
  13.            moves.push(atk) if movefather.hasMove?(atk)
  14.            i+=1
  15.          end
  16.        end
  17.     }
  18. =end
  19.     eggMove=egg.getEggMoves
  20.     if eggMove.length>0
  21.       eggMove.each{|atk|
  22.         moves.push(atk) if movefather.hasMove?(atk)
  23.       }
  24.     end
  25.   end
  26.   if USENEWBATTLEMECHANICS
  27. =begin
  28.     pbRgssOpen("Data/eggEmerald.dat","rb"){|f|
  29.        f.pos=(babyspecies-1)*8
  30.        offset=f.fgetdw
  31.        length=f.fgetdw
  32.        if length>0
  33.          f.pos=offset
  34.          i=0; loop do break unless i<length
  35.            atk=f.fgetw
  36.            moves.push(atk) if movemother.hasMove?(atk)
  37.            i+=1
  38.          end
  39.        end
  40.     }
  41. =end
  42.     eggMove=egg.getEggMoves
  43.     if eggMove.length>0
  44.       eggMove.each{|atk|
  45.         moves.push(atk) if movemother.hasMove?(atk)
  46.       }
  47.     end
  48.   end
  49.  
  50. #new
  51.   def getEggMoves
  52.     moves=[]
  53.     pbRgssOpen("Data/eggEmerald.dat","rb"){|f|
  54.        f.pos=(babyspecies-1)*8
  55.        offset=f.fgetdw
  56.        length=f.fgetdw
  57.        if length>0
  58.          f.pos=offset
  59.          i=0; loop do break unless i<length
  60.            atk=f.fgetw
  61.            moves.push(atk)
  62.            i+=1
  63.          end
  64.        end
  65.     }
  66.     return moves
  67.   end
  68.  
  69.   alias __mf_getEggMoves getEggMoves
  70.  
  71.   def getEggMoves
  72.     v=MultipleForms.call("getEggMoves",self)
  73.     if v!=nil
  74.       emove=[]
  75.       v.each{|move| emove.push(getID(PBMoves,move))}
  76.       return emove
  77.     end
  78.     return self.__mf_getEggMoves
  79.   end
RAW Paste Data