Scripts, Tutorials & Tools This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old 2 Weeks Ago (3:07 PM).
WolfPP's Avatar
WolfPP WolfPP is online now
Discord: Wolf#1235
     
    Join Date: Aug 2018
    Location: Brazil
    Gender: Male
    Nature: Jolly
    Posts: 419
    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:

    Code:
    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!
    Reply With Quote
    Reply

    Quick Reply

    Join the conversation!

    Create an account to post a reply in this thread, participate in other discussions, and more!

    Create a PokéCommunity Account
    Ad Content
    Thread Tools

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -8. The time now is 3:59 PM.