Resource icon

Custom Abilities by me

Pokémon Essentials Version
v17.2 ✅
Here are the custom abilities I made. I am new with the language so I was not able to make new things. These abilities are similar to the existing ones.



Phantom Aura
Powers up each Pokémon's Ghost-type moves.
It's with the gen 6 moves like fairy aura. If you don't have gen 6 abilities then don't use this.
Steps
First in PBS abilities add this:
xxx,PHANTOMAURA,Phantom Aura,"Powers up each Pokémon's Ghost-type moves."
Change xxx with numbers
Now find in PokeBattle_Battler
Code:
# Aura Break message
And paste this above it
Code:
    # Phantom Aura message
    if self.hasWorkingAbility(:PHANTOMAURA) && onactive
      @battle.pbDisplay(_INTL("{1} is radiating a phantom aura!",pbThis))
    end
Then find in PokeBattle_Move
Code:
    if (@battle.pbCheckGlobalAbility(:DARKAURA) && isConst?(type,PBTypes,:DARK)) ||
       (@battle.pbCheckGlobalAbility(:FAIRYAURA) && isConst?(type,PBTypes,:FAIRY))||      
      if @battle.pbCheckGlobalAbility(:AURABREAK)
        damagemult=(damagemult*2/3).round
      else
        damagemult=(damagemult*4/3).round
      end
    end
and replace it with
Code:
    if (@battle.pbCheckGlobalAbility(:DARKAURA) && isConst?(type,PBTypes,:DARK)) ||
       (@battle.pbCheckGlobalAbility(:FAIRYAURA) && isConst?(type,PBTypes,:FAIRY))||
       (@battle.pbCheckGlobalAbility(:PHANTOMAURA) && isConst?(type,PBTypes,:GHOST))
      if @battle.pbCheckGlobalAbility(:AURABREAK)
        damagemult=(damagemult*2/3).round
      else
        damagemult=(damagemult*4/3).round
      end
    end

Icicile
Reduces damage from supereffective attacks.
It's like solid rock but for ice types
First add this in PBS abilities
xxx,ICICILE,Icicile,"Reduces damage from supereffective attacks."
Now find in PokeBattle_Move
Code:
   if opponent.pbPartner.hasWorkingAbility(:FRIENDGUARD)
and paste this above it.
Code:
      if (opponent.hasWorkingAbility(:ICICILE) ||
         opponent.hasWorkingAbility(:FILTER)) &&
         opponent.damagestate.typemod>8
        finaldamagemult=(finaldamagemult*0.75).round
      end
Now find in PokeBattle_AI
Code:
if (opponent.hasWorkingAbility(:SOLIDROCK)
Change the whole line with
Code:
      if (opponent.hasWorkingAbility(:SOLIDROCK) || opponent.hasWorkingAbility(:FILTER) || opponent.hasWorkingAbility(:ICICILE)) &&
And you are done

Stagger
Enables Dark-type moves to hit Fairy-type Pokémon.
Add this in PBS abilities
xxx,STAGGER,Stagger,"Enables Dark-type moves to hit Fairy-type Pokémon."
Now find in PokeBattle_Move
Code:
    # Miracle Eye
And paste above it
Code:
    # Stagger
    if attacker.hasWorkingAbility(:STAGGER) || opponent.effects[PBEffects::Foresight]
      mod1=2 if isConst?(otype1,PBTypes,:FAIRY) && PBTypes.isIneffective?(atype,otype1)
      mod2=2 if isConst?(otype2,PBTypes,:FAIRY) && PBTypes.isIneffective?(atype,otype2)
      mod3=2 if isConst?(otype3,PBTypes,:FAIRY) && PBTypes.isIneffective?(atype,otype3)
    end
Now in PokeBattle_AI. Post this above #Miracle Eye
Code:
    # Stagger
    if (attacker.hasWorkingAbility(:STAGGER) rescue false) || opponent.effects[PBEffects::Foresight]
      mod1=2 if isConst?(otype1,PBTypes,:FAIRY) && PBTypes.isIneffective?(atype,otype1)
      mod2=2 if isConst?(otype2,PBTypes,:FAIRY) && PBTypes.isIneffective?(atype,otype2)
      mod3=2 if isConst?(otype3,PBTypes,:FAIRY) && PBTypes.isIneffective?(atype,otype3)
    end
And you are done.




Juggernaut Drive (I suggest using this for pokemons with low attack.)
Boosts attack each turn

First add in PBS abilities
xxx,JUGGERNAUTDRIVE,Juggernaut Drive,"Boosts the Attack each turn."

Find in PokeBattle_Battle
Code:
      # Speed Boost
      # A Pokémon's turncount is 0 if it became active after the beginning of a round
      if i.turncount>0 && i.hasWorkingAbility(:SPEEDBOOST)
        if i.pbIncreaseStatWithCause(PBStats::SPEED,1,i,PBAbilities.getName(i.ability))
          PBDebug.log("[Ability triggered] #{i.pbThis}'s #{PBAbilities.getName(i.ability)}")
        end
      end
Below it add

Code:
      # juggernaut drive 
      if i.turncount>0 && i.hasWorkingAbility(:JUGGERNAUTDRIVE)
        if i.pbIncreaseStatWithCause(PBStats::ATTACK,1,i,PBAbilities.getName(i.ability))
          PBDebug.log("[Ability triggered] #{i.pbThis}'s #{PBAbilities.getName(i.ability)}")
        end
      end

Reverberate
Pulse moves will not affect the Pokemon

Add in PBS abilities
xxx,REVERBERATE,Reverberate,"Pulse moves cannot harm this Pokémon."

Find in PokeBattle_Move

Code:
    if opponent.hasWorkingAbility(:BULLETPROOF) && isBombMove?
      PBDebug.log("[Ability triggered] #{opponent.pbThis}'s Bulletproof (made #{@name} ineffective)")
      @battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
         opponent.pbThis,PBAbilities.getName(opponent.ability),self.name))
      return true
    end
Below it add
Code:
    if opponent.hasWorkingAbility(:REVERBERATE) && isPulseMove?
      PBDebug.log("[Ability triggered] #{opponent.pbThis}'s Reverberate (made #{@name} ineffective)")
      @battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
        opponent.pbThis,PBAbilities.getName(opponent.ability),self.name))
      return true
    end



Formidable Spear (Please copy and replace the scripts carefully after reading through the script)
This name is little big so you can change it yourself.
Cutting and Slashing moves will always hit. (They will not be affected by guarding moves like protect.)

In PBS abilities add
xxx,FORMIDABLESPEAR,Formidable Spear,"Cutting and Slashing moves will always hit."

Now search in PokeBattle_Move
Code:
  def isPulseMove?
    return (@flags&0x1000)!=0 # flag m: Is pulse move
  end
Below it add (Do not replace with anything)
Code:
  def isBladeMove
    return isConst?(@id,PBMoves,:FURYCUTTER) ||
           isConst?(@id,PBMoves,:CROSSPOISON) ||
           isConst?(@id,PBMoves,:PSYCHOCUT) ||    
           isConst?(@id,PBMoves,:XSCISSOR) ||
           isConst?(@id,PBMoves,:NIGHTSLASH) ||
           isConst?(@id,PBMoves,:SACREDSWORD) ||
           isConst?(@id,PBMoves,:CUT) ||
           isConst?(@id,PBMoves,:FALSESWIPE) ||
           isConst?(@id,PBMoves,:SECRETSWORD) ||
           isConst?(@id,PBMoves,:SLASH) ||
           isConst?(@id,PBMoves,:LEAFBLADE) ||
           isConst?(@id,PBMoves,:RAZORSHELL)
  end
Now in PokeBattle_Battler search
Code:
if target.effects[PBEffects::Protect] && thismove.canProtectAgainst? &&
      !target.effects[PBEffects::ProtectNegation]
        @battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
        @battle.successStates[user.index].protected=true
        PBDebug.log("[Move failed] #{target.pbThis}'s Protect stopped the attack")
        return false
    end
And replace it with
Code:
    if target.effects[PBEffects::Protect] && thismove.canProtectAgainst? &&
       !target.effects[PBEffects::ProtectNegation]
      if user.hasWorkingAbility(:FORMIDABLESPEAR) && thismove.isContactMove?
        PBDebug.log("[Ability triggered] #{user.pbThis}'s Armor Piercer")
        target.effects[PBEffects::ProtectNegation]=true
        @battle.pbDisplay(_INTL("{1}'s {2} breaks {3}'s guard!",user.pbThis,
          PBAbilities.getName(user.ability),target.pbThis))
        return true
      else
       @battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
       @battle.successStates[user.index].protected=true
       PBDebug.log("[Move failed] #{target.pbThis}'s Protect stopped the attack")
       return false
      end
    end
Below it you will find these scripts

Code:
if target.pbOwnSide.effects[PBEffects::QuickGuard] && thismove.canProtectAgainst? &&
      p>0 && !target.effects[PBEffects::ProtectNegation]
        @battle.pbDisplay(_INTL("{1} was protected by Quick Guard!",target.pbThis))
        PBDebug.log("[Move failed] The opposing side's Quick Guard stopped the attack")
        return false
    end
    if target.pbOwnSide.effects[PBEffects::WideGuard] &&
      PBTargets.hasMultipleTargets?(thismove) && !thismove.pbIsStatus? &&
      !target.effects[PBEffects::ProtectNegation]
        @battle.pbDisplay(_INTL("{1} was protected by Wide Guard!",target.pbThis))
        PBDebug.log("[Move failed] The opposing side's Wide Guard stopped the attack")
        return false
    end
    if target.pbOwnSide.effects[PBEffects::CraftyShield] && thismove.pbIsStatus? &&
      thismove.function!=0xE5 # Perish Song
        @battle.pbDisplay(_INTL("Crafty Shield protected {1}!",target.pbThis(true)))
        PBDebug.log("[Move failed] The opposing side's Crafty Shield stopped the attack")
        return false
    end
    if target.pbOwnSide.effects[PBEffects::MatBlock] && !thismove.pbIsStatus? &&
      thismove.canProtectAgainst? && !target.effects[PBEffects::ProtectNegation]
        @battle.pbDisplay(_INTL("{1} was blocked by the kicked-up mat!",thismove.name))
        PBDebug.log("[Move failed] The opposing side's Mat Block stopped the attack")
        return false
    end
    # TODO: Mind Reader/Lock-On
    # --Sketch/FutureSight/PsychUp work even on Fly/Bounce/Dive/Dig
    if thismove.pbMoveFailed(user,target) # TODO: Applies to Snore/Fake Out
      @battle.pbDisplay(_INTL("But it failed!"))
      PBDebug.log(sprintf("[Move failed] Failed pbMoveFailed (function code %02X)",thismove.function))
      return false
    end
    # King's Shield (purposely after pbMoveFailed)
    if target.effects[PBEffects::KingsShield] && !thismove.pbIsStatus? &&
      thismove.canProtectAgainst? && !target.effects[PBEffects::ProtectNegation]
        @battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
        @battle.successStates[user.index].protected=true
        PBDebug.log("[Move failed] #{target.pbThis}'s King's Shield stopped the attack")
        if thismove.isContactMove?
          user.pbReduceStat(PBStats::ATTACK,2,nil,false)
        end
        return false
    end
    # Spiky Shield
    if target.effects[PBEffects::SpikyShield] && thismove.canProtectAgainst? &&
      !target.effects[PBEffects::ProtectNegation]
        @battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
        @battle.successStates[user.index].protected=true
        PBDebug.log("[Move failed] #{user.pbThis}'s Spiky Shield stopped the attack")
        if thismove.isContactMove?
          amt=user.pbReduceHP((user.totalhp/8).floor) if !user.isFainted?
          @battle.pbDisplay(_INTL("{1} was hurt!",user.pbThis)) if amt>0
        end
        return false
    end
Replace them carefully after seeing through everything

Code:
    if target.pbOwnSide.effects[PBEffects::QuickGuard] && thismove.canProtectAgainst? &&
       p>0 && !target.effects[PBEffects::ProtectNegation]
      if user.hasWorkingAbility(:FORMIDABLESPEAR) && thismove.isBladeMove?
        PBDebug.log("[Ability triggered] #{user.pbThis}'s Formidable Spear")
        target.effects[PBEffects::ProtectNegation]=true
        @battle.pbDisplay(_INTL("{1}'s {2} breaks {3}'s guard!",user.pbThis,
          PBAbilities.getName(user.ability),target.pbThis))
        return true
      else
       @battle.pbDisplay(_INTL("{1} was protected by Quick Guard!",target.pbThis))
       PBDebug.log("[Move failed] The opposing side's Quick Guard stopped the attack")
       return false
      end
    end
 
    if target.pbOwnSide.effects[PBEffects::WideGuard] &&
       PBTargets.hasMultipleTargets?(thismove) && !thismove.pbIsStatus? &&
       !target.effects[PBEffects::ProtectNegation]
      if user.hasWorkingAbility(:FORMIDABLESPEAR) && thismove.isBladeMove?
        PBDebug.log("[Ability triggered] #{user.pbThis}'s Formidable Spear")
        target.effects[PBEffects::ProtectNegation]=true
        @battle.pbDisplay(_INTL("{1}'s {2} breaks {3}'s guard!",user.pbThis,
          PBAbilities.getName(user.ability),target.pbThis))
        return true
      else
       @battle.pbDisplay(_INTL("{1} was protected by Wide Guard!",target.pbThis))
       PBDebug.log("[Move failed] The opposing side's Wide Guard stopped the attack")
       return false
      end
    end

    if target.pbOwnSide.effects[PBEffects::CraftyShield] && thismove.pbIsStatus? &&
       thismove.function!=0xE5 # Perish Song
      @battle.pbDisplay(_INTL("Crafty Shield protected {1}!",target.pbThis(true)))
      PBDebug.log("[Move failed] The opposing side's Crafty Shield stopped the attack")
      return false
    end

    if target.pbOwnSide.effects[PBEffects::MatBlock] && !thismove.pbIsStatus? &&
       thismove.canProtectAgainst? && !target.effects[PBEffects::ProtectNegation]
      if user.hasWorkingAbility(:FORMIDABLESPEAR) && thismove.isBladeMove?
        PBDebug.log("[Ability triggered] #{user.pbThis}'s Formidable Spear")
        target.effects[PBEffects::ProtectNegation]=true
        @battle.pbDisplay(_INTL("{1}'s {2} breaks {3}'s guard!",user.pbThis,
          PBAbilities.getName(user.ability),target.pbThis))
        return true
      else
       @battle.pbDisplay(_INTL("{1} was blocked by the kicked-up mat!",thismove.name))
       PBDebug.log("[Move failed] The opposing side's Mat Block stopped the attack")
       return false
      end
    end

    # TODO: Mind Reader/Lock-On
    # --Sketch/FutureSight/PsychUp work even on Fly/Bounce/Dive/Dig
    if thismove.pbMoveFailed(user,target) # TODO: Applies to Snore/Fake Out
      @battle.pbDisplay(_INTL("But it failed!"))
      PBDebug.log(sprintf("[Move failed] Failed pbMoveFailed (function code %02X)",thismove.function))
      return false
    end

    # King's Shield (purposely after pbMoveFailed)
    if target.effects[PBEffects::KingsShield] && !thismove.pbIsStatus? &&
       thismove.canProtectAgainst? && !target.effects[PBEffects::ProtectNegation]
      if user.hasWorkingAbility(:FORMIDABLESPEAR) && thismove.isBladeMove?
        PBDebug.log("[Ability triggered] #{user.pbThis}'s Formidable Spear")
        target.effects[PBEffects::ProtectNegation]=true
        @battle.pbDisplay(_INTL("{1}'s {2} breaks {3}'s guard!",user.pbThis,
          PBAbilities.getName(user.ability),target.pbThis))
        return true
      else       
       @battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
       @battle.successStates[user.index].protected=true
       PBDebug.log("[Move failed] #{target.pbThis}'s King's Shield stopped the attack")
       if thismove.isContactMove?
         user.pbReduceStat(PBStats::ATTACK,2,nil,false)
       end
       return false
      end
    end

    # Spiky Shield
    if target.effects[PBEffects::SpikyShield] && thismove.canProtectAgainst? &&
       !target.effects[PBEffects::ProtectNegation]
      if user.hasWorkingAbility(:FORMIDABLESPEAR) && thismove.isBladeMove?
        PBDebug.log("[Ability triggered] #{user.pbThis}'s Formidable Spear")
        target.effects[PBEffects::ProtectNegation]=true
        @battle.pbDisplay(_INTL("{1}'s {2} breaks {3}'s guard!",user.pbThis,
          PBAbilities.getName(user.ability),target.pbThis))
        return true
      else     
       @battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
       @battle.successStates[user.index].protected=true
       PBDebug.log("[Move failed] #{user.pbThis}'s Spiky Shield stopped the attack")
       if thismove.isContactMove? && !user.isFainted?
         @battle.scene.pbDamageAnimation(user,0)
         amt=user.pbReduceHP((user.totalhp/8).floor)
         @battle.pbDisplay(_INTL("{1} was hurt!",user.pbThis)) if amt>0
       end
       return false
      end
    end
Replace carefully.

Water Shower (Suggest me a name if this one is not good or you can change it yourself.)
Boosts certain moves power in a rain.
In PBS abilities add
xxx,WATERSHOWER,Water Shower,"Boosts certain moves power in a rain."

In PokeBattle_Move search
Code:
    if attacker.hasWorkingAbility(:SHEERFORCE) && self.addlEffect>0
      damagemult=(damagemult*1.3).round
    end
Above it add

Code:
    if attacker.hasWorkingAbility(:WATERSHOWER) &&
       @battle.pbWeather==PBWeather::RAINDANCE &&
       (isConst?(type,PBTypes,:WATER))
      damagemult=(damagemult*1.3).round
    end
And it's done.

I am new with the language but I hope that this will help someone.
Credit Pokemonspecialist if you are using them.
Credits
Pokemonspecialist
Author
pokemonspecialist/Aryaman
First release
Last update
Rating
0.00 star(s) 0 ratings

Latest updates

  1. Some new abilities

    Here are four new abilities Juggernaut Drive (I suggest using this for pokemons with low...
Top