• 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.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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] Moxie for special attack

Venomous_Zero86

Pokemon Chosen Ones (Coming Soon)
  • 120
    Posts
    9
    Years
    • Seen Feb 11, 2022
    so i wanted to make a special attak version of moxie i tried it in the game and it dint work so good
    is this wrong also i need a beter name plz

    Spoiler:
     
    Last edited:
    thx that worked

    Try "SPATK" instead of "SPECIALATTACK".

    thx do you know the other coding for those also is there a way to combine them like attack and special gets raised or defense and special defense when they get hit by a contact move
     
    Last edited by a moderator:
    thx do you know the other coding for those also is there a way to combine them like attack and special gets raised or defense and special defense when they get hit by a contact move

    Like this?

    Code:
        # Moxie
        if user.hasWorkingAbility(:MOXIE) && target.fainted?
          if user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability)) && user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
            PBDebug.log("[Ability triggered] #{user.pbThis}'s Moxie")
          end
        end

    EDIT: Sorry, just now i undestand ya lol lets find a ability than can be "the same effect" and edit for you want.

    EDIT2: Maybe this:
    Code:
            if target.hasWorkingAbility(:ABILITY,true) && target.isFainted? &&
               !user.isFainted?
                PBDebug.log("[Ability triggered] #{target.pbThis}'s Ability")
                @battle.scene.pbDamageAnimation(user,0)
                user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability)) && 
                  user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
                @battle.pbDisplay(_INTL("{1} raised Attack and Special Attack by {2}!",user.pbThis,
                  PBAbilities.getName(target.ability)))
    
            end
     
    Last edited:
    bro this is cool thx btw are u working on a game or on a project
     
    bro this is cool thx btw are u working on a game or on a project

    Hmmm, well, honestly I'm trying to create a game, yes, but there are so many good scripts here lol... I have not even started to create maps. :/
    I just did the whole pokedex (1-808, yes, I included Meltan).
    However, if you are interested, lets talk via pm. No problem! :D
    Anything, we're here.
     
    Back
    Top