• 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.

Gen 7 Ability Thread

raxic_ex

I'm Buizel of the Expedition Society!
122
Posts
11
Years
  • Pardon me for asking but is the Shields Down ability code was meant to only show 1 of the 7 forms? I put 7 different colours of cores of Minior in the game but it always triggers the 7th colour which is yellow, is the coding always makes it fixed at seventh form? If so, how could I randomize it?
     
    824
    Posts
    8
    Years
  • Pardon me for asking but is the Shields Down ability code was meant to only show 1 of the 7 forms? I put 7 different colours of cores of Minior in the game but it always triggers the 7th colour which is yellow, is the coding always makes it fixed at seventh form? If so, how could I randomize it?

    The inner core of Minior is always the same for the same Minior. If you use different Minior, there's a chance they'll have different colors, unless you breed - because like Burmy and Gastrodon, Minior's colors are inherited from the parents.
     
    81
    Posts
    8
    Years
    • Seen Sep 7, 2019
    The inner core of Minior is always the same for the same Minior. If you use different Minior, there's a chance they'll have different colors, unless you breed - because like Burmy and Gastrodon, Minior's colors are inherited from the parents.
    Luka S.J. was teaching me for instances like this and with double battling two different formed zygarde and both pokemon retaining this form when they both revert back from 100% after battle. Same goes for Minior. Let me hook something up and if it works then I'l give it to you
     

    Crystal Noel

    RPG Maker VX Ace Scripter
    222
    Posts
    11
    Years
  • Does anybody know if Fluffy halves the damage of contact moves used by a Pokémon with Long Reach? There's no info either way.
     
    824
    Posts
    8
    Years
  • Does anybody know if Fluffy halves the damage of contact moves used by a Pokémon with Long Reach? There's no info either way.

    Considering the damage halving is a negative side effect of a contact move, and Long Reach negates abilities such as Rough Skin/Iron Barbs, Flame Body, Poison Point, etc. I'm going to assume that yes, it does, until we have concrete proof.
     
    17
    Posts
    8
    Years
    • Seen yesterday
    Can somebody post Steelworker / help me on how to implement Steelworker? I'm actually trying to make an ability similar to Steelworker... Maybe I should start around the code of Blaze / Torrent / Overgrow / Swarm?
     

    raxic_ex

    I'm Buizel of the Expedition Society!
    122
    Posts
    11
    Years
  • Can somebody post Steelworker / help me on how to implement Steelworker? I'm actually trying to make an ability similar to Steelworker... Maybe I should start around the code of Blaze / Torrent / Overgrow / Swarm?

    i sort of did Steelworker myself but I didn't tested it yet, i just based on codes of Refrigerate / Pixilate:

    if isConst?(type,PBTypes,:STEEL) &&
    isConst?(attacker.ability,PBAbilities,:STEELWORKER)
    damagemult=(damagemult*1.5).round
    end

    *didn't test it yet so i don't know if this works... just paste it under the Refrigerate codings in PokeBattle_Move
     

    rigbycwts

    Hmm, hmm.
    98
    Posts
    11
    Years
    • Seen Feb 22, 2019
    Triage looks pretty easy to add.
    In PokeBattle_Battler, inside pbSuccessCheck, below this line:
    Code:
    p=thismove.priority
    add this:
    Code:
    p+=3 if user.hasWorkingAbility(:TRIAGE) && thismove.pbIsHealingMove?
     
    17
    Posts
    8
    Years
    • Seen yesterday
    Triage looks pretty easy to add.
    In PokeBattle_Battler, inside pbSuccessCheck, below this line:
    Code:
    p=thismove.priority
    add this:
    Code:
    p+=3 if user.hasWorkingAbility(:TRIAGE) && thismove.pbIsHealingMove?

    the 'IsHealingMove' is already a thing? Good, I thought we'd have to define it ourselves. (I guess that must have been already implemented for the sake of items like Big Root or something...)
    Thanks!
     

    rigbycwts

    Hmm, hmm.
    98
    Posts
    11
    Years
    • Seen Feb 22, 2019
    the 'IsHealingMove' is already a thing? Good, I thought we'd have to define it ourselves. (I guess that must have been already implemented for the sake of items like Big Root or something...)
    Thanks!
    It's in Essentials 16.2.
     
    14
    Posts
    7
    Years
    • Online now
    Hey! I was working on implementing Liquid voice, and I thought I might as well share it with you guys to see if it works:
    Code:
        if attacker.hasWorkingAbility(:LIQUIDVOICE) && thismove.hasFlags?(k)
          type=getConst(PBTypes,:WATER) || 11
        end

    This goes below Normalize, by the way. Also, would anybody know how to implement Dancer?
     

    Tapu Fini

    Land Spirit Pokemon
    4
    Posts
    7
    Years
    • Seen Feb 19, 2018
    Schooling:

    Put under Zen Mode in PokeBattle_Battler:
    Code:
    if isConst?(self.species,PBSpecies,:WISHIWASHI)
          if self.hasWorkingAbility(:SCHOOLING) && @hp<=((@totalhp/4).floor)
            if self.form!=0
              self.form=0; transformed=true
            end
          else
            if self.form!=1 && @level >=20
              self.form=1; transformed=true
            end
          end
        end

    And update the pbResetForm section underneath with Wishiwashi:
    Code:
    def pbResetForm
        if !@effects[PBEffects::Transform]
          if isConst?(self.species,PBSpecies,:CASTFORM) ||
             isConst?(self.species,PBSpecies,:CHERRIM) ||
             isConst?(self.species,PBSpecies,:DARMANITAN) ||
             isConst?(self.species,PBSpecies,:MELOETTA) ||
             isConst?(self.species,PBSpecies,:AEGISLASH) ||
             isConst?(self.species,PBSpecies,:XERNEAS) ||
             [COLOR="Red"]isConst?(self.species,PBSpecies,:WISHIWASHI)[/COLOR]
            self.form=0
          end
        end
        pbUpdate(true)
      end

    At the end of Pokemon_MultipleForms:

    Code:
    MultipleForms.register(:WISHIWASHI,{ #Wishiwashi Forms
    "height"=>proc{|pokemon|
       next if pokemon.form==0 # Solo Form
       next 82                 # School Form
    },
    "weight"=>proc{|pokemon|
       next if pokemon.form==0 # Solo Form
       next 786                # School Form
    },
    "getBaseStats"=>proc{|pokemon|
       next if pokemon.form==0       # Solo Form
       next [45,140,130,140,135,30]  # School Form
    }
    })

    Schooling also cannot be transferred with Skill Swap, copied by Trace or Role Play, changed by Worry Seed or Entrainment, or suppressed with Gastro Acid. Search for those and add Schooling to the list of unaffected abilities.
     
    971
    Posts
    7
    Years
    • Age 21
    • Seen Nov 28, 2022
    Schooling:

    Put under Zen Mode in PokeBattle_Battler:
    Code:
    if isConst?(self.species,PBSpecies,:WISHIWASHI)
          if self.hasWorkingAbility(:SCHOOLING) && @hp<=((@totalhp/4).floor)
            if self.form!=0
              self.form=0; transformed=true
            end
          else
            if self.form!=1 && @level >=20
              self.form=1; transformed=true
            end
          end
        end

    And update the pbResetForm section underneath with Wishiwashi:
    Code:
    def pbResetForm
        if !@effects[PBEffects::Transform]
          if isConst?(self.species,PBSpecies,:CASTFORM) ||
             isConst?(self.species,PBSpecies,:CHERRIM) ||
             isConst?(self.species,PBSpecies,:DARMANITAN) ||
             isConst?(self.species,PBSpecies,:MELOETTA) ||
             isConst?(self.species,PBSpecies,:AEGISLASH) ||
             isConst?(self.species,PBSpecies,:XERNEAS) ||
             [COLOR="Red"]isConst?(self.species,PBSpecies,:WISHIWASHI)[/COLOR]
            self.form=0
          end
        end
        pbUpdate(true)
      end

    At the end of Pokemon_MultipleForms:

    Code:
    MultipleForms.register(:WISHIWASHI,{ #Wishiwashi Forms
    "height"=>proc{|pokemon|
       next if pokemon.form==0 # Solo Form
       next 82                 # School Form
    },
    "weight"=>proc{|pokemon|
       next if pokemon.form==0 # Solo Form
       next 786                # School Form
    },
    "getBaseStats"=>proc{|pokemon|
       next if pokemon.form==0       # Solo Form
       next [45,140,130,140,135,30]  # School Form
    }
    })

    Schooling also cannot be transferred with Skill Swap, copied by Trace or Role Play, changed by Worry Seed or Entrainment, or suppressed with Gastro Acid. Search for those and add Schooling to the list of unaffected abilities.

    I guess I was too late with mine. Anyways, for the baseStats, speed is the 4th slot, you put it last. Look at some already existing ones, look them up and you'll see.
     
    971
    Posts
    7
    Years
    • Age 21
    • Seen Nov 28, 2022
    Can someone test this and tell me whether it's working as it should or not?

    Beast Boost. I have no idea how to check for which stat is the highest, so I just took their highest base stats. Berserk right underneath.
    PokeBattle_Battler under Moxie:
    Code:
        # Moxie
        if user.hasWorkingAbility(:MOXIE) && target.isFainted?
          if user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability))
            PBDebug.log("[Ability triggered] #{user.pbThis}'s Moxie")
          end
        end
    [COLOR="Red"]    # Beast Boost
        if user.hasWorkingAbility(:BEASTBOOST) && target.isFainted? && !user.isFainted?
          if isConst?(user.species,PBSpecies,:BUZZWOLE) || isConst?(user.species,PBSpecies,:KARTANA) ||
             isConst?(user.species,PBSpecies,:GUZZLORD)
            if user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability))
            end
          end
          if isConst?(user.species,PBSpecies,:PHEROMOSA)
            if user.pbIncreaseStatWithCause(PBStats::SPEED,1,user,PBAbilities.getName(user.ability))
            end
          end
          if isConst?(user.species,PBSpecies,:XURKITREE) ||
             isConst?(user.species,PBSpecies,:CELESTEELA)
            if user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
            end
          end
          if isConst?(user.species,PBSpecies,:NIHILEGO)
            if user.pbIncreaseStatWithCause(PBStats::SPDEF,1,user,PBAbilities.getName(user.ability))
            end
          end
        end
        # Berserk
        if user.hasWorkingAbility(:BERSERK) && target.hp<=(user.totalhp/2).floor
          if user.pbCanIncreaseStatStage?(PBStats::SPATK,user)
            user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
          end
        end[/COLOR]
    Next up we have Innards Out. Put this underneath Aftermath in PokeBattle_Battler:
    Code:
            if target.hasWorkingAbility(:AFTERMATH,true) && target.isFainted? &&
               !user.isFainted?
              if [email protected](:DAMP) &&
                 !user.hasMoldBreaker && !user.hasWorkingAbility(:MAGICGUARD)
                PBDebug.log("[Ability triggered] #{target.pbThis}'s Aftermath")
                @battle.scene.pbDamageAnimation(user,0)
                user.pbReduceHP((user.totalhp/4).floor)
                @battle.pbDisplay(_INTL("{1} was caught in the aftermath!",user.pbThis))
              end
            end
    [COLOR="Red"]        if target.hasWorkingAbility(:INNARDSOUT,true) && target.isFainted? &&
               !user.isFainted?
                PBDebug.log("[Ability triggered] #{target.pbThis}'s Innards Out")
                @battle.scene.pbDamageAnimation(user,0)
                user.pbReduceHP(target.lastHPLost)
                @battle.pbDisplay(_INTL("{1} was hurt by {2}'s {3}!",user.pbThis,
                   target.pbThis,PBAbilities.getName(target.ability)))
            end[/COLOR]
    I originally had Shields Down in here, but I got new errors out of the blue.

    Please let me know if they're working fine since these are some of my first abilities.
     
    Last edited:

    Tapu Fini

    Land Spirit Pokemon
    4
    Posts
    7
    Years
    • Seen Feb 19, 2018
    Can someone test this and tell me whether it's working as it should or not?

    Beast Boost. I have no idea how to check for which stat is the highest, so I just took their highest base stats. Berserk right underneath.
    PokeBattle_Battler under Moxie:
    Code:
        # Moxie
        if user.hasWorkingAbility(:MOXIE) && target.isFainted?
          if user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability))
            PBDebug.log("[Ability triggered] #{user.pbThis}'s Moxie")
          end
        end
    [COLOR="Red"]    # Beast Boost
        if user.hasWorkingAbility(:BEASTBOOST) && target.isFainted? && !user.isFainted?
          if isConst?(user.species,PBSpecies,:BUZZWOLE) || isConst?(user.species,PBSpecies,:KARTANA) ||
             isConst?(user.species,PBSpecies,:GUZZLORD)
            if user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability))
            end
          end
          if isConst?(user.species,PBSpecies,:PHEROMOSA)
            if user.pbIncreaseStatWithCause(PBStats::SPEED,1,user,PBAbilities.getName(user.ability))
            end
          end
          if isConst?(user.species,PBSpecies,:XURKITREE) ||
             isConst?(user.species,PBSpecies,:CELESTEELA)
            if user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
            end
          end
          if isConst?(user.species,PBSpecies,:NIHILEGO)
            if user.pbIncreaseStatWithCause(PBStats::SPDEF,1,user,PBAbilities.getName(user.ability))
            end
          end
        end
        # Berserk
        if user.hasWorkingAbility(:BERSERK) && target.hp<=(user.totalhp/2).floor
          if user.pbCanIncreaseStatStage?(PBStats::SPATK,user)
            user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
          end
        end[/COLOR]

    Beast Boost takes IVs/EVs into account when deciding which stat to raise. So taking Pheromosa for example, if she has perfect 31 IV in Attack, but 0 in Speed, her Attack stat will be higher than her Speed, and the Attack will get boosted instead.
    Here's my code. There's probably a better way to optimize it but from my tests, it seems to be working properly.
    Code:
    if self.hasWorkingAbility(:BEASTBOOST) && target.isFainted?
          if user.attack >= user.defense &&
             user.attack >= user.spatk &&
             user.attack >= user.spdef &&
             user.attack >= user.speed
             if pbIncreaseStatWithCause(PBStats::ATTACK,1,self,PBAbilities.getName(ability))
              PBDebug.log("[Ability triggered] #{pbThis}'s Beast Boost (raising Attack)")
            end
          elsif user.defense >= user.spatk &&
             user.defense >= user.spdef &&
             user.defense >= user.speed
             if pbIncreaseStatWithCause(PBStats::DEFENSE,1,self,PBAbilities.getName(ability))
              PBDebug.log("[Ability triggered] #{pbThis}'s Beast Boost (raising Defense)")
            end
          elsif user.spatk >= user.spdef &&
             user.spatk >= user.speed
             if pbIncreaseStatWithCause(PBStats::SPATK,1,self,PBAbilities.getName(ability))
              PBDebug.log("[Ability triggered] #{pbThis}'s Beast Boost (raising Special Attack)")
            end
          elsif user.spdef >= user.speed
             if pbIncreaseStatWithCause(PBStats::SPDEF,1,self,PBAbilities.getName(ability))
              PBDebug.log("[Ability triggered] #{pbThis}'s Beast Boost (raising Special Defense)")
            end
          else
            if pbIncreaseStatWithCause(PBStats::SPEED,1,self,PBAbilities.getName(ability))
              PBDebug.log("[Ability triggered] #{pbThis}'s Beast Boost (raising Speed)")
            end
          end
        end

    I tried your Innards Out a bit and it seemed to work correctly. However, your Berserk activates when the user deals damage to the target, causing the target to fall below 50% health. It should rather activate with the user takes damage causing it to fall below 50%.
    Based off of Rot8er_ConeX's code, placed under Justified:

    Code:
    if target.hasWorkingAbility(:BERSERK) &&
                target.hp+damage>target.totalhp/2 &&
                target.hp<target.totalhp/2
              if target.pbIncreaseStatWithCause(PBStats::SPATK,1,target,PBAbilities.getName(target.ability))
                PBDebug.log("[Ability triggered] #{target.pbThis}'s Stamina")
              end
            end
     
    971
    Posts
    7
    Years
    • Age 21
    • Seen Nov 28, 2022
    Beast Boost takes IVs/EVs into account when deciding which stat to raise. So taking Pheromosa for example, if she has perfect 31 IV in Attack, but 0 in Speed, her Attack stat will be higher than her Speed, and the Attack will get boosted instead.
    Here's my code. There's probably a better way to optimize it but from my tests, it seems to be working properly.
    Code:
    if self.hasWorkingAbility(:BEASTBOOST) && target.isFainted?
          if user.attack >= user.defense &&
             user.attack >= user.spatk &&
             user.attack >= user.spdef &&
             user.attack >= user.speed
             if pbIncreaseStatWithCause(PBStats::ATTACK,1,self,PBAbilities.getName(ability))
              PBDebug.log("[Ability triggered] #{pbThis}'s Beast Boost (raising Attack)")
            end
          elsif user.defense >= user.spatk &&
             user.defense >= user.spdef &&
             user.defense >= user.speed
             if pbIncreaseStatWithCause(PBStats::DEFENSE,1,self,PBAbilities.getName(ability))
              PBDebug.log("[Ability triggered] #{pbThis}'s Beast Boost (raising Defense)")
            end
          elsif user.spatk >= user.spdef &&
             user.spatk >= user.speed
             if pbIncreaseStatWithCause(PBStats::SPATK,1,self,PBAbilities.getName(ability))
              PBDebug.log("[Ability triggered] #{pbThis}'s Beast Boost (raising Special Attack)")
            end
          elsif user.spdef >= user.speed
             if pbIncreaseStatWithCause(PBStats::SPDEF,1,self,PBAbilities.getName(ability))
              PBDebug.log("[Ability triggered] #{pbThis}'s Beast Boost (raising Special Defense)")
            end
          else
            if pbIncreaseStatWithCause(PBStats::SPEED,1,self,PBAbilities.getName(ability))
              PBDebug.log("[Ability triggered] #{pbThis}'s Beast Boost (raising Speed)")
            end
          end
        end

    I tried your Innards Out a bit and it seemed to work correctly. However, your Berserk activates when the user deals damage to the target, causing the target to fall below 50% health. It should rather activate with the user takes damage causing it to fall below 50%.
    Based off of Rot8er_ConeX's code, placed under Justified:

    Code:
    if target.hasWorkingAbility(:BERSERK) &&
                target.hp+damage>target.totalhp/2 &&
                target.hp<target.totalhp/2
              if target.pbIncreaseStatWithCause(PBStats::SPATK,1,target,PBAbilities.getName(target.ability))
                PBDebug.log("[Ability triggered] #{target.pbThis}'s Stamina")
              end
            end

    I did some more testing with Berserk and it's indeed not really... functioning. The main problem I have whenever I create abilities is that I'm not sure where to put them exactly. As for the beast boost, I did think about comparing each stat with each other, but I thought that it would get too big of a code so I let it alone. Thanks for the criticism.

    Edit: I accidently put && target.hp<=((user.totalhp/2).floor)... Just use the one you sent.
    I also think I got Shields Down to work (not sure if someone's already made that, though.
    Spoiler:


    I also made Battle Bond just now. I took an idea from somewhere above and it worked perfectly.
    Spoiler:
     
    Last edited:
    Back
    Top