• 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

53
Posts
8
Years
In this thread, let's try and make some of the code for the Gen 7 abilities.
I've created two very simple ones, the first one is Water Compaction. Just put this right under the code for Storm Drain/Lightning Rod in PokeBattle_Move.
if (opponent.hasWorkingAbility(:WATERCOMPACTION) && isConst?(type,PBTypes,:WATER))
if opponent.pbCanIncreaseStatStage?(PBStats::DEFENSE)
opponent.pbIncreaseStatBasic(PBStats::DEFENSE,1)
@battle.pbCommonAnimation("StatUp",opponent,nil)
@battle.pbDisplay(_INTL("{1}'s {2} raised its Defense!",
opponent.pbThis,PBAbilities.getName(opponent.ability)))
else
@battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
opponent.pbThis,PBAbilities.getName(opponent.ability),self.name))
end
return 0
end

The second is Fluffy. Put this under Marvel Scale in PokeBattle_Move:
if isConst?(opponent.ability,PBAbilities,:FLUFFY) && category=0
basedmg=(basedmg/2).floor
end

And then put this under Dry Skin:
if opponent.hasWorkingAbility(:FLUFFY) && isConst?(type,PBTypes,:FIRE)
damagemult=(damagemult*2).round
end

Not sure this is the right forum for this, so please move it if it isn't, mods.
 
Last edited:
155
Posts
9
Years
  • Age 31
  • Seen Jun 11, 2021
I don't think Water Compaction makes water type moves ineffective. I remember seeing the move connect with it meaning it still dealt damage, but increased the Defense Stat as well, much like Justified does with Dark type moves. I could easily be wrong, but that's just what I remember, hence why I put it under Justified along with Stamina.
Code:
if target.hasWorkingAbility(:STAMINA)
          if target.pbIncreaseStatWithCause(PBStats::DEFENSE,1,target,PBAbilities.getName(target.ability))
            PBDebug.log("[Ability triggered] #{target.pbThis}'s Stamina")
          end
        end
        if target.hasWorkingAbility(:WATERCOMPACTION) && isConst?(movetype,PBTypes,:WATER)
          if target.pbIncreaseStatWithCause(PBStats::DEFENSE,2,target,PBAbilities.getName(target.ability))
            PBDebug.log("[Ability triggered] #{target.pbThis}'s Water Composition")
          end
        end
 
Last edited:

XerneasNeeds

PrismReverie
11
Posts
10
Years
  • Age 21
  • Seen Mar 26, 2020
Ive once implemented Power Contruct into Essentials. If i can get the script ill post it and give instructions on how to place it in ESsentials.
 
81
Posts
8
Years
  • Age 22
  • Seen Sep 7, 2019
Well Shoot I made a whole butt load of Gen & abilities, let me post them here.

Under Rough skin

Code:
if target.hasWorkingAbility(:INNARDSOUT,true) && !user.isFainted?
          @battle.pbDisplayEffect(target)
          PBDebug.log("[#{target.pbThis}'s Innardsout triggered]")
          @battle.scene.pbDamageAnimation(user,0)
          user.pbReduceHP((user.totalhp/8).floor)
          @battle.pbDisplay(_INTL("{3} is hurt!",target.pbThis,
             PBAbilities.getName(target.ability),user.pbThis(true)))
        end

Under Darmanitans Zen Mode

Code:
if self.hasWorkingAbility(:SHIELDSDOWN) && !self.isFainted?
      if @hp<=((@totalhp/2).floor) && self.form!=0
        @battle.pbDisplayEffect(self)
        self.form!=rand(4)
        @battle.pbDisplay(_INTL("{1} activated",PBAbilities.getName(@ability)))
      end
      if @hp>=((@totalhp/2).floor) && self.form!=0
        case self.status
        when PBStatuses::SLEEP
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} woke it up!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::POISON
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} cured its poisoning!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::BURN
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} healed its burn!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::PARALYSIS
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} cured its paralysis!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::FROZEN
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} defrosted it!",pbThis,PBAbilities.getName(@ability)))
          end
        end
      end
    end

Under Shields Down

Code:
# 100% Zygarde
    if isConst?(self.species,PBSpecies,:ZYGARDE) && !self.isFainted?
      if self.hasWorkingAbility(:POWERCONSTRUCT)
        if @hp<=((@totalhp/2).floor)
          if self.form!=2
            user=self
            @battle.pbDisplay(_INTL("{1} started gathering cells!",pbThis))
            @battle.pbDisplayEffect(user)
            @battle.pbCommonAnimation("ZygardePC",pbThis,nil)
            self.form=2; transformed=true
          end
        #else
          #if self.form!=0
            #self.form=0; transformed=true
          #end
        end
      #else
        #if self.form!=0
          #self.form=0; transformed=true
        #end
      end
    end

And In "def pbResetForm" put this
Code:
isConst?(self.species,PBSpecies,:ZYGARDE) ||

Under Intimidate

Code:
if self.hasWorkingAbility(:BATTERY) && pbPartner &&!pbPartner.isFainted?
      user=self
      if !pbPartner.pbTooHigh?(PBStats::SPATK)
        pbPartner.pbIncreaseStatBasic(PBStats::SPATK,1)
        @battle.pbCommonAnimation("StatUp",pbPartner,nil)
        if EFFECTMESSAGES
          @battle.pbDisplay(_INTL("{1}'s Special Attack rose!",pbPartner.pbThis(true)))
        else
          @battle.pbDisplay(_INTL("{1}'s Soul Heart raised its Special Attack!",pbPartner.pbThis))
        end
      end 
    end

Above Intimidate (3 abilities in one)

Code:
if self.hasWorkingAbility(:RECEIVER) && pbPartner.isFainted?
      choices=[]
      attacker=self
      @battle.pbDisplayEffect(self)
      choice=choices[@battle.pbRandom(choices.length)]
      battlername=pbPartner.pbThis(true)
      battlerability=pbPartner.ability
      @ability=battlerability
      abilityname=PBAbilities.getName(battlerability)
      @battle.pbDisplay(_INTL("{1} traced {2}'s {3}!",pbThis,battlername,abilityname))
      @battle.pbDisplay(_INTL("{1}'s {2} was taken over!",battlername,abilityname))
    end
    if self.hasWorkingAbility(:SOULHEART) && pbPartner.isFainted?
      user=self
      if !user.pbTooHigh?(PBStats::SPATK)
        @battle.pbDisplayEffect(self)
        user.pbIncreaseStatBasic(PBStats::SPATK,1)
        @battle.pbCommonAnimation("StatUp",user,nil)
        if EFFECTMESSAGES
          @battle.pbDisplay(_INTL("{1}'s Special Attack rose!",user.pbThis(true)))
        else
          @battle.pbDisplay(_INTL("{1}'s Soul Heart raised its Special Attack!",user.pbThis))
        end
      end 
    end
    #Electric Surge
    if self.hasWorkingAbility(:ELECTRICSURGE) && onactive
      if @battle.field.effects[PBEffects::ElectricTerrain]<1
        @battle.pbCommonAnimation("ELECTRICTERRAIN",self,nil)
        @battle.field.effects[PBEffects::ElectricTerrain]=5
        @battle.pbDisplay(_INTL("{1}'s {2} electrified the battlefield!",pbThis,PBAbilities.getName(self.ability)))
      end
    end

Your welcome xD
 
Last edited by a moderator:

XerneasNeeds

PrismReverie
11
Posts
10
Years
  • Age 21
  • Seen Mar 26, 2020
Battery isnt like Soul Heart is boosts the partners special attack in battle its like Plus but isnt affect by minus.

Also ive tryed to make Battle Bond act like its actual self but I cant get it to work properly. If somebody can recreate Battle Bond post it here that would be great.
 
Last edited by a moderator:

XerneasNeeds

PrismReverie
11
Posts
10
Years
  • Age 21
  • Seen Mar 26, 2020
Cool, ive just been needing certain abilities like Schooling, Dancer, Corrosion
 

Telemetius

Tele*
267
Posts
9
Years
Under Intimidate

Code:
if self.hasWorkingAbility(:BATTERY) && pbPartner &&!pbPartner.isFainted?
      user=self
      if !pbPartner.pbTooHigh?(PBStats::SPATK)
        pbPartner.pbIncreaseStatBasic(PBStats::SPATK,1)
        @battle.pbCommonAnimation("StatUp",pbPartner,nil)
        if EFFECTMESSAGES
          @battle.pbDisplay(_INTL("{1}'s Special Attack rose!",pbPartner.pbThis(true)))
        else
          @battle.pbDisplay(_INTL("{1}'s Soul Heart raised its Special Attack!",pbPartner.pbThis))
        end
      end 
    end

Thank you for your help in scripting the new gen abilities. I think the Battery ability should be something like:
Code:
    if attacker.pbPartner.hasWorkingAbility(:BATTERY) && pbIsSpecial?(type)
        atkmult=(atkmult*1.5).round
    end
And that it should be pasted under the PLUS/MINUS ability in Pokébattle_Move, I haven't tested it though.


Dazzling: put this right under def pbSuccescheck

Code:
    if target.hasWorkingAbility(:DAZZLING) && thismove.priority>0
      @battle.pbDisplay(_INTL("{1}'s Dazzling prevents the use of moves with increased priority!",target.pbThis))
      return false
    end
 
Last edited:
824
Posts
8
Years
@BlackOutG5 - Shields Down doesn't work like that. Every Minior has a specific form it becomes at half HP. Plus, there's seven Minior colors. The best way to do it is like this:


Code:
if self.hasWorkingAbility(:SHIELDSDOWN) && !self.isFainted?
      if @hp<=((@totalhp/2).floor) && self.form<7
        @battle.pbDisplayEffect(self)
        self.form+=7
        @battle.pbDisplay(_INTL("{1} activated",PBAbilities.getName(@ability)))
      end
      if @hp>=((@totalhp/2).floor) && self.form>=7
        case self.status
        when PBStatuses::SLEEP
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} woke it up!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::POISON
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} cured its poisoning!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::BURN
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} healed its burn!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::PARALYSIS
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} cured its paralysis!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::FROZEN
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} defrosted it!",pbThis,PBAbilities.getName(@ability)))
          end
        end
      end
    end
And make Minior's first seven forms completely identical.
 
81
Posts
8
Years
  • Age 22
  • Seen Sep 7, 2019
@BlackOutG5 - Shields Down doesn't work like that. Every Minior has a specific form it becomes at half HP. Plus, there's seven Minior colors. The best way to do it is like this:


Code:
if self.hasWorkingAbility(:SHIELDSDOWN) && !self.isFainted?
      if @hp<=((@totalhp/2).floor) && self.form<7
        @battle.pbDisplayEffect(self)
        self.form+=7
        @battle.pbDisplay(_INTL("{1} activated",PBAbilities.getName(@ability)))
      end
      if @hp>=((@totalhp/2).floor) && self.form>=7
        case self.status
        when PBStatuses::SLEEP
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} woke it up!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::POISON
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} cured its poisoning!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::BURN
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} healed its burn!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::PARALYSIS
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} cured its paralysis!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::FROZEN
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} defrosted it!",pbThis,PBAbilities.getName(@ability)))
          end
        end
      end
    end
And make Minior's first seven forms completely identical.

Looks good! I made more a while back like Wimpout and Battle Bond and some others I will post them soon.
 

tasmania12

Mewtwo Master
57
Posts
16
Years
@BlackOutG5 - Shields Down doesn't work like that. Every Minior has a specific form it becomes at half HP. Plus, there's seven Minior colors. The best way to do it is like this:


Code:
if self.hasWorkingAbility(:SHIELDSDOWN) && !self.isFainted?
      if @hp<=((@totalhp/2).floor) && self.form<7
        @battle.pbDisplayEffect(self)
        self.form+=7
        @battle.pbDisplay(_INTL("{1} activated",PBAbilities.getName(@ability)))
      end
      if @hp>=((@totalhp/2).floor) && self.form>=7
        case self.status
        when PBStatuses::SLEEP
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} woke it up!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::POISON
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} cured its poisoning!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::BURN
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} healed its burn!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::PARALYSIS
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} cured its paralysis!",pbThis,PBAbilities.getName(@ability)))
          end
        when PBStatuses::FROZEN
          if self.hasWorkingAbility(:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
            pbCureStatus(false)
            @battle.pbDisplay(_INTL("{1}'s {2} defrosted it!",pbThis,PBAbilities.getName(@ability)))
          end
        end
      end
    end
And make Minior's first seven forms completely identical.

When I use this, then test it, I get an error that pops up:
Spoiler:
 
155
Posts
9
Years
  • Age 31
  • Seen Jun 11, 2021
Comment out or delete any instance of pbDisplayEffect. That is a Gen 6 Essentials feature, and is not in regular Essentials.
 
824
Posts
8
Years
Okay, I have (mostly) untested code that should be able to replicate any of the new-to-Gen-VII abilities, including the ones we learned about in today's datamine. The one exception is Triage, since I still don't know what constitutes a "healing move". Just the moves that restore HP and nothing else? The leeching moves, too? The ones that can heal statuses? *shrug*
I'm moving soon, though, so won't be able to post anything yet.
Plus, my code works in the original Gen VI Pack which was coded from v15.1 Will need to do some minor alterations to make it work with v16.2
As for you, Tasmania12, you need to have it visibly change form. I forgot the exact function, but it's named something like "pbChangePokemon".
 
Last edited:
824
Posts
8
Years
I have tried a couple different ways to get it working, but no luck...

Would anyone know what to do to get it working?

Code:
    # Shields Down
    if isConst?(self.species,PBSpecies,:MINIOR) && !self.isFainted?
      if self.hasWorkingAbility(:SHIELDSDOWN) && @hp<=((@totalhp/2).floor)
        if self.form<7
          self.form+=7; transformed=true
        end
      else
        if self.form>=7
          self.form=self.form%7; transformed=true
        end
      end
    end

I have this near Darmanitan's Zen Mode code. In v16, that's found in PokeBattle_Battler on line 890.
 

tasmania12

Mewtwo Master
57
Posts
16
Years
Code:
    # Shields Down
    if isConst?(self.species,PBSpecies,:MINIOR) && !self.isFainted?
      if self.hasWorkingAbility(:SHIELDSDOWN) && @hp<=((@totalhp/2).floor)
        if self.form<7
          self.form+=7; transformed=true
        end
      else
        if self.form>=7
          self.form=self.form%7; transformed=true
        end
      end
    end

I have this near Darmanitan's Zen Mode code. In v16, that's found in PokeBattle_Battler on line 890.

Thank you! I tested it and it works perfect! Sorry to be such a pain.
 
Back
Top