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

  • 76
    Posts
    9
    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.
     
    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:
    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
     
    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.
     
    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.
     
    Back
    Top