• 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] Moxie for special attack

Venomous_Zero86

Pokemon Chosen Ones (Coming Soon)
120
Posts
8
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:

    Venomous_Zero86

    Pokemon Chosen Ones (Coming Soon)
    120
    Posts
    8
    Years
    • Seen Feb 11, 2022
    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:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • 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:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • 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