WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 1 Hour Ago
Posted 8 Hours Ago
460 posts
271 Days
Analyzing this video, I realized if Kyurem's player does not have the SCARY FACE or GLACIATE moves, when fused with Reshiram or Zekrom, White / Black Kyurem will not have in his moveset the FUSION FLARE / FUSION BOLT, ICE BURN / FREEZE SHOCK moves.
Having this in mind and wanting to make my game as similar as possible to the official, I created the script below for when the player make fusion, Kyurem plus Reshiram or Zekrom:

Inside 'Pokemon_Forms', above GENESECT code, paste:

Spoiler:

MultipleForms.register(:KYUREM,{
"onSetForm"=>proc{|pokemon,form|
   moves=[
      :SCARYFACE,   # Standard
      :FUSIONFLARE, # White Kyurem
      :FUSIONBOLT   # Black Kyurem
   ]
   hasoldmove=-1
   for i in 0...4
     for j in 0...moves.length
       if isConst?(pokemon.moves[i].id,PBMoves,moves[j])
         hasoldmove=i;break
       end
     end
     break if hasoldmove>=0
   end
   # Automatically replace the old form's special move with the new one's
   if form>0
     if pokemon.hasMove?(:SCARYFACE)
       pokemon.moves[hasoldmove] = PBMove.new(getID(PBMoves,:FUSIONFLARE)) if form==1
       pokemon.moves[hasoldmove] = PBMove.new(getID(PBMoves,:FUSIONBOLT)) if form==2
     end
   else
     if pokemon.hasMove?(:FUSIONFLARE) || pokemon.hasMove?(:FUSIONBOLT)
       pokemon.moves[hasoldmove] = PBMove.new(getID(PBMoves,:SCARYFACE))
     end
   end
   
   secondmoves=[
       :GLACIATE,   # Standard
       :ICEBURN,    # White Kyurem
       :FREEZESHOCK # Black Kyurem
   ]
   hassecondoldmove=-1
   for i in 0...4
     for j in 0...secondmoves.length
       if isConst?(pokemon.moves[i].id,PBMoves,secondmoves[j])
         hassecondoldmove=i;break
       end
     end
     break if hassecondoldmove>=0
   end
   # Automatically replace the old form's special move with the new one's
   if form>0
     if pokemon.hasMove?(:GLACIATE)
       pokemon.moves[hassecondoldmove] = PBMove.new(getID(PBMoves,:ICEBURN)) if form==1
       pokemon.moves[hassecondoldmove] = PBMove.new(getID(PBMoves,:FREEZESHOCK)) if form==2
     end
   else
     if pokemon.hasMove?(:ICEBURN) || pokemon.hasMove?(:FREEZESHOCK)
       pokemon.moves[hassecondoldmove] = PBMove.new(getID(PBMoves,:GLACIATE))
     end
   end
}
})


And done :D

P.S: If anyone knew how to simplify the code, please help me! I'll be grateful!