• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Custom ability that sends Pokémon out as form 1 instead of form 0

  • 79
    Posts
    9
    Years
    • Seen Jan 12, 2024
    Hello, I'm trying to script an ability that works similarly to Disguise, in that it changes form after being attacked. The difference would be that its "busted" form would show outside of battle, instead of its disguised form. So it would either need to be in form 1 immediately when sent out (as it's meant to trick the player into thinking it's another Pokémon) and change to form 0 after being attacked, or it would need to show as form 1 outside of battle. I tried looking at Illusion's code but it's very complicated, and also different since Zoroark doesn't use different forms.

    How would I go about scripting this? Thank you!
     
    Try copying the code for Xerneas under Pokemon_Forms:

    Code:
    MultipleForms.register(:XERNEAS,{    #Change XERNEAS to the name of your Pokemon.
      "getFormOnEnteringBattle" => proc { |pkmn,wild|
        next 1    #This Pokemon will be form 1 when in battle.
      },
      "getFormOnLeavingBattle" => proc { |pkmn,battle,usedInBattle,endBattle|
        next 0    #This Pokemon will be form 0 when the battles ends.
      }
    })
     
    Back
    Top