• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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] Ability that only activates after Mega Evolving

  • 79
    Posts
    9
    Years
    • Seen Jan 12, 2024
    Hello, I want to create an ability that raises every stat, but only when the pokemon Mega Evolves. For example: Spiritomb Mega Evolves->Ability activates->atk, def, spatk, spdef, spe raise one stage

    Is something like this possible? I tried modeling it after Download, but I don't want it to activate every time they switch in, only after mega evolving

    Thanks!
     
    Yeah, that's not too surprising given that you've written the code (presumably) under pbAbilitiesOnSwitchIn.

    If it's Mega Evolution only, then you could try sticking your script at the end of the pbMegaEvolve function in PokeBattle_Battle? Of course that means that your code isn't on the Pokémon, but on the battle, so you'll have to change any references to Pokémon methods to be prefixed by "@battlers[index]", e.g. "@battlers[index].hasWorkingAbility(:MYABILITY)". (Or maybe "@battler[index].pokemon", I haven't tested)
     
    Coding issues aside, this seems like a somewhat odd ability given that you can define higher base stats for when the pokémon mega evolves anyway.
    Unless you just want an OP pokémon who gets higher stats AND a one time free stat boost.
     
    Back
    Top