Advertiser Content

Essentials Script All gen 7 abilities

Started by mybusiness January 19th, 2019 12:42 PM
  • 8097 views
  • 92 replies
Hi. I have all 233 abilities scripted and functional with none of them having major bugs. If you want a certain ability, you can request it here, and I'll reply to you my original code, or a link, if someone else had posted it already. Please, do a search before posting, and if you find that no one had posted your wanted ability, then make the request.

Edit: Ok, maybe I have some unnoticed bugs, but no ability will remain unsolved in this thread.

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 1 Hour Ago
Posted 9 Hours Ago
787 posts
1.1 Years
It would be really awesome if you could put them together into a resource. In either case I'm sure the guys over at Relic Castle would appreciate you posting the offer on their site too.
^

Also, i would like you post RECEIVER and POWER OF ALCHEMY, cuz them have restriction to other abilities (like BATTLE BOND, TRADE, ILLUSION, etc).

Thanks!

Edit:
Please post COMATOSE cuz idk how to put some parts of the script
Sorry, I won't post each one of them because, firstly, there are many of the abilities posted here, here, here and here, and, secondly, there is too much work for me now (I believe there are like 40 abilities introduced in gen 7). The purpose of this thread is to post the abilities that weren't previously completely solved by another, but I don't know which are those, so, make a concise request, like WolfPP.

^

Also, i would like you post RECEIVER and POWER OF ALCHEMY, cuz them have restriction to other abilities (like BATTLE BOND, TRADE, ILLUSION, etc).

Thanks!
What is written with red is what you should add.

Power of Alchemy and Receiver:
Spoiler:
In PokeBattle_Battler, where is Trace:
# Trace
    if self.hasWorkingAbility(:TRACE)
      choices=[]
      for i in 0...4
        foe=@battle.battlers[i]
        if pbIsOpposing?(i) && !foe.fainted?
          abil=foe.ability
          if abil>0 &&
             !isConst?(abil,PBAbilities,:TRACE) &&
             !isConst?(abil,PBAbilities,:MULTITYPE) &&
             !isConst?(abil,PBAbilities,:ILLUSION) &&
             !isConst?(abil,PBAbilities,:FLOWERGIFT) &&
             !isConst?(abil,PBAbilities,:IMPOSTER) &&
             !isConst?(abil,PBAbilities,:STANCECHANGE) &&
             !isConst?(abil,PBAbilities,:COMATOSE) &&
             !isConst?(abil,PBAbilities,:BATTLEBOND) &&
             !isConst?(abil,PBAbilities,:POWERCONSTRUCT) &&
             !isConst?(abil,PBAbilities,:DISGUISE) &&
             !isConst?(abil,PBAbilities,:POWEROFALCHEMY) &&
             !isConst?(abil,PBAbilities,:RECEIVER) &&
             !isConst?(abil,PBAbilities,:RKSSYSTEM) &&
             !isConst?(abil,PBAbilities,:SCHOOLING) &&
             !isConst?(abil,PBAbilities,:SHIELDSDOWN)
            choices.push(i)
          end
        end
      end
In PokeBattle_Battler, under Moxie:
# Power of Alchemy, Receiver
    if (user.hasWorkingAbility(:POWEROFALCHEMY) ||
      user.hasWorkingAbility(:RECEIVER)) && @battle.doublebattle &&
       user.pbPartner.fainted?
      usable=false
      abil=user.pbPartner.ability
      if abil>0 &&
             !isConst?(abil,PBAbilities,:POWEROFALCHEMY) &&
             !isConst?(abil,PBAbilities,:TRACE) &&
             !isConst?(abil,PBAbilities,:MULTITYPE) &&
             !isConst?(abil,PBAbilities,:ILLUSION) &&
             !isConst?(abil,PBAbilities,:FLOWERGIFT) &&
             !isConst?(abil,PBAbilities,:IMPOSTER) &&
             !isConst?(abil,PBAbilities,:STANCECHANGE) &&
             !isConst?(abil,PBAbilities,:COMATOSE) &&
             !isConst?(abil,PBAbilities,:BATTLEBOND) &&
             !isConst?(abil,PBAbilities,:POWERCONSTRUCT) &&
             !isConst?(abil,PBAbilities,:RECEIVER) &&
             !isConst?(abil,PBAbilities,:FORECAST) &&
             !isConst?(abil,PBAbilities,:WONDERGUARD) &&
             !isConst?(abil,PBAbilities,:DISGUISE) &&
             !isConst?(abil,PBAbilities,:ZENMODE) &&
             !isConst?(abil,PBAbilities,:SCHOOLING) &&
             !isConst?(abil,PBAbilities,:SHIELDSDOWN) &&
             !isConst?(abil,PBAbilities,:RKSSYSTEM)
            usable=true
      end
      if usable
        abilityname=PBAbilities.getName(abil)
        PBDebug.log("[Ability triggered] #{user.pbThis}'s #{PBAbilities.getName(user.ability)} turned into #{abilityname} from #{user.pbPartner}")
        user.ability=abil
        @battle.pbDisplay(_INTL("{1} copied {2}'s {3}!",user.pbThis,user.pbPartner,abilityname))
      end
    end
In PokeBattle_MoveEffects, where is Role Play:
if opponent.ability==0 ||
       attacker.ability==opponent.ability ||
       isConst?(attacker.ability,PBAbilities,:MULTITYPE) ||
       isConst?(attacker.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:FLOWERGIFT) ||
       isConst?(opponent.ability,PBAbilities,:FORECAST) ||
       isConst?(opponent.ability,PBAbilities,:ILLUSION) ||
       isConst?(opponent.ability,PBAbilities,:IMPOSTER) ||
       isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
       isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:TRACE) ||
       isConst?(opponent.ability,PBAbilities,:WONDERGUARD) ||
       isConst?(opponent.ability,PBAbilities,:ZENMODE) ||
       isConst?(opponent.ability,PBAbilities,:DISGUISE) ||
       isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
       isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:POWEROFALCHEMY) ||
       isConst?(opponent.ability,PBAbilities,:RECEIVER) ||
       isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
       isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
In PokeBattle_MoveEffects, where is Entrainment:
if attacker.ability==0 ||
       attacker.ability==opponent.ability ||
       isConst?(opponent.ability,PBAbilities,:FLOWERGIFT) ||
       isConst?(opponent.ability,PBAbilities,:IMPOSTER) ||
       isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
       isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:TRACE) ||
       isConst?(opponent.ability,PBAbilities,:TRUANT) ||
       isConst?(opponent.ability,PBAbilities,:ZENMODE) ||
       isConst?(attacker.ability,PBAbilities,:FLOWERGIFT) ||
       isConst?(attacker.ability,PBAbilities,:FORECAST) ||
       isConst?(attacker.ability,PBAbilities,:ILLUSION) ||
       isConst?(attacker.ability,PBAbilities,:IMPOSTER) ||
       isConst?(attacker.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(attacker.ability,PBAbilities,:TRACE) ||
       isConst?(attacker.ability,PBAbilities,:ZENMODE) ||
       isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
       isConst?(attacker.ability,PBAbilities,:COMATOSE) ||
       isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(attacker.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:POWERCONSTRUCT) ||
       isConst?(attacker.ability,PBAbilities,:POWERCONSTRUCT) ||
       isConst?(attacker.ability,PBAbilities,:POWEROFALCHEMY) ||
       isConst?(attacker.ability,PBAbilities,:RECEIVER) ||
       isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
       isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)

      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end

juliorain

Male
USA
Seen 2 Days Ago
Posted 3 Days Ago
1,638 posts
3.2 Years
Sorry to request all of the gen 7 abilities. XD I never finded anything on the net about them.
https://www.pokecommunity.com/showthread.php?t=387706

Marin has a compliation already started. Hit that thread up. Perhaps you can add the missing abilities to that?
https://www.pokecommunity.com/showthread.php?t=387706

Marin has a compliation already started. Hit that thread up. Perhaps you can add the missing abilities to that?
The thread is closed. Again, I won´t search all the scripting threads to see what abilities are missing. If you want help, I can give it; that´s all.

can you post comatose?
or its alredy somewhere?
sorry for my bad english, i talk spanish
Edit: See below, for Comatose and its fixes.

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 1 Hour Ago
Posted 9 Hours Ago
787 posts
1.1 Years
Sorry, I won't post each one of them because, firstly, there are many of the abilities posted here, here, here and here, and, secondly, there is too much work for me now (I believe there are like 40 abilities introduced in gen 7). The purpose of this thread is to post the abilities that weren't previously completely solved by another, but I don't know which are those, so, make a concise request, like WolfPP.


[spoiler]
What is written with red is what you should add.

Power of Alchemy and Receiver:
Spoiler:
In PokeBattle_Battler, where is Trace:
# Trace
    if self.hasWorkingAbility(:TRACE)
      choices=[]
      for i in 0...4
        foe=@battle.battlers[i]
        if pbIsOpposing?(i) && !foe.fainted?
          abil=foe.ability
          if abil>0 &&
             !isConst?(abil,PBAbilities,:TRACE) &&
             !isConst?(abil,PBAbilities,:MULTITYPE) &&
             !isConst?(abil,PBAbilities,:ILLUSION) &&
             !isConst?(abil,PBAbilities,:FLOWERGIFT) &&
             !isConst?(abil,PBAbilities,:IMPOSTER) &&
             !isConst?(abil,PBAbilities,:STANCECHANGE) &&
             !isConst?(abil,PBAbilities,:COMATOSE) &&
             !isConst?(abil,PBAbilities,:BATTLEBOND) &&
             !isConst?(abil,PBAbilities,:POWERCONSTRUCT) &&
             !isConst?(abil,PBAbilities,:DISGUISE) &&
             !isConst?(abil,PBAbilities,:POWEROFALCHEMY) &&
             !isConst?(abil,PBAbilities,:RECEIVER) &&
             !isConst?(abil,PBAbilities,:RKSSYSTEM) &&
             !isConst?(abil,PBAbilities,:SCHOOLING) &&
             !isConst?(abil,PBAbilities,:SHIELDSDOWN)
            choices.push(i)
          end
        end
      end
In PokeBattle_Battler, under Moxie:
# Power of Alchemy, Receiver
    if (user.hasWorkingAbility(:POWEROFALCHEMY) ||
      user.hasWorkingAbility(:RECEIVER)) && @battle.doublebattle &&
       user.pbPartner.fainted?
      usable=false
      abil=user.pbPartner.ability
      if abil>0 &&
             !isConst?(abil,PBAbilities,:POWEROFALCHEMY) &&
             !isConst?(abil,PBAbilities,:TRACE) &&
             !isConst?(abil,PBAbilities,:MULTITYPE) &&
             !isConst?(abil,PBAbilities,:ILLUSION) &&
             !isConst?(abil,PBAbilities,:FLOWERGIFT) &&
             !isConst?(abil,PBAbilities,:IMPOSTER) &&
             !isConst?(abil,PBAbilities,:STANCECHANGE) &&
             !isConst?(abil,PBAbilities,:COMATOSE) &&
             !isConst?(abil,PBAbilities,:BATTLEBOND) &&
             !isConst?(abil,PBAbilities,:POWERCONSTRUCT) &&
             !isConst?(abil,PBAbilities,:RECEIVER) &&
             !isConst?(abil,PBAbilities,:FORECAST) &&
             !isConst?(abil,PBAbilities,:WONDERGUARD) &&
             !isConst?(abil,PBAbilities,:DISGUISE) &&
             !isConst?(abil,PBAbilities,:ZENMODE) &&
             !isConst?(abil,PBAbilities,:SCHOOLING) &&
             !isConst?(abil,PBAbilities,:SHIELDSDOWN) &&
             !isConst?(abil,PBAbilities,:RKSSYSTEM)
            usable=true
      end
      if usable
        abilityname=PBAbilities.getName(abil)
        PBDebug.log("[Ability triggered] #{user.pbThis}'s #{PBAbilities.getName(user.ability)} turned into #{abilityname} from #{user.pbPartner}")
        user.ability=abil
        @battle.pbDisplay(_INTL("{1} copied {2}'s {3}!",user.pbThis,user.pbPartner,abilityname))
      end
    end
In PokeBattle_MoveEffects, where is Role Play:
if opponent.ability==0 ||
       attacker.ability==opponent.ability ||
       isConst?(attacker.ability,PBAbilities,:MULTITYPE) ||
       isConst?(attacker.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:FLOWERGIFT) ||
       isConst?(opponent.ability,PBAbilities,:FORECAST) ||
       isConst?(opponent.ability,PBAbilities,:ILLUSION) ||
       isConst?(opponent.ability,PBAbilities,:IMPOSTER) ||
       isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
       isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:TRACE) ||
       isConst?(opponent.ability,PBAbilities,:WONDERGUARD) ||
       isConst?(opponent.ability,PBAbilities,:ZENMODE) ||
       isConst?(opponent.ability,PBAbilities,:DISGUISE) ||
       isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
       isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:POWEROFALCHEMY) ||
       isConst?(opponent.ability,PBAbilities,:RECEIVER) ||
       isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
       isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
In PokeBattle_MoveEffects, where is Entrainment:
if attacker.ability==0 ||
       attacker.ability==opponent.ability ||
       isConst?(opponent.ability,PBAbilities,:FLOWERGIFT) ||
       isConst?(opponent.ability,PBAbilities,:IMPOSTER) ||
       isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
       isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:TRACE) ||
       isConst?(opponent.ability,PBAbilities,:TRUANT) ||
       isConst?(opponent.ability,PBAbilities,:ZENMODE) ||
       isConst?(attacker.ability,PBAbilities,:FLOWERGIFT) ||
       isConst?(attacker.ability,PBAbilities,:FORECAST) ||
       isConst?(attacker.ability,PBAbilities,:ILLUSION) ||
       isConst?(attacker.ability,PBAbilities,:IMPOSTER) ||
       isConst?(attacker.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(attacker.ability,PBAbilities,:TRACE) ||
       isConst?(attacker.ability,PBAbilities,:ZENMODE) ||
       isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
       isConst?(attacker.ability,PBAbilities,:COMATOSE) ||
       isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(attacker.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:POWERCONSTRUCT) ||
       isConst?(attacker.ability,PBAbilities,:POWERCONSTRUCT) ||
       isConst?(attacker.ability,PBAbilities,:POWEROFALCHEMY) ||
       isConst?(attacker.ability,PBAbilities,:RECEIVER) ||
       isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
       isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)

      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
To here, its only to 'attacker.ability' or will need put to 'opponent.ability' too? Like all of them inside:

In PokeBattle_MoveEffects, where is Entrainment:
Spoiler:

[CODE]if attacker.ability==0 ||
attacker.ability==opponent.ability ||
isConst?(opponent.ability,PBAbilities,:FLOWERGIFT) ||
isConst?(opponent.ability,PBAbilities,:IMPOSTER) ||
isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
isConst?(opponent.ability,PBAbilities,:TRACE) ||
isConst?(opponent.ability,PBAbilities,:TRUANT) ||
isConst?(opponent.ability,PBAbilities,:ZENMODE) ||
isConst?(attacker.ability,PBAbilities,:FLOWERGIFT) ||
isConst?(attacker.ability,PBAbilities,:FORECAST) ||
isConst?(attacker.ability,PBAbilities,:ILLUSION) ||
isConst?(attacker.ability,PBAbilities,:IMPOSTER) ||
isConst?(attacker.ability,PBAbilities,:STANCECHANGE) ||
isConst?(attacker.ability,PBAbilities,:TRACE) ||
isConst?(attacker.ability,PBAbilities,:ZENMODE) ||
isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
isConst?(attacker.ability,PBAbilities,:COMATOSE) ||
isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
isConst?(attacker.ability,PBAbilities,:BATTLEBOND) ||
isConst?(opponent.ability,PBAbilities,:POWERCONSTRUCT) ||
isConst?(attacker.ability,PBAbilities,:POWERCONSTRUCT) ||
isConst?(attacker.ability,PBAbilities,:POWEROFALCHEMY) ||
isConst?(attacker.ability,PBAbilities,:RECEIVER) ||

isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)

@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
[code]


can you post comatose?
or its alredy somewhere?
sorry for my bad english, i talk spanish
Also, please ^
:D?

Thank you!

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 1 Hour Ago
Posted 9 Hours Ago
787 posts
1.1 Years
Can you post Wimp Out and emergency exit abilities? And thx all of you posting some related links about some already made abilities from gen 7.
Check again this thread:
https://www.pokecommunity.com/showthread.php?p=9503805#post9503805

About Wimp Out and Emergency Exit:
https://www.pokecommunity.com/showpost.php?p=9503805&postcount=29

Also, i used google and search one more script to Emergency Exit (but i use made by Rot8er_ConeX):
https://www.pokecommunity.com/showthread.php?t=384480

EDIT: I will ask to
Comatose;
Berserk;
Stamina.

We have to many script to them (Stamina and Berserk). Please, can you give us the "right" code? :D

Thank you!

EDIT2:
Done! mybusiness sent it to me:


Comatose:
Spoiler:
In PokeBattle_Battler, where is Trace:
# Trace
    if self.hasWorkingAbility(:TRACE)
      choices=[]
      for i in 0...4
        foe=@battle.battlers[i]
        if pbIsOpposing?(i) && !foe.fainted?
          abil=foe.ability
          if abil>0 &&
             !isConst?(abil,PBAbilities,:TRACE) &&
             !isConst?(abil,PBAbilities,:MULTITYPE) &&
             !isConst?(abil,PBAbilities,:ILLUSION) &&
             !isConst?(abil,PBAbilities,:FLOWERGIFT) &&
             !isConst?(abil,PBAbilities,:IMPOSTER) &&
             !isConst?(abil,PBAbilities,:STANCECHANGE) &&
             !isConst?(abil,PBAbilities,:COMATOSE) &&
             !isConst?(abil,PBAbilities,:BATTLEBOND) &&
             !isConst?(abil,PBAbilities,:POWERCONSTRUCT) &&
             !isConst?(abil,PBAbilities,:DISGUISE) &&
             !isConst?(abil,PBAbilities,:POWEROFALCHEMY) &&
             !isConst?(abil,PBAbilities,:RECEIVER) &&
             !isConst?(abil,PBAbilities,:RKSSYSTEM) &&
             !isConst?(abil,PBAbilities,:SCHOOLING) &&
             !isConst?(abil,PBAbilities,:SHIELDSDOWN)
            choices.push(i)
          end
        end
      end
below, in def pbEffectsOnDealingDamage:
if target.hasWorkingAbility(:MUMMY,true) && !user.fainted?
          if !isConst?(user.ability,PBAbilities,:MULTITYPE) &&
             !isConst?(user.ability,PBAbilities,:STANCECHANGE) &&
             !isConst?(user.ability,PBAbilities,:MUMMY) &&
             !isConst?(user.ability,PBAbilities,:DISGUISE) &&
             !isConst?(user.ability,PBAbilities,:COMATOSE) &&
             !isConst?(user.ability,PBAbilities,:BATTLEBOND) &&
             !isConst?(user.ability,PBAbilities,:RKSSYSTEM) &&
             !isConst?(user.ability,PBAbilities,:SCHOOLING) &&
             !isConst?(user.ability,PBAbilities,:SHIELDSDOWN)
            PBDebug.log("[Ability triggered] #{target.pbThis}'s Mummy copied onto #{user.pbThis(true)}")
            user.ability=getConst(PBAbilities,:MUMMY) || 0
            @battle.pbDisplay(_INTL("{1} was mummified by {2}!",
               user.pbThis,target.pbThis(true)))
          end
        end
below, where is Power of Alchemy, Receiver (if you don´t have this, skip):
# Power of Alchemy, Receiver
    if (user.hasWorkingAbility(:POWEROFALCHEMY) ||
      user.hasWorkingAbility(:RECEIVER)) && @battle.doublebattle &&
       user.pbPartner.fainted?
      usable=false
      abil=user.pbPartner.ability
      if abil>0 &&
             !isConst?(abil,PBAbilities,:POWEROFALCHEMY) &&
             !isConst?(abil,PBAbilities,:TRACE) &&
             !isConst?(abil,PBAbilities,:MULTITYPE) &&
             !isConst?(abil,PBAbilities,:ILLUSION) &&
             !isConst?(abil,PBAbilities,:FLOWERGIFT) &&
             !isConst?(abil,PBAbilities,:IMPOSTER) &&
             !isConst?(abil,PBAbilities,:STANCECHANGE) &&
             !isConst?(abil,PBAbilities,:COMATOSE) &&
             !isConst?(abil,PBAbilities,:BATTLEBOND) &&
             !isConst?(abil,PBAbilities,:POWERCONSTRUCT) &&
             !isConst?(abil,PBAbilities,:RECEIVER) &&
             !isConst?(abil,PBAbilities,:FORECAST) &&
             !isConst?(abil,PBAbilities,:WONDERGUARD) &&
             !isConst?(abil,PBAbilities,:DISGUISE) &&
             !isConst?(abil,PBAbilities,:ZENMODE) &&
             !isConst?(abil,PBAbilities,:SCHOOLING) &&
             !isConst?(abil,PBAbilities,:SHIELDSDOWN) &&
             !isConst?(abil,PBAbilities,:RKSSYSTEM)
            usable=true
      end
      if usable
        abilityname=PBAbilities.getName(abil)
        PBDebug.log("[Ability triggered] #{user.pbThis}'s #{PBAbilities.getName(user.ability)} turned into #{abilityname} from #{user.pbPartner}")
        user.ability=abil
        @battle.pbDisplay(_INTL("{1} copied {2}'s {3}!",user.pbThis,user.pbPartner,abilityname))
      end
    end
below, in def pbSuccessCheck replace this
# TODO: "Before Protect" applies to Counter/Mirror Coat
    if thismove.function==0xDE && target.status!=PBStatuses::SLEEP # Dream Eater
      @battle.pbDisplay(_INTL("{1} wasn't affected!",target.pbThis))
      PBDebug.log("[Move failed] #{user.pbThis}'s Dream Eater's target isn't asleep")
      return false
    end
with this:
# TODO: "Before Protect" applies to Counter/Mirror Coat
    if thismove.function==0xDE && # Dream Eater
      target.status!=PBStatuses::SLEEP && (!target.hasWorkingAbility(:COMATOSE) || !isConst?(target.species,PBSpecies,:KOMALA))
      @battle.pbDisplay(_INTL("{1} wasn't affected!",target.pbThis))
      PBDebug.log("[Move failed] #{user.pbThis}'s Dream Eater's target isn't asleep")
      return false
    end
In PokeBattle_BattlerEffects, where is Sleep:
def pbCanSleep?(attacker,showMessages,move=nil,ignorestatus=false)
    return false if fainted?
    return false if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
    return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0
    selfsleep=(attacker && attacker.index==self.index)
more below:
def pbCanSleepYawn?
    return false if status!=0
    return false if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
    return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0
more below:
def pbSleepSelf(duration=-1)
    return false if self.hasWorkingAbility(:COMATOSE)
    return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0
    self.status=PBStatuses::SLEEP
more below, where is Poison:
def pbCanPoison?(attacker,showMessages,move=nil)
    return false if fainted?
    return false if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
    return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0
more below:
def pbCanPoisonSynchronize?(opponent)
    return false if fainted?
    return false if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
    return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0
more below:
def pbCanPoisonSpikes?(moldbreaker=false)
    return false if fainted?
    return false if self.status!=0
    return false if pbHasType?(:POISON) || pbHasType?(:STEEL)
    return false if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
    return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0
more below, where is Burn:
def pbCanBurn?(attacker,showMessages,move=nil)
    return false if fainted?
    return false if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
    return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0
    return false if self.hasWorkingAbility(:WATERBUBBLE)
more below:
def pbCanBurnSynchronize?(opponent)
    return false if fainted?
    return false if self.status!=0
    return false if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
    return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0
    return false if self.hasWorkingAbility(:WATERBUBBLE)
more below, where is Paralyze:
def pbCanParalyze?(attacker,showMessages,move=nil)
    return false if fainted?
    return false if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
    return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0
more below:
def pbCanParalyzeSynchronize?(opponent)
    return false if self.status!=0
    return false if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
    return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0
    return false if @battle.field.effects[PBEffects::MistyTerrain]>0 && !self.isAirborne?
more below, where is Freeze:
def pbCanFreeze?(attacker,showMessages,move=nil)
    return false if fainted?
    return false if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
    return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0
In PokeBattle_MoveEffects, where is Snore, replace this
def pbMoveFailed(attacker,opponent)
    return (attacker.status!=PBStatuses::SLEEP)
  end
with this
def pbMoveFailed(attacker,opponent)
    return attacker.status!=PBStatuses::SLEEP && 
    (!attacker.hasWorkingAbility(:COMATOSE) || 
    !isConst?(attacker.species,PBSpecies,:KOMALA))
  end
below, where is Simple Beam:
if isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
       isConst?(opponent.ability,PBAbilities,:SIMPLE) ||
       isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:TRUANT) ||
       isConst?(opponent.ability,PBAbilities,:DISGUISE) ||
       isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
       isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
       isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
below, where is Worry Seed:
if isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
       isConst?(opponent.ability,PBAbilities,:INSOMNIA) ||
       isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:TRUANT) ||
       isConst?(opponent.ability,PBAbilities,:DISGUISE) ||
       isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
       isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
       isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
below, where is Role Play:
if opponent.ability==0 ||
       attacker.ability==opponent.ability ||
       isConst?(attacker.ability,PBAbilities,:MULTITYPE) ||
       isConst?(attacker.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:FLOWERGIFT) ||
       isConst?(opponent.ability,PBAbilities,:FORECAST) ||
       isConst?(opponent.ability,PBAbilities,:ILLUSION) ||
       isConst?(opponent.ability,PBAbilities,:IMPOSTER) ||
       isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
       isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:TRACE) ||
       isConst?(opponent.ability,PBAbilities,:WONDERGUARD) ||
       isConst?(opponent.ability,PBAbilities,:ZENMODE) ||
       isConst?(opponent.ability,PBAbilities,:DISGUISE) ||
       isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
       isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:POWEROFALCHEMY) ||
       isConst?(opponent.ability,PBAbilities,:RECEIVER) ||
       isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
       isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
below, where is Entrainment:
if attacker.ability==0 ||
       attacker.ability==opponent.ability ||
       isConst?(opponent.ability,PBAbilities,:FLOWERGIFT) ||
       isConst?(opponent.ability,PBAbilities,:IMPOSTER) ||
       isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
       isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:TRACE) ||
       isConst?(opponent.ability,PBAbilities,:TRUANT) ||
       isConst?(opponent.ability,PBAbilities,:ZENMODE) ||
       isConst?(attacker.ability,PBAbilities,:FLOWERGIFT) ||
       isConst?(attacker.ability,PBAbilities,:FORECAST) ||
       isConst?(attacker.ability,PBAbilities,:ILLUSION) ||
       isConst?(attacker.ability,PBAbilities,:IMPOSTER) ||
       isConst?(attacker.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(attacker.ability,PBAbilities,:TRACE) ||
       isConst?(attacker.ability,PBAbilities,:ZENMODE) ||
       isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
       isConst?(attacker.ability,PBAbilities,:COMATOSE) ||
       isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(attacker.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:POWERCONSTRUCT) ||
       isConst?(attacker.ability,PBAbilities,:POWERCONSTRUCT) ||
       isConst?(attacker.ability,PBAbilities,:POWEROFALCHEMY) ||
       isConst?(attacker.ability,PBAbilities,:RECEIVER) ||
       isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
       isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)

      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
below, where is Skill Swap:
if (attacker.ability==0 && opponent.ability==0) ||
       (attacker.ability==opponent.ability && !USENEWBATTLEMECHANICS) ||
       isConst?(attacker.ability,PBAbilities,:ILLUSION) ||
       isConst?(opponent.ability,PBAbilities,:ILLUSION) ||
       isConst?(attacker.ability,PBAbilities,:MULTITYPE) ||
       isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
       isConst?(attacker.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(attacker.ability,PBAbilities,:WONDERGUARD) ||
       isConst?(opponent.ability,PBAbilities,:WONDERGUARD) ||
       isConst?(attacker.ability,PBAbilities,:COMATOSE) ||
       isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
       isConst?(attacker.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:POWERCONSTRUCT) ||
       isConst?(attacker.ability,PBAbilities,:POWERCONSTRUCT) ||
       isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(attacker.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
       isConst?(attacker.ability,PBAbilities,:SCHOOLING) ||
       isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN) ||
       isConst?(attacker.ability,PBAbilities,:SHIELDSDOWN)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
below, where is Gastro Acid:
if isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
       isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:DISGUISE) ||
       isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
       isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:POWERCONSTRUCT) ||
       isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
       isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
below, where is Wake-Up Slap, replace
def pbBaseDamage(basedmg,attacker,opponent)
    if opponent.status==PBStatuses::SLEEP &&
       (opponent.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(attacker))
      return basedmg*2
    end
    return basedmg
  end
with
def pbBaseDamage(basedmg,attacker,opponent)
    if (opponent.status==PBStatuses::SLEEP &&
       (opponent.effects[PBEffects::Substitute]==0 ||
       ignoresSubstitute?(attacker))) || (opponent.hasWorkingAbility(:COMATOSE) &&
       isConst(opponent.species,PBSpecies,:KOMALA) &&
       (opponent.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(attacker)))
      return basedmg*2
    end
    return basedmg
  end
below, where is Hex, replace
class PokeBattle_Move_07F < PokeBattle_Move
  def pbBaseDamage(basedmg,attacker,opponent)
    if opponent.status>0 &&
       (opponent.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(attacker))
      return basedmg*2
    end
    return basedmg
  end
end
with
class PokeBattle_Move_07F < PokeBattle_Move
  def pbBaseDamage(basedmg,attacker,opponent)
    if (opponent.status>0 &&
       (opponent.effects[PBEffects::Substitute]==0 || 
       ignoresSubstitute?(attacker))) || (opponent.hasWorkingAbility(:COMATOSE) &&
       isConst?(opponent.species,PBSpecies,:KOMALA) &&
       (opponent.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(attacker)))
      return basedmg*2
    end
    return basedmg
  end
end
below, where is Sleep Talk:
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if attacker.status!=PBStatuses::SLEEP && 
      (!attacker.hasWorkingAbility(:COMATOSE) || 
      !isConst?(attacker.species,PBSpecies,:KOMALA))
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
below, where is Nightmare, replace
if opponent.status!=PBStatuses::SLEEP || opponent.effects[PBEffects::Nightmare] ||
       (opponent.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(attacker))
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
with
if (opponent.status!=PBStatuses::SLEEP || opponent.effects[PBEffects::Nightmare] ||
       (opponent.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(attacker))) &&
       (!opponent.hasWorkingAbility(:COMATOSE) || 
       isConst?(opponent.species,PBSpecies,:KOMALA) || opponent.effects[PBEffects::Nightmare] ||
       (opponent.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(attacker)))
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
where is Core Enforcer (if you don´t have this, skip):
if isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
       isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:DISGUISE) ||
       isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
       isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:POWERCONSTRUCT) ||
       isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
       isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)
        return
      end
In PokeBattle_Battle, where is Nightmare:
# Nightmare
      if i.effects[PBEffects::Nightmare]
        if i.status==PBStatuses::SLEEP || (i.hasWorkingAbility(:COMATOSE) &&
          isConst?(i.species,PBSpecies,:KOMALA))
          if !i.hasWorkingAbility(:MAGICGUARD)
            PBDebug.log("[Lingering effect triggered] #{i.pbThis}'s nightmare")
            i.pbReduceHP((i.totalhp/4).floor,true)
            pbDisplay(_INTL("{1} is locked in a nightmare!",i.pbThis))
          end
        else
          i.effects[PBEffects::Nightmare]=false
        end
      end
      if i.fainted?
        return if !i.pbFaint
        next
      end
    end
below, where is Bad Dreams, replace
# Bad Dreams
      if i.status==PBStatuses::SLEEP && !i.hasWorkingAbility(:MAGICGUARD)
        if i.pbOpposing1.hasWorkingAbility(:BADDREAMS) ||
           i.pbOpposing2.hasWorkingAbility(:BADDREAMS)
          PBDebug.log("[Ability triggered] #{i.pbThis}'s opponent's Bad Dreams")
          hploss=i.pbReduceHP((i.totalhp/8).floor,true)
          pbDisplay(_INTL("{1} is having a bad dream!",i.pbThis)) if hploss>0
        end
      end
      if i.fainted?
        return if !i.pbFaint
        next
      end
with
# Bad Dreams
      if (i.status==PBStatuses::SLEEP && !i.hasWorkingAbility(:MAGICGUARD)) ||
        (i.hasWorkingAbility(:COMATOSE) && isConst?(i.species,PBSpecies,:KOMALA))
        if i.pbOpposing1.hasWorkingAbility(:BADDREAMS) ||
           i.pbOpposing2.hasWorkingAbility(:BADDREAMS)
          PBDebug.log("[Ability triggered] #{i.pbThis}'s opponent's Bad Dreams")
          hploss=i.pbReduceHP((i.totalhp/8).floor,true)
          pbDisplay(_INTL("{1} is having a bad dream!",i.pbThis)) if hploss>0
        end
      end
      if i.fainted?
        return if !i.pbFaint
        next
      end


Berserk:
Spoiler:
In PokeBattle_Battler, in def pbEffectsAfterHit, right after Color Change, put:
# Berserk
       if target.hasWorkingAbility(:BERSERK) &&
            target.hp+turneffects[PBEffects::TotalDamage]>(target.totalhp/2).floor &&
            target.hp<=(target.totalhp/2).floor
        target.pbIncreaseStatWithCause(PBStats::SPATK,1,target,PBAbilities.getName(target.ability))
        PBDebug.log("[Ability triggered] #{target.pbThis}'s Berserk")
       end


Stamina:
Spoiler:
In PokeBattle_Battler, in def pbProcessMoveAgainstTarget, right after Illusion, put:
# Stamina
      if target.hasWorkingAbility(:STAMINA) && damage>0 && !target.damagestate.substitute
        if target.pbIncreaseStatWithCause(PBStats::DEFENSE,1,target,PBAbilities.getName(target.ability))
          PBDebug.log("[Ability triggered] #{target.pbThis}'s Stamina was activated")
        end
      end
Male
Portugal
Seen 16 Hours Ago
Posted 3 Weeks Ago
179 posts
5.2 Years
I think i detected a bug in COMATOSE ability.

I was testing this in a wild battle against Plusle:

When it uses Growl or Quick Attack, this moves can't affect Komala.

Other ex: when i battled agains a trainer with a Shroomish, its Tackle can't affect my Komala.

Logically that stun spore, for example, and moves similar to this one, can't affect Komala.

Basically Komana is imune with everything in my game lol. I followed all the instructions to the letter.
So, anyone figured this out?

I'm testing all the gen 7 abilities, one by one, to see if i get bugs or errors. I've founded some errors in some abilities from those links too.
In PokeBattle_Battler, replace
# TODO: "Before Protect" applies to Counter/Mirror Coat
    if (thismove.function==0xDE && target.status!=PBStatuses::SLEEP) || # Dream Eater
      (target.hasWorkingAbility(:COMATOSE) && isConst?(target.species,PBSpecies,:KOMALA))
      @battle.pbDisplay(_INTL("{1} wasn't affected!",target.pbThis))
      PBDebug.log("[Move failed] #{user.pbThis}'s Dream Eater's target isn't asleep")
      return false
    end
with this
# TODO: "Before Protect" applies to Counter/Mirror Coat
    if thismove.function==0xDE && # Dream Eater
      target.status!=PBStatuses::SLEEP && (!target.hasWorkingAbility(:COMATOSE) || !isConst?(target.species,PBSpecies,:KOMALA))
      @battle.pbDisplay(_INTL("{1} wasn't affected!",target.pbThis))
      PBDebug.log("[Move failed] #{user.pbThis}'s Dream Eater's target isn't asleep")
      return false
    end
The previous abilities I´ve PM´d because of not being approved (maybe my post was too long). What abilities, exactly, you found that have bugs?
Male
Portugal
Seen 16 Hours Ago
Posted 3 Weeks Ago
179 posts
5.2 Years
Well, I will post here all the moves that are missing/with bugs/errors etc:

Dancer/ full metal body/ long reach/ prism armor/ queenly magesty/ shadow shield/ slush rush/ stake out/ soul-heart/ neuroforce.

The surge abilities i not tested yet. All other abilities that aren't in this list are OK and running fine.

About Comatose ability, move like for ex: quick attack now causes damage normally. But when a wild pokemon use thunder wave, in my game test, it only show the message of the pokemon using the move and nothing more. There's no message to show if the move landed, missed, etc.

Note: total abilities are 237.
According to Bulbapedia, there are exactly 233 abilities, as of now. I suggest you to revise your PBS.
Ok, here´s the last fix for Komala. In PokeBattle_BattlerEffects, modify the previous code as such:

Sleep:
Spoiler:
def pbCanSleep?(attacker,showMessages,move=nil,ignorestatus=false)
    return false if fainted?
    if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
      @battle.pbDisplay(_INTL("{1} isn't affected.",pbThis)) if showMessages
      return false
    end

below:
Spoiler:
def pbSleepSelf(duration=-1)
    if self.hasWorkingAbility(:COMATOSE)
      @battle.pbDisplay(_INTL("{1} is already in a comatose state!",pbThis))
      return false
    end

below:
Spoiler:
def pbCanPoison?(attacker,showMessages,move=nil)
    return false if fainted?
    if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
      @battle.pbDisplay(_INTL("{1} isn't affected.",pbThis)) if showMessages
      return false
    end

below:
Spoiler:
def pbCanPoisonSynchronize?(opponent)
    return false if fainted?
    if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
      @battle.pbDisplay(_INTL("{1}'s {2} prevents synchronization!",
                        pbThis,PBAbilities.getName(self.ability)))
      return false
    end

below:
Spoiler:
def pbCanBurn?(attacker,showMessages,move=nil)
    return false if fainted?
    if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
      @battle.pbDisplay(_INTL("{1} isn't affected.",pbThis)) if showMessages
      return false
    end

below:
Spoiler:
def pbCanBurnSynchronize?(opponent)
    return false if fainted?
    return false if self.status!=0
    if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
      @battle.pbDisplay(_INTL("{1}'s {2} prevents synchronization!",
                        pbThis,PBAbilities.getName(self.ability)))
      return false
    end

below:
Spoiler:
def pbCanParalyze?(attacker,showMessages,move=nil)
    return false if fainted?
    if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
      @battle.pbDisplay(_INTL("{1} isn't affected.",pbThis)) if showMessages
      return false
    end

below:
Spoiler:
def pbCanParalyzeSynchronize?(opponent)
    return false if self.status!=0
    if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
      @battle.pbDisplay(_INTL("{1}'s {2} prevents synchronization!",
                        pbThis,PBAbilities.getName(self.ability)))
      return false
    end

below:
Spoiler:
def pbCanFreeze?(attacker,showMessages,move=nil)
    return false if fainted?
    if self.hasWorkingAbility(:COMATOSE) && isConst?(self.species,PBSpecies,:KOMALA)
      @battle.pbDisplay(_INTL("{1} isn't affected.",pbThis)) if showMessages
      return false
    end


For the next abilities, I´ll post one by one to get tested by you, and only after someone provide me good feedback I´ll proceed to the next. I hope there are no more bugs to the others.
Male
Portugal
Seen 16 Hours Ago
Posted 3 Weeks Ago
179 posts
5.2 Years
I always make tests about every script that i want for my project. And when i detect some issue, i report the problem as much as detailed as i can. I do make little fixes in scripts but i'm no expert in scripting.

I always try to fix the issue myself before reporting the problem.
In Bulbapedia, there are 233? That's odd. Maybe i will organize them alphabetically to better track them in the PBS file.

When i've got time i will test those recent fixes of yours.
I have multiple requests (also from PM), so, patience. Now, Waterbubble:

In PokeBattle_BattlerEffects:
Spoiler:
Where is Burn:
def pbCanBurn?(attacker,showMessages,move=nil)
    return false if fainted?
    if self.hasWorkingAbility(:WATERBUBBLE)
      @battle.pbDisplay(_INTL("{1}'s sorrounding water damped the fire.",pbThis)) if showMessages
      return false
    end
    if self.status==PBStatuses::BURN
      @battle.pbDisplay(_INTL("{1} already has a burn.",pbThis)) if showMessages
      return false
    end
below:
def pbCanBurnSynchronize?(opponent)
    return false if fainted?
    return false if self.status!=0
    if self.hasWorkingAbility(:WATERBUBBLE)
      @battle.pbDisplay(_INTL("{1}'s {2} prevents synchronization!",
                              pbThis,PBAbilities.getName(self.ability)))
      return false
    end
    if pbHasType?(:FIRE) && !hasWorkingItem(:RINGTARGET)
       @battle.pbDisplay(_INTL("{1}'s {2} had no effect on {3}!",
          opponent.pbThis,PBAbilities.getName(opponent.ability),pbThis(true)))
       return false
    end
below:
def pbBurn(attacker=nil,msg=nil)
    self.status=PBStatuses::BURN
    self.statusCount=0
    @battle.pbCommonAnimation("Burn",self,nil)
    if msg && msg!=""
      @battle.pbDisplay(msg)
    else
      @battle.pbDisplay(_INTL("{1} was burned!",pbThis))
    end
    PBDebug.log("[Status change] #{pbThis} was burned")
    if attacker && self.index!=attacker.index &&
       self.hasWorkingAbility(:SYNCHRONIZE)
      if attacker.pbCanBurnSynchronize?(self)
        PBDebug.log("[Ability triggered] #{self.pbThis}'s Synchronize")
        attacker.pbBurn(nil,_INTL("{1}'s {2} burned {3}!",self.pbThis,
           PBAbilities.getName(self.ability),attacker.pbThis(true)))
      end
    end
    if self.hasWorkingAbility(:WATERBUBBLE)
      self.status=0
      PBDebug.log("[Status change] #{pbThis} was cured")
       @battle.pbDisplay(_INTL("{1}'s sorrounding water extinguished the fire.",pbThis))
    end
  end


In PokeBattle_Move:
Spoiler:
In def pbCalcDamage:
if attacker.hasWorkingAbility(:MEGALAUNCHER) && isPulseMove?
      damagemult=(damagemult*1.5).round
    end
    if attacker.hasWorkingAbility(:WATERBUBBLE) && isConst?(type,PBTypes,:WATER)
      damagemult=(damagemult*2.0).round
    end
    if attacker.hasWorkingAbility(:RECKLESS) && isRecoilMove?
      damagemult=(damagemult*1.2).round
    end
below:
if !attacker.hasMoldBreaker && !doesIgnoreAbilities?
      if opponent.hasWorkingAbility(:WATERBUBBLE) && isConst?(type,PBTypes,:FIRE)
        finaldamagemult=(finaldamagemult*0.5).round
      end
      if opponent.hasWorkingAbility(:MULTISCALE) && opponent.hp==opponent.totalhp
        finaldamagemult=(finaldamagemult*0.5).round

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 1 Hour Ago
Posted 9 Hours Ago
787 posts
1.1 Years
if !attacker.hasMoldBreaker && !doesIgnoreAbilities?
      if opponent.hasWorkingAbility(:WATERBUBBLE) && isConst?(type,PBTypes,:FIRE)
        finaldamagemult=(finaldamagemult*0.5).round
      end
      if opponent.hasWorkingAbility(:MULTISCALE) && opponent.hp==opponent.totalhp
        finaldamagemult=(finaldamagemult*0.5).round
Oh God! Good to look that ' !doesIgnoreAbilities?'. Can you share your def? Cuz i havent yet...

Also, could you post SHIELDSDOWN ability? I saw that you script is different to the others.

Thank you!
Good to look that ' !doesIgnoreAbilities?'. Can you share your def? Cuz i havent yet...
That is relating Necrozma's special moves' effects, which is almost done. When I finish that I'll post in another thread.

Also, could you post SHIELDSDOWN ability? I saw that you script is different to the others.
Dancer is next in my list of requests. This was my hardest challenge, by the way. So, here it is:

Add this in PokeBattle_Move, after def isBombMove?
Spoiler:
def isDanceMove?
    return isConst?(@id,PBMoves,:QUIVERDANCE) ||
           isConst?(@id,PBMoves,:DRAGONDANCE) ||
           isConst?(@id,PBMoves,:FIERYDANCE) ||
           isConst?(@id,PBMoves,:FEATHERDANCE) ||
           isConst?(@id,PBMoves,:PETALDANCE) ||
           isConst?(@id,PBMoves,:SWORDSDANCE) ||
           isConst?(@id,PBMoves,:TEETERDANCE) ||
           isConst?(@id,PBMoves,:LUNARDANCE) ||
           isConst?(@id,PBMoves,:REVELATIONDANCE)
  end

Add in PBEffects an effect that applies to a battler:
Spoiler:
Dancer             = 110 # you may replace 110 with the next number after the number associated to your last effect

Now, everything next is in PokeBattle_Battler.

Where is def pbProcessMoveAgainstTarget:
Spoiler:
def pbProcessMoveAgainstTarget(thismove,user,target,numhits,turneffects,nocheck=false,alltargets=nil,showanimation=true,dancercheck=false)

below, just above # Berry Check:
Spoiler:
# Dancer using damaging moves
    if thismove.isDanceMove? && !dancercheck
      if @battle.doublebattle
        for k in @battle.pbPriority(true)
          if k!=user && !k.fainted?
            if !k.effects[PBEffects::Dancer] &&
            k.hasWorkingAbility(:DANCER)
            @battle.battlers[user.index].effects[PBEffects::Dancer]=true
              if k==user.pbPartner
                if !target.fainted?
                  if target==user.pbPartner
                    if !user.pbOpposing1.fainted?
                      @battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
                      k.effects[PBEffects::Dancer]=true
                      pbProcessMoveAgainstTarget(thismove,k,user.pbOpposing1,numhits,turneffects,nocheck,alltargets,showanimation,true)
                    elsif !user.pbOpposing2.fainted?
                      @battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
                      k.effects[PBEffects::Dancer]=true
                      pbProcessMoveAgainstTarget(thismove,k,user.pbOpposing2,numhits,turneffects,nocheck,alltargets,showanimation,true)
                    elsif !user.fainted?
                      @battle.pbDisplay(_INTL("{1} wants to dance, but will not attack its ally!",user.pbPartner.pbThis))
                    else
                      @battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",user.pbPartner.pbThis))
                    end
                  else
                    @battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
                    k.effects[PBEffects::Dancer]=true
                    pbProcessMoveAgainstTarget(thismove,k,target,numhits,turneffects,nocheck,alltargets,showanimation,true)
                  end
                elsif !target.pbPartner.fainted?
                  @battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
                  k.effects[PBEffects::Dancer]=true
                  pbProcessMoveAgainstTarget(thismove,k,target.pbPartner,numhits,turneffects,nocheck,alltargets,showanimation,true)
                elsif !user.fainted?
                  @battle.pbDisplay(_INTL("{1} wants to dance, but will not attack its ally!",user.pbPartner.pbThis))
                else
                  @battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",user.pbPartner.pbThis))
                end
              elsif k==user.pbOpposing1
                if !user.fainted?
                  @battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
                  k.effects[PBEffects::Dancer]=true
                  pbProcessMoveAgainstTarget(thismove,k,user,numhits,turneffects,nocheck,alltargets,showanimation,true)
                elsif !user.pbPartner.fainted?
                  @battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
                  k.effects[PBEffects::Dancer]=true
                  pbProcessMoveAgainstTarget(thismove,k,user.pbPartner,numhits,turneffects,nocheck,alltargets,showanimation,true)
                elsif !user.pbOpposing2.fainted?
                  @battle.pbDisplay(_INTL("{1} wants to dance, but will not attack its ally!",user.pbOpposing1.pbThis))
                else
                  @battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",user.pbOpposing1.pbThis))
                end
              elsif k==user.pbOpposing2
                if !user.fainted?
                  @battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
                  k.effects[PBEffects::Dancer]=true
                  pbProcessMoveAgainstTarget(thismove,k,user,numhits,turneffects,nocheck,alltargets,showanimation,true)
                elsif !user.pbPartner.fainted?
                  @battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
                  k.effects[PBEffects::Dancer]=true
                  pbProcessMoveAgainstTarget(thismove,k,user.pbPartner,numhits,turneffects,nocheck,alltargets,showanimation,true)
                elsif !user.pbOpposing1.fainted?
                  @battle.pbDisplay(_INTL("{1} wants to dance, but will not attack its ally!",user.pbOpposing1.pbThis))
                else
                  @battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",user.pbOpposing2.pbThis))
                end
              end
            end
          end
        end
      elsif target.hasWorkingAbility(:DANCER) && !target.fainted? && !user.fainted?
           @battle.pbDisplay(_INTL("{1} also dances!",target.pbThis))
           pbProcessMoveAgainstTarget(thismove,target,user,numhits,turneffects,nocheck,alltargets,showanimation,true)
      elsif target.hasWorkingAbility(:DANCER) && !target.fainted? && user.fainted?
           @battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",target.pbThis))
      end
    end    
    # Berry check
    for j in 0...4
      @battle.battlers[j].pbBerryCureCheck
    end
    target.pbUpdateTargetedMove(thismove,user)
    user.effects[PBEffects::LaserFocus]=false
    user.effects[PBEffects::LastMoveFailed]=false
  end

below, where is # Try to use move against user if there aren't any targets
Spoiler:
 # Try to use move against user if there aren't any targets
    if targets.length==0
      user=pbChangeUser(thismove,user)
      if thismove.target==PBTargets::SingleNonUser ||
         thismove.target==PBTargets::RandomOpposing ||
         thismove.target==PBTargets::AllOpposing ||
         thismove.target==PBTargets::AllNonUsers ||
         thismove.target==PBTargets::Partner ||
         thismove.target==PBTargets::UserOrPartner ||
         thismove.target==PBTargets::SingleOpposing ||
         thismove.target==PBTargets::OppositeOpposing
        @battle.pbDisplay(_INTL("But there was no target..."))
      else
           PBDebug.logonerr{
            thismove.pbEffect(user,nil)
           }
           # Dancer using non-damaging move
           if thismove.isDanceMove?
             for s in @battle.pbPriority(true)
               if s!=user &&
               s.hasWorkingAbility(:DANCER) && 
                 !s.fainted?
                 @battle.pbDisplay(_INTL("{1} also dances!",s.pbThis))
                 PBDebug.logonerr{
                  thismove.pbEffect(s,nil)
                 }
               end
             end
           end
      end
    else

below, where is # Turn processing
Spoiler:
def pbBeginTurn(choice)
    # Cancel some lingering effects which only apply until the user next moves
    @effects[PBEffects::DestinyBond]=false
    @effects[PBEffects::Grudge]=false
    @effects[PBEffects::Dancer]=false
    # Reset Parental Bond's count
    @effects[PBEffects::ParentalBond]=0

below, where is def pbEndTurn:
Spoiler:
def pbEndTurn(choice)
    # True end(?)
    if @effects[PBEffects::ChoiceBand]<0 && @lastMoveUsed>=0 && !fainted? && 
       (self.hasWorkingItem(:CHOICEBAND) ||
       self.hasWorkingItem(:CHOICESPECS) ||
       self.hasWorkingItem(:CHOICESCARF))
      @effects[PBEffects::ChoiceBand]=@lastMoveUsed
    end
    @battle.pbPrimordialWeather
    
    for i in 0...4
      @battle.battlers[i].pbBerryCureCheck
    end
    for i in 0...4
      @battle.battlers[i].pbAbilityCureCheck
    end
    
    for i in 0...4
      @battle.battlers[i].pbAbilitiesOnSwitchIn(false)
    end
    
    for i in 0...4
      @battle.battlers[i].pbCheckForm
      @battle.battlers[i].effects[PBEffects::Dancer]=false
    end
  end


Known discrepancies with the official standards:
-The priority among multiple moves activated by Dancer are sorted by speed (slowest to fastest), ignoring some effects (e.g.: Trick Room)
-Dancer will still activate if a dance move is snatched
-Moves activated by Dancer ignore Confusion, Encore, Taunt and Choice items and cannot be snatched or reflected by Magic Bounce or Magic Coat
-Petal Dance used through Dancer locks its attacker 2-3 turns (like its normal usage)
*-Oricorios are not stupid, i.e., doesn't attack its allies (this was made intentional by me, to make this ability more practical)

If anyone knows how to fix those above (minus the last), would be ideal, but if not, is no tragedy; as you see, those are not relevant bugs for the average hack.
Shields Down:

In PokeBattle_Battler:
Spoiler:
search def pbInitBlank
Spoiler:
def pbInitBlank
    @name         = ""
    @species      = 0
    @level        = 0
    @hp           = 0
    @totalhp      = 0
    @gender       = 0
    @ability      = 0
    @type1        = 0
    @type2        = 0
    @form         = 0
    @attack       = 0
    @defense      = 0
    @speed        = 0
    @spatk        = 0
    @spdef        = 0
    @status       = 0
    @statusCount  = 0
    @pokemon      = nil
    @pokemonIndex = -1
    @participants = []
    @moves        = [nil,nil,nil,nil]
    @iv           = [0,0,0,0,0,0]
    @item         = 0
    @weight       = nil
    @miniorform   = 0 # Records, eventually, to what form should Minior return after battle
  end


below, under Keldeo:
Spoiler:
# Keldeo
    if isConst?(self.species,PBSpecies,:KELDEO)
      if self.form!=@pokemon.form
        self.form=@pokemon.form
        transformed=true
        @battle.pbDisplay(_INTL("{1} transformed!",pbThis))
      end
    end
    # Minior
    if self.hasWorkingAbility(:SHIELDSDOWN) && 
      isConst?(self.species,PBSpecies,:MINIOR) &&
      self.hp>(self.totalhp*0.5).floor && self.form!=0
      @miniorform=self.form
      self.form=0
      @battle.pbDisplay(_INTL("{1}'s outer body was petrified!",self.pbThis))
      transformed=true
    elsif self.hasWorkingAbility(:SHIELDSDOWN) && 
      isConst?(self.species,PBSpecies,:MINIOR) &&
       self.hp<=(self.totalhp*0.5).floor && self.form==0 && @miniorform>0
      self.form=@miniorform
      @battle.pbDisplay(_INTL("{1}'s rocky shield was broken!",self.pbThis))
      transformed=true
    elsif self.hasWorkingAbility(:SHIELDSDOWN) && 
      isConst?(self.species,PBSpecies,:MINIOR) &&
       self.hp<=(self.totalhp*0.5).floor && self.form==0 && @miniorform=0
       self.form=1+rand(7)
       @miniorform=self.form
       @battle.pbDisplay(_INTL("{1}'s core was busted!",self.pbThis))
       transformed=true
    end
        
    if transformed
      pbUpdate(true)
      @battle.scene.pbChangePokemon(self,@pokemon)
      PBDebug.log("[Form changed] #{pbThis} changed to form #{self.form}")
    end

below, where is def pbResetUsualForms:
Spoiler:
def pbResetUsualForms
    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) ||
         isConst?(self.species,PBSpecies,:WISHIWASHI)
        self.form=0
      end
      if isConst?(self.species,PBSpecies,:MINIOR)
        if @miniorform>0
          self.form=@miniorform 
        else
          self.form=1+rand(7)
          @miniorform=self.form
        end
      end
    end
    pbUpdate(true)
  end

below, where is # Trace:
Spoiler:
# Trace
    if self.hasWorkingAbility(:TRACE)
      choices=[]
      for i in 0...4
        foe=@battle.battlers[i]
        if pbIsOpposing?(i) && !foe.fainted?
          abil=foe.ability
          if abil>0 &&
             !isConst?(abil,PBAbilities,:TRACE) &&
             !isConst?(abil,PBAbilities,:MULTITYPE) &&
             !isConst?(abil,PBAbilities,:ILLUSION) &&
             !isConst?(abil,PBAbilities,:FLOWERGIFT) &&
             !isConst?(abil,PBAbilities,:IMPOSTER) &&
             !isConst?(abil,PBAbilities,:STANCECHANGE) &&
             !isConst?(abil,PBAbilities,:COMATOSE) &&
             !isConst?(abil,PBAbilities,:BATTLEBOND) &&
             !isConst?(abil,PBAbilities,:POWERCONSTRUCT) &&
             !isConst?(abil,PBAbilities,:DISGUISE) &&
             !isConst?(abil,PBAbilities,:POWEROFALCHEMY) &&
             !isConst?(abil,PBAbilities,:RECEIVER) &&
             !isConst?(abil,PBAbilities,:RKSSYSTEM) &&
             !isConst?(abil,PBAbilities,:SCHOOLING) &&
             !isConst?(abil,PBAbilities,:SHIELDSDOWN)
            choices.push(i)
          end
        end
      end

below, where is Mummy, similar to Trace, add:
Spoiler:
!isConst?(user.ability,PBAbilities,:SHIELDSDOWN)

where is Power of Alchemy (if you don't have this, skip), similar than above, add:
Spoiler:
!isConst?(abil,PBAbilities,:SHIELDSDOWN)


I'll reference Comatose, so, those of you who don´t have it already, look higher in the thread
In PokeBattle_BattlerEffects:
Spoiler:
where is def pbCanSleep?, under Comatose, add
Spoiler:
if self.hasWorkingAbility(:SHIELDSDOWN) &&
      isConst?(self.species,PBSpecies,:MINIOR) &&  self.form==0
      @battle.pbDisplay(_INTL("{1}'s crust protects it!",pbThis)) if showMessages
      return false
    end

below, where if def pbCanSleepYawn?, under Comatose, add:
Spoiler:
return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0

below, where is def pbSleepSelf, under Comatose, add:
Spoiler:
if self.hasWorkingAbility(:SHIELDSDOWN) &&
      isConst?(self.species,PBSpecies,:MINIOR) &&  self.form==0
      @battle.pbDisplay(_INTL("{1} isn't affected!",pbThis)) if showMessages
      return false
    end

below, where is def pbCanPoison?, under Comatose, add
Spoiler:
if self.hasWorkingAbility(:SHIELDSDOWN) &&
      isConst?(self.species,PBSpecies,:MINIOR) &&  self.form==0
      @battle.pbDisplay(_INTL("{1}'s crust protects it!",pbThis)) if showMessages
      return false
    end

below, where is def pbCanPoisonSynchronize?, under Comatose, add
Spoiler:
if self.hasWorkingAbility(:SHIELDSDOWN) &&
      isConst?(self.species,PBSpecies,:MINIOR) &&  self.form==0
      @battle.pbDisplay(_INTL("{1}'s {2} prevents synchronization!",
                              pbThis,PBAbilities.getName(self.ability)))
      return false
    end

below, where is def pbCanPoisonSpikes?, under Comatose, add
Spoiler:
return false if self.hasWorkingAbility(:SHIELDSDOWN) &&
                    isConst?(self.species,PBSpecies,:MINIOR) &&
                    self.form==0

below, where is pbCanBurn?, under Comatose, add
Spoiler:
if self.hasWorkingAbility(:SHIELDSDOWN) &&
      isConst?(self.species,PBSpecies,:MINIOR) &&  self.form==0
      @battle.pbDisplay(_INTL("{1}'s crust protects it!",pbThis)) if showMessages
      return false
    end

below, where is def pbCanBurnSynchronize?, under Comatose, add
Spoiler:
if self.hasWorkingAbility(:SHIELDSDOWN) &&
      isConst?(self.species,PBSpecies,:MINIOR) &&  self.form==0
      @battle.pbDisplay(_INTL("{1}'s {2} prevents synchronization!",
                              pbThis,PBAbilities.getName(self.ability)))
      return false
    end

below, where is def pbCanParalyze?, under Comatose, add
Spoiler:
if self.hasWorkingAbility(:SHIELDSDOWN) &&
      isConst?(self.species,PBSpecies,:MINIOR) &&  self.form==0
      @battle.pbDisplay(_INTL("{1}'s crust protects it!",pbThis)) if showMessages
      return false
    end

below, where is def pbCanParalyzeSynchronize?, under Comatose, add
Spoiler:
if self.hasWorkingAbility(:SHIELDSDOWN) &&
      isConst?(self.species,PBSpecies,:MINIOR) &&  self.form==0
      @battle.pbDisplay(_INTL("{1}'s {2} prevents synchronization!",
                              pbThis,PBAbilities.getName(self.ability)))
      return false
    end

below, where is def pbCanFreeze?, under Comatose, add
Spoiler:
if self.hasWorkingAbility(:SHIELDSDOWN) &&
      isConst?(self.species,PBSpecies,:MINIOR) &&  self.form==0
      @battle.pbDisplay(_INTL("{1}'s crust protects it!",pbThis)) if showMessages
      return false
    end

In PokeBattle_MoveEffects:
Spoiler:
where is Simple Beam:
Spoiler:
if isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
       isConst?(opponent.ability,PBAbilities,:SIMPLE) ||
       isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
       isConst?(opponent.ability,PBAbilities,:TRUANT) ||
       isConst?(opponent.ability,PBAbilities,:DISGUISE) ||
       isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
       isConst?(opponent.ability,PBAbilities,:BATTLEBOND) ||
       isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
       isConst?(opponent.ability,PBAbilities,:SCHOOLING) ||
       isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end

below, where is Worry Seed, similar as above, add:
Spoiler:
isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)

below, where is Role Play (you get the point), add:
Spoiler:
isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)

below, where is Entrainment:
Spoiler:
isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)

below, where is Skill Swap (beware, there are two lines, now):
Spoiler:
isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN) ||
       isConst?(attacker.ability,PBAbilities,:SHIELDSDOWN)

below, where is Gastro acid:
Spoiler:
isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)

where is Core Enforcer (if you don't have it, skip):
Spoiler:
isConst?(opponent.ability,PBAbilities,:SHIELDSDOWN)

In PField_DayCare, where is # Inheriting form:
Spoiler:
# Inheriting form
  if isConst?(babyspecies,PBSpecies,:BURMY) ||
     isConst?(babyspecies,PBSpecies,:SHELLOS) ||
     isConst?(babyspecies,PBSpecies,:BASCULIN) ||
     isConst?(babyspecies,PBSpecies,:FLABEBE) ||
     isConst?(babyspecies,PBSpecies,:PUMPKABOO) ||
     isConst?(babyspecies,PBSpecies,:ORICORIO) ||
     isConst?(babyspecies,PBSpecies,:MINIOR)
    egg.form=mother.form
  end

In PSystem_PokemonUtilities, in def pbAddPokemon:
Spoiler:
def pbAddPokemon(pokemon,level=nil,seeform=true)
  return if !pokemon || !$Trainer 
  if pbBoxesFull?
    Kernel.pbMessage(_INTL("There's no more room for Pokémon!\1"))
    Kernel.pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!"))
    return false
  end
  if pokemon.is_a?(String) || pokemon.is_a?(Symbol)
    pokemon = getID(PBSpecies,pokemon)
  end
  if pokemon.is_a?(Integer) && level.is_a?(Integer)
    pokemon = PokeBattle_Pokemon.new(pokemon,level,$Trainer)
  end
  speciesname = PBSpecies.getName(pokemon.species)
  Kernel.pbMessage(_INTL("\\me[Pkmn get]{1} obtained {2}!\1",$Trainer.name,speciesname))
  pbNicknameAndStore(pokemon)
  if isConst?(pokemon.species,PBSpecies,:MINIOR)
    pokemon.form=1+rand(7)
    pokemon.calcStats
  end
  pbSeenForm(pokemon) if seeform
  return true
end


EDIT: FIXED PREVIOUS BUGS
Stakeout:
Spoiler:
In PBEffects, add an effect that applies to a battler:
Spoiler:
Stakeout           = 112 # Change this number with the next number after the number associated with last effect

In PokeBattle_Battler:
Spoiler:
Just above # Moxie
Spoiler:
# Stakeout
    if user.hasWorkingAbility(:STAKEOUT) && target.effects[PBEffects::Stakeout]
      PBDebug.log("[Ability triggered] #{user.pbThis}'s Stakeout worked")
      @battle.pbDisplay(_INTL("{1}'s stakeout resulted in a stronger attack!",user.pbThis))
    end

where is # Tangling Hair (if you don't ahve it, skip), make it similar to this:
Spoiler:
# Tangling Hair
      if target.hasWorkingAbility(:TANGLINGHAIR) && thismove.isContactMove? &&
         !target.damagestate.substitute && !user.hasWorkingAbility(:LONGREACH)
        if user.pbReduceStatWithCause(PBStats::SPEED,1,user,PBAbilities.getName(target.ability))
          PBDebug.log("[Ability triggered] #{target.pbThis}'s Tangling Hair was activated")
        end
      end

In PokeBattle_Move:
Spoiler:
Under Sniper:
Spoiler:
if attacker.hasWorkingAbility(:SNIPER) && opponent.damagestate.critical
      finaldamagemult=(finaldamagemult*1.5).round
    end
    if attacker.hasWorkingAbility(:STAKEOUT) && opponent.effects[PBEffects::Stakeout]
      finaldamagemult=(finaldamagemult*2.0).round
    end

below, in def pbOnDamageLost:
Spoiler:
if pbIsPhysical?(type) && !attacker.hasWorkingAbility(:LONGREACH)
      opponent.effects[PBEffects::Counter]=damage
      opponent.effects[PBEffects::CounterTarget]=attacker.index

In PokeBattle_Battle:
Spoiler:

Search '# the attack phase now ends', and add what's red:
Spoiler:
if !pbRecallAndReplace(i.index,index,newpokename)
          # If a forced switch somehow occurs here in single battles
          # the attack phase now ends
          if !@doublebattle
            @switching=false
            return
          end
        else
          switched.push(i.index)
          i.effects[PBEffects::Stakeout]=true
        end

below, where is # End of round.
Spoiler:
def pbEndOfRoundPhase
    PBDebug.log("[End of round]")
    for i in 0...4
      @battlers[i].effects[PBEffects::Electrify]=false
      @battlers[i].effects[PBEffects::Endure]=false
      @battlers[i].effects[PBEffects::FirstPledge]=0
      @battlers[i].effects[PBEffects::HyperBeam]-=1 if @battlers[i].effects[PBEffects::HyperBeam]>0
      @battlers[i].effects[PBEffects::KingsShield]=false
      @battlers[i].effects[PBEffects::LifeOrb]=false
      @battlers[i].effects[PBEffects::MoveNext]=false
      @battlers[i].effects[PBEffects::Powder]=false
      @battlers[i].effects[PBEffects::Protect]=false
      @battlers[i].effects[PBEffects::ProtectNegation]=false
      @battlers[i].effects[PBEffects::Quash]=false
      @battlers[i].effects[PBEffects::Roost]=false
      @battlers[i].effects[PBEffects::SpikyShield]=false
      @battlers[i].effects[PBEffects::Stakeout]=false
      @battlers[i].effects[PBEffects::Instruct]=false
      @battlers[i].effects[PBEffects::BanefulBunker]=false
    end



Long Reach (I suggest this one):
Spoiler:
In PokeBattle_Battler:
Spoiler:
where is def pbEffectsOnDealingDamage:
Spoiler:
def pbEffectsOnDealingDamage(move,user,target,damage)
    movetype=move.pbType(move.type,user,target)
    if damage>0 && move.isContactMove?(user)
      if !target.damagestate.substitute

below, where is # King's Shield:
Spoiler:
# 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)
        user.pbReduceStat(PBStats::ATTACK,2,nil,false)
      end
      return false
    end

below, where is # Spiky Shield
Spoiler:
# 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?(user) && !user.fainted?
        @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

where is #Baneful Bunker (if you don't have this, skip):
Spoiler:
# Baneful Bunker
    if target.effects[PBEffects::BanefulBunker] && 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 Baneful Bunker stopped the attack!")
      if thismove.isContactMove?(user) && !user.isFainted? && user.pbCanPoison?(nil,false)
        PBDebug.log("#{target.pbThis} poisoned by Baneful Bunker")
        user.pbPoison(target,_INTL("{1} was poisoned!",target.pbThis))
      end
      return false
    end

where is # Tangling Hair (if you don't have this, skip)
Spoiler:
# Tangling Hair
      if target.hasWorkingAbility(:TANGLINGHAIR) && thismove.isContactMove?(user) &&
         !target.damagestate.substitute
        if user.pbReduceStatWithCause(PBStats::SPEED,1,user,PBAbilities.getName(target.ability))
          PBDebug.log("[Ability triggered] #{target.pbThis}'s Tangling Hair was activated")
        end
      end

where is # Beak Blast (if you don't have this, skip)
Spoiler:
# Beak Blast
      if target.effects[PBEffects::BeakBlast] && thismove.isContactMove?(user) && 
         pbCanBurn?(target,false)
          @battle.pbDisplay(_INTL("{1}'s beak is scorching!",target.pbThis))
          user.pbBurn
          PBDebug.log("[Ability triggered] #{target.pbThis}'s #{PBAbilities.getName(target.ability)}")
      end

In PokeBattle_Move:
Spoiler:
where is def isContactMove?
Spoiler:
def isContactMove?(attacker=nil)
    return false if (attacker && attacker.hasWorkingAbility(:LONGREACH))
    return (@flags&0x01)!=0 # flag a: Makes contact
  end

below, in def pbCalcDamage, where is Fluffy (only for those of you that have this), make sure is something like this
Spoiler:
if opponent.hasWorkingAbility(:FLUFFY) && isContactMove?(attacker)
        finaldamagemult=(finaldamagemult*0.5).round
      elsif opponent.hasWorkingAbility(:FLUFFY) && isConst?(type,PBTypes,:FIRE)
        finaldamagemult=(finaldamagemult*2.0).round
      end



Long Reach (alternative):
Spoiler:
In PokeBattle_Battler, where is def pbEffectsOnDealingDamage:
Spoiler:
def pbEffectsOnDealingDamage(move,user,target,damage)
    movetype=move.pbType(move.type,user,target)
    if damage>0 && move.isContactMove? && !user.hasWorkingAbility(:LONGREACH)
      if !target.damagestate.substitute

below, where is # King's Shield:
Spoiler:
# 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.hasWorkingAbility(:LONGREACH)
        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? && !user.fainted? && !user.hasWorkingAbility(:LONGREACH)
        @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
    # Baneful Bunker (if you don't have this, it's fine)
    if target.effects[PBEffects::BanefulBunker] && 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 Baneful Bunker stopped the attack!")
      if thismove.isContactMove? && !user.isFainted? && user.pbCanPoison?(nil,false)
        && !user.hasWorkingAbility(:LONGREACH)
        PBDebug.log("#{target.pbThis} poisoned by Baneful Bunker")
        user.pbPoison(target,_INTL("{1} was poisoned!",target.pbThis))
      end
      return false
    end

In PokeBattle_Move, if you have Fluffy, make sure to be similar to this:
Spoiler:
if opponent.hasWorkingAbility(:FLUFFY) && !attacker.hasWorkingAbility(:LONGREACH) &&
         isContactMove?
        finaldamagemult=(finaldamagemult*0.5).round
      elsif opponent.hasWorkingAbility(:FLUFFY) && isConst?(type,PBTypes,:FIRE)
        finaldamagemult=(finaldamagemult*2.0).round
      end


other: if you have Beak Blast coded, put something like:
Spoiler:
# Beak Blast
      if target.effects[PBEffects::BeakBlast] && thismove.isContactMove? && 
        !user.hasWorkingAbility(:LONGREACH) && pbCanBurn?(target,false)


Slush Rush:
Spoiler:
In PokeBattle_Battler, in def pbSpeed:
Spoiler:
case @battle.pbWeather
    when PBWeather::RAINDANCE, PBWeather::HEAVYRAIN
      speedmult=speedmult*2 if self.hasWorkingAbility(:SWIFTSWIM)
    when PBWeather::SUNNYDAY, PBWeather::HARSHSUN
      speedmult=speedmult*2 if self.hasWorkingAbility(:CHLOROPHYLL)
    when PBWeather::SANDSTORM
      speedmult=speedmult*2 if self.hasWorkingAbility(:SANDRUSH)
    when PBWeather::HAIL
      speedmult=speedmult*2 if self.hasWorkingAbility(:SLUSHRUSH)
    end
Advertiser Content