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

  • 158
    Posts
    6
    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.
     
    Well, did you try to copy Parental Bond's code and edit to hit three times?
     
    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.
     
    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?
     
    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.
     
    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:
    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!
     
    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?
     
    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).
     
    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?
     
    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?
     
    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:
    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...
     
    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