• 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 help (Again)

163
Posts
5
Years
  • Hi! I am having some trouble with another ability. It's called Triple Terror and it allows biting moves to hit three times in a row. You see, Idk how to do that and will someone help me?

    The move is similar to Parental Bond BTW, except it's three times instead of two times.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Well, did you try to copy Parental Bond's code and edit to hit three times?
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    Idk how to do that, especially if I want only biting moves to hit three times.

    Well look at the code and tell us what ideas you have about what to change. You can also take inspiration from Strong Jaw (or other abilities that care about particular kinds of moves) for how to limit it only to biting moves.
     
    163
    Posts
    5
    Years
  • Well look at the code and tell us what ideas you have about what to change. You can also take inspiration from Strong Jaw (or other abilities that care about particular kinds of moves) for how to limit it only to biting moves.

    Well, the code for Parental Bond is this:
    Spoiler:


    What do I change?
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    Well, the code for Parental Bond is this:
    Spoiler:


    What do I change?

    What do you think you'd change to make the move do three hits instead of two? Then try changing it, then try using a Pokémon with Parental Bond and see if it works. Then if it doesn't try something else.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • It's time for you to burn neurons to make own abilities. Like MrGriffin said, copy like Strong Jaw abilities works to recognize if the move is Biting Move. Maybe something like this (you need to find all PARENTALBOND instead and copy and edit to your Triple Terror):

    Code:
        if attacker.hasWorkingAbility(:TRIPLETERROR)
          if pbIsDamaging? && [COLOR="Red"]!isBitingMove?[/COLOR] && !pbTargetsMultiple?(attacker) &&
             !pbIsMultiHit && !pbTwoTurnAttack(attacker)
            exceptions=[0x6E,   # Endeavor
                        0xE0,   # Selfdestruct/Explosion
                        0xE1,   # Final Gambit
                        0xF7]   # Fling
            if !exceptions.include?(@function)
              attacker.effects[PBEffects::TripleTerror]=[COLOR="Red"]4[/COLOR]
              return [COLOR="red"]3[/COLOR]
            end
          end
        end

    Some trial and error you can get it.
     
    Last edited:
    163
    Posts
    5
    Years
  • What do you think you'd change to make the move do three hits instead of two? Then try changing it, then try using a Pokémon with Parental Bond and see if it works. Then if it doesn't try something else.

    The only Pokemon with Parental Bond is Mega Kangaskhan!
     
    163
    Posts
    5
    Years
  • It's time for you to burn neurons to make own abilities. Like MrGriffin said, copy like Strong Jaw abilities works to recognize if the move is Biting Move. Maybe something like this (you need to find all PARENTALBOND instead and copy and edit to your Triple Terror):

    Code:
        if attacker.hasWorkingAbility(:TRIPLETERROR)
          if pbIsDamaging? && [COLOR="Red"]!isBitingMove?[/COLOR] && !pbTargetsMultiple?(attacker) &&
             !pbIsMultiHit && !pbTwoTurnAttack(attacker)
            exceptions=[0x6E,   # Endeavor
                        0xE0,   # Selfdestruct/Explosion
                        0xE1,   # Final Gambit
                        0xF7]   # Fling
            if !exceptions.include?(@function)
              attacker.effects[PBEffects::TripleTerror]=[COLOR="Red"]4[/COLOR]
              return [COLOR="red"]3[/COLOR]
            end
          end
        end

    Some trial and error you can get it.

    But how the heck to I make it a three hit move?
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    The only Pokemon with Parental Bond is Mega Kangaskhan!

    So either test with Mega Kanga or alter the PBS file to give Parental Bond to another Pokémon? How do you normally check if the changes you've made work?

    In any case Wolf pretty much gave you the answer, so…
    (I think it's slightly wrong, but if you test it should be pretty obvious what's going on and what kind of thing you would need to look for in the code to fix it).
     
    163
    Posts
    5
    Years
  • So either test with Mega Kanga or alter the PBS file to give Parental Bond to another Pokémon? How do you normally check if the changes you've made work?

    In any case Wolf pretty much gave you the answer, so…
    (I think it's slightly wrong, but if you test it should be pretty obvious what's going on and what kind of thing you would need to look for in the code to fix it).

    Okay but how do I make it a three hit ability limited to biting moves?
     
    163
    Posts
    5
    Years
  • Okay I am having a slight problem.

    Every time I try using a biting move to test out the ability, it plays other animations other than the biting animation. Why?
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Focus: your ability works correctly (hit 3 times) or not?
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • So you need to create a animation to your ability, like Parental Bond:
    Code:
      def pbShowAnimation(id,attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
        return if !showanimation
        if attacker.effects[PBEffects::ParentalBond]==1
          [COLOR="Red"]@battle.pbCommonAnimation("ParentalBond",attacker,opponent)[/COLOR]
          return
        end
        @battle.pbAnimation(id,attacker,opponent,hitnum)
      end

    Or try to create a pbAnimation to your ability using bite animation:
    Code:
    @battle.pbAnimation(getConst(PBMoves,:[COLOR="red"]XXX[/COLOR]),[COLOR="red"]self[/COLOR],[COLOR="red"]nil[/COLOR])
    Change the red words to correct one. I think 'self' could be 'attacker' and 'nil' is 'opponent'. Anyway, Trial and Error. Good luck.
     
    Last edited:
    163
    Posts
    5
    Years
  • So you need to create a animation to your ability, like Parental Bond:
    Code:
      def pbShowAnimation(id,attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
        return if !showanimation
        if attacker.effects[PBEffects::ParentalBond]==1
          [COLOR="Red"]@battle.pbCommonAnimation("ParentalBond",attacker,opponent)[/COLOR]
          return
        end
        @battle.pbAnimation(id,attacker,opponent,hitnum)
      end

    Or try to create a pbAnimation to your ability using bite animation:
    Code:
    @battle.pbAnimation(getConst(PBMoves,:[COLOR="red"]XXX[/COLOR]),[COLOR="red"]self[/COLOR],[COLOR="red"]nil[/COLOR])
    Change the red words to correct one. I think 'self' could be 'attacker' and 'nil' is 'opponent'. Anyway, Trial and Error. Good luck.

    Okay! I'll try...
     
    163
    Posts
    5
    Years
  • So you need to create a animation to your ability, like Parental Bond:
    Code:
      def pbShowAnimation(id,attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
        return if !showanimation
        if attacker.effects[PBEffects::ParentalBond]==1
          [COLOR="Red"]@battle.pbCommonAnimation("ParentalBond",attacker,opponent)[/COLOR]
          return
        end
        @battle.pbAnimation(id,attacker,opponent,hitnum)
      end

    Or try to create a pbAnimation to your ability using bite animation:
    Code:
    @battle.pbAnimation(getConst(PBMoves,:[COLOR="red"]XXX[/COLOR]),[COLOR="red"]self[/COLOR],[COLOR="red"]nil[/COLOR])
    Change the red words to correct one. I think 'self' could be 'attacker' and 'nil' is 'opponent'. Anyway, Trial and Error. Good luck.

    Didn't work.
     
    Back
    Top