• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Resource icon

Custom Abilities by me 2018-11-30

Here are four new abilities


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.
Back
Top