• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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] Changing a pokemon's form via a status condition

  • 1
    Posts
    1
    Years
    • Seen Jun 26, 2023
    So I'm helping do some coding for a friend and I keep running into an issue. Basically I want to make a Pokemon change its form depending on if it has a status condition or not, and then revert back once the status is gone. Like if the Pokemon was Poisoned, it would change its form for the duration of the Poison, and then revert back to its base form once Poison ended.

    I tried replicating Shaymin's code and the Pokemon changes form when it gets the status effect, but the Pokemon doesn't revert back to its original form once the status is healed.
     
    Have you tried basing the ability on Darmanitan hidden ability Zen mode instead? That ability changes the form of Darmanitan depending on how much HP it has at the end of the turn. That means that if darmanitan's hp goes below half it's maximum hp in a turn, it will change forms but will revert back the form in the next turn if the hp is healed above half it's maximum hp. If you copy everything of that ability and change the conditions to be state aflicted instead of hp, it should work.
     
    Back
    Top