• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
8
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!
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    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)
     

    Poq

    144
    Posts
    6
    Years
    • Seen Aug 28, 2021
    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