• 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] Move that changes the ability of the user + ability that changes form of user

76
Posts
8
Years
    • Seen Dec 9, 2022
    Hello, I want to introduce a move that changes the ability of the user into a specific ability.

    That ability once it is activated should change the form of the user and when the user loses half of its hp it should revert back to the original form. With that ability I would also like to manipulate the stats of the user, just like you can do it for a megaevolution.
     
    76
    Posts
    8
    Years
    • Seen Dec 9, 2022
    Ok, i got around it a little bit but how can I now add some stats to my Pokemon when it uses the move that I included?
    Is there no easy way to give it a multiplier to all the stats?
    ################################################################################
    # Auraburst
    ################################################################################
    class PokeBattle_Move_170 < PokeBattle_Move
    def pbEffectAfterHit(attacker,opponent,turneffects)
    if isConst?(@id,PBMoves,:AURABURST)
    if isConst?(attacker.species,PBSpecies,:GRENINJA) &&
    !attacker.effects[PBEffects::Transform] &&
    !(attacker.hasWorkingAbility(:SHEERFORCE) && self.addlEffect>0) &&
    !attacker.isFainted?
    attacker.form==1
    attacker.attack==+100
    attacker.defense==+100
    attacker.speed==+100
    attacker.spatk==+100
    attacker.spdef==+100

    attacker.pbUpdate(true)
    @battle.scene.pbChangePokemon(attacker,attacker.pokemon)
    @battle.pbDisplay(_INTL("{1} transformed!",attacker.pbThis))
    PBDebug.log("[Form changed] #{attacker.pbThis} changed to form #{attacker.form}")
    end
    end
    end
    end


    Edit: I tried multiple variants I tried to do attacker.attack+=100 or attacker.attack=*2 or *=2 everything I could think of and nothing changed for the stats.
     
    Last edited:
    658
    Posts
    7
    Years
  • So is this like a stat stage like when you use Dragon Dance or does the stat increase remain permanent like in Mega Evolution?

    If its a stat stage increase then just use:
    Code:
    attacker.pbIncreaseStat(PBStats::STAT,1,attacker,false,self)
    #Change "STAT" to whatever stat you want and the number after it to the number if stages you want to increase it by.

    If its something like Mega Evolution then code the stat change into the forme by defining it in pokemonforms.txt
     
    76
    Posts
    8
    Years
    • Seen Dec 9, 2022
    Hi, thanks for your answer.
    I was more like looking for a way on how i could include the permanent stat changs like in Mega Evolution in a Pokémon move.
    P.s. I am using 16.2 as I could not really update to other versions due to changing stuff on Essentials on my own.
     
    658
    Posts
    7
    Years
  • Hi, thanks for your answer.
    I was more like looking for a way on how i could include the permanent stat changs like in Mega Evolution in a Pokémon move.
    P.s. I am using 16.2 as I could not really update to other versions due to changing stuff on Essentials on my own.

    Ok so define a new In-Battle forme under Pokemon_MultipleForms and to handle the change of form back to original, see how Zen-Mode is handled in the PokeBattle_Battler script section.
     
    76
    Posts
    8
    Years
    • Seen Dec 9, 2022
    That was actually one of the first things I tried to do, the problem is that while in the battle the stats did not change at all.
     
    Back
    Top