WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 5 Hours Ago
Posted 3 Weeks Ago
1,242 posts
2.3 Years
I also have coded Ripen Ability as well
Well, share with us you want to o.o don't need to "flood" posting only it xD

Anyway,

Screen Cleaner, Mr. Rime signature ability:
In ability.txt, paste (XXX will be your last number):
XXX,SCREENCLEANER,Screen Cleaner,"When the Pokémon enters a battle, the effects of Light Screen, Reflect, and Aurora Veil are nullified for both opposing and ally Pokémon."
Now, in 'PokeBattle_Battler' script, above IMPOSTER's code, paste:
    #Screen Cleaner
    if self.hasWorkingAbility(:SCREENCLEANER) && onactive
      if self.pbOwnSide.effects[PBEffects::LightScreen]>0 || self.pbOpposingSide.effects[PBEffects::LightScreen]>0 || 
      self.pbOwnSide.effects[PBEffects::Reflect]> 0 || self.pbOpposingSide.effects[PBEffects::Reflect]>0 ||
      self.pbOwnSide.effects[PBEffects::AuroraVeil]>0 || self.pbOpposingSide.effects[PBEffects::AuroraVeil]>0
        if self.pbOwnSide.effects[PBEffects::LightScreen]>0; self.pbOwnSide.effects[PBEffects::LightScreen]=0
          @battle.pbDisplay(_INTL("Your team's Light Screen wore off!"))
        end
        if self.pbOpposingSide.effects[PBEffects::LightScreen]>0; self.pbOpposingSide.effects[PBEffects::LightScreen]=0
          @battle.pbDisplay(_INTL("The opposing team's Light Screen wore off!"))
        end
        if self.pbOwnSide.effects[PBEffects::Reflect]>0; self.pbOwnSide.effects[PBEffects::Reflect]=0
          @battle.pbDisplay(_INTL("Your team's Reflect wore off!"))
        end
        if self.pbOpposingSide.effects[PBEffects::Reflect]>0; self.pbOpposingSide.effects[PBEffects::Reflect]=0
          @battle.pbDisplay(_INTL("The opposing team's Reflect wore off!"))
        end
        if self.pbOwnSide.effects[PBEffects::AuroraVeil]>0; self.pbOwnSide.effects[PBEffects::AuroraVeil]=0 
          @battle.pbDisplay(_INTL("Your team's Aurora Veil wore off!"))
        end
        if self.pbOpposingSide.effects[PBEffects::AuroraVeil]>0; self.pbOpposingSide.effects[PBEffects::AuroraVeil]=0
          @battle.pbDisplay(_INTL("The opposing team's Aurora Veil wore off!"))
        end
      end
    end
    # Imposter
    if self.hasWorkingAbility(:IMPOSTER) && [email protected][PBEffects::Transform] && onactive
P.S: If you know how to simplify, please share with us; We don't know the official phrases. I copied from Psychic Fangs.

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 5 Hours Ago
Posted 3 Weeks Ago
1,242 posts
2.3 Years
Hunger Switch, Morpeko's signature ability
In ability.txt, paste (XXX will be your last number):
XXX,HUNGERSWITCH,Hunger Switch,"The Pokémon changes its form, alternating between its Full Belly Mode and Hangry Mode after the end of each turn."
Now, in 'PokeBattle_Battle' script, below SLOWSTART's code (when 'i.turncount==6'), paste:
    # Slow Start's end message
    if i.hasWorkingAbility(:SLOWSTART) && i.turncount==6
      pbDisplay(_INTL("{1} finally got its act together!",i.pbThis))
    end
    for i in priority
      next if i.fainted?
      # Hunger Switch
      if i.hasWorkingAbility(:HUNGERSWITCH) && isConst?(i.species,PBSpecies,:MORPEKO)
        i.form=(i.form==0) ? 1 : 0
        i.pbUpdate(true)
        scene.pbChangePokemon(i,i.pokemon)
        @battle.pbDisplay(_INTL("{1} transformed!",i.pbThis))
        PBDebug.log("[Form changed] #{i.pbThis} changed to form #{i.form}")
      end
    end
    # Form checks
    for i in 0...4
      next if @battlers[i].fainted?
      @battlers[i].pbCheckForm
    end

HM100

HM100 the Techno

Male
Seen 22 Hours Ago
Posted September 21st, 2020
116 posts
4 Years

Screen Cleaner Ability (Alt version)


Spoiler:

    # Screen Cleaner
    if self.hasWorkingAbility(:SCREENCLEANER)
      PBDebug.log("[Ability triggered] #{pbThis}'s Screen Cleaner")
      pbOwnSide.effects[PBEffects::Reflect]     = 0
      pbOwnSide.effects[PBEffects::LightScreen] = 0
      pbOwnSide.effects[PBEffects::AuroraVeil]  = 0 # changed
      pbOpposingSide.effects[PBEffects::Reflect]     = 0
      pbOpposingSide.effects[PBEffects::LightScreen] = 0
      pbOpposingSide.effects[PBEffects::AuroraVeil]  = 0 # changed
      @battle.pbDisplay(_INTL("{1} has {2}!",pbThis,PBAbilities.getName(self.ability)))
      @battle.pbDisplay(_INTL("The effects of protective barriers disappeared."))
    end

Put this before Trace ability code
ΚΟΡΑ ΚΟΡΕ RPG MAKER XP
http://el.poke-kore.wikia.com/wiki/Qora#Λήψη - Download
http://el.poke-kore.wikia.com/wiki/Qora or just read the greek documentation (Note: May require google translator to read this in English)

My favorite Pokémon from the official games are Alcremie and Keklneon.

My favorite own self made Pokémon are Wikimedia and Frikipaideia

HM100

HM100 the Techno

Male
Seen 22 Hours Ago
Posted September 21st, 2020
116 posts
4 Years

Dauntless Shield (Alt version)


    # Dauntless Shield
    if self.hasWorkingAbility(:DAUNTLESSSHIELD) && onactive
      if pbIncreaseStatWithCause(PBStats::DEFENSE,1,self,PBAbilities.getName(ability))
        PBDebug.log("[Ability triggered] #{pbThis}'s Dauntless Shield")
      end
    end
Put this after download code. My version of Dauntless Shield (To be used on Kore) will increase the user's defense by 1 stage when it enters battle.
ΚΟΡΑ ΚΟΡΕ RPG MAKER XP
http://el.poke-kore.wikia.com/wiki/Qora#Λήψη - Download
http://el.poke-kore.wikia.com/wiki/Qora or just read the greek documentation (Note: May require google translator to read this in English)

My favorite Pokémon from the official games are Alcremie and Keklneon.

My favorite own self made Pokémon are Wikimedia and Frikipaideia

HM100

HM100 the Techno

Male
Seen 22 Hours Ago
Posted September 21st, 2020
116 posts
4 Years

Ripen Ability


Replace (or adapt) the defs pbConfusionBerry, pbStatIncreasingBerry and pbActivateBerryEffect with the following codes
Spoiler:

  def pbConfusionBerry(flavor,message1,message2)
    if hasWorkingAbility(:RIPEN)
      amt=self.pbRecoverHP((self.totalhp/4).floor,true)
    else
      amt=self.pbRecoverHP((self.totalhp/8).floor,true)
    end
    if amt>0
      @battle.pbDisplay(message1)
      if (self.nature%5)==flavor && (self.nature/5).floor!=(self.nature%5)
        @battle.pbDisplay(message2)
        pbConfuseSelf
      end
      return true
    end
    return false
  end

  def pbStatIncreasingBerry(stat,berryname)
    if hasWorkingAbility(:RIPEN)
      return pbIncreaseStatWithCause(stat,2,self,berryname)
    else
      return pbIncreaseStatWithCause(stat,1,self,berryname)
    end
  end
Spoiler:

  def pbActivateBerryEffect(berry=0,consume=true)
    berry=self.item if berry==0
    berryname=(berry==0) ? "" : PBItems.getName(berry)
    PBDebug.log("[Item triggered] #{pbThis}'s #{berryname}")
    consumed=false
    if isConst?(berry,PBItems,:ORANBERRY)
      if hasWorkingAbility(:RIPEN)
        amt=self.pbRecoverHP(20,true)
      else
        amt=self.pbRecoverHP(10,true)
      end
      if amt>0
        @battle.pbDisplay(_INTL("{1} restored its health using its {2}!",pbThis,berryname))
        consumed=true
      end
    elsif isConst?(berry,PBItems,:SITRUSBERRY) ||
          isConst?(berry,PBItems,:ENIGMABERRY)
      if hasWorkingAbility(:RIPEN)
        amt=self.pbRecoverHP((self.totalhp/2).floor,true)
      else
        amt=self.pbRecoverHP((self.totalhp/4).floor,true)
      end
      if amt>0
        @battle.pbDisplay(_INTL("{1} restored its health using its {2}!",pbThis,berryname))
        consumed=true
      end
    elsif isConst?(berry,PBItems,:CHESTOBERRY)
      if self.status==PBStatuses::SLEEP
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1}'s {2} cured its sleep problem.",pbThis,berryname))
        consumed=true
      end
    elsif isConst?(berry,PBItems,:PECHABERRY)
      if self.status==PBStatuses::POISON
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1}'s {2} cured its poisoning.",pbThis,berryname))
        consumed=true
      end
    elsif isConst?(berry,PBItems,:RAWSTBERRY)
      if self.status==PBStatuses::BURN
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1}'s {2} healed its burn.",pbThis,berryname))
        consumed=true
      end
    elsif isConst?(berry,PBItems,:CHERIBERRY)
      if self.status==PBStatuses::PARALYSIS
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1}'s {2} cured its paralysis.",pbThis,berryname))
        consumed=true
      end
    elsif isConst?(berry,PBItems,:ASPEARBERRY)
      if self.status==PBStatuses::FROZEN
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1}'s {2} thawed it out.",pbThis,berryname))
        consumed=true
      end
    elsif isConst?(berry,PBItems,:LEPPABERRY)
      found=[]
      for i in [email protected]
        if @pokemon.moves[i].id!=0
          if (consume && @pokemon.moves[i].pp==0) ||
             (!consume && @pokemon.moves[i].pp<@pokemon.moves[i].totalpp)
            found.push(i)
          end
        end
      end
      if found.length>0
        choice=(consume) ? found[0] : found[@battle.pbRandom(found.length)]
        pokemo[email protected][choice]
        if hasWorkingAbility(:RIPEN)
          pokemove.pp+=20
        else
          pokemove.pp+=10
        end
        pokemove.pp=pokemove.totalpp if pokemove.pp>pokemove.totalpp 
        self.moves[choice].pp=pokemove.pp
        movename=PBMoves.getName(pokemove.id)
        @battle.pbDisplay(_INTL("{1}'s {2} restored {3}'s PP!",pbThis,berryname,movename)) 
        consumed=true
      end
    elsif isConst?(berry,PBItems,:PERSIMBERRY)
      if @effects[PBEffects::Confusion]>0
        pbCureConfusion(false)
        @battle.pbDisplay(_INTL("{1}'s {2} snapped it out of its confusion!",pbThis,berryname))
        consumed=true
      end
    elsif isConst?(berry,PBItems,:LUMBERRY)
      if self.status>0 || @effects[PBEffects::Confusion]>0
        st=self.status; conf=(@effects[PBEffects::Confusion]>0)
        pbCureStatus(false)
        pbCureConfusion(false)
        case st
        when PBStatuses::SLEEP
          @battle.pbDisplay(_INTL("{1}'s {2} woke it up!",pbThis,berryname))
        when PBStatuses::POISON
          @battle.pbDisplay(_INTL("{1}'s {2} cured its poisoning!",pbThis,berryname))
        when PBStatuses::BURN
          @battle.pbDisplay(_INTL("{1}'s {2} healed its burn!",pbThis,berryname))
        when PBStatuses::PARALYSIS
          @battle.pbDisplay(_INTL("{1}'s {2} cured its paralysis!",pbThis,berryname))
        when PBStatuses::FROZEN
          @battle.pbDisplay(_INTL("{1}'s {2} defrosted it!",pbThis,berryname))
        end
        if conf
          @battle.pbDisplay(_INTL("{1}'s {2} snapped it out of its confusion!",pbThis,berryname))
        end
        consumed=true
      end
    elsif isConst?(berry,PBItems,:FIGYBERRY)
      consumed=pbConfusionBerry(0,
         _INTL("{1}'s {2} restored health!",pbThis,berryname),
         _INTL("For {1}, the {2} was too spicy!",pbThis(true),berryname))
    elsif isConst?(berry,PBItems,:WIKIBERRY)
      consumed=pbConfusionBerry(3,
         _INTL("{1}'s {2} restored health!",pbThis,berryname),
         _INTL("For {1}, the {2} was too dry!",pbThis(true),berryname))
    elsif isConst?(berry,PBItems,:MAGOBERRY)
      consumed=pbConfusionBerry(2,
         _INTL("{1}'s {2} restored health!",pbThis,berryname),
         _INTL("For {1}, the {2} was too sweet!",pbThis(true),berryname))
    elsif isConst?(berry,PBItems,:AGUAVBERRY)
      consumed=pbConfusionBerry(4,
         _INTL("{1}'s {2} restored health!",pbThis,berryname),
         _INTL("For {1}, the {2} was too bitter!",pbThis(true),berryname))
    elsif isConst?(berry,PBItems,:IAPAPABERRY)
      consumed=pbConfusionBerry(1,
         _INTL("{1}'s {2} restored health!",pbThis,berryname),
         _INTL("For {1}, the {2} was too sour!",pbThis(true),berryname))
    elsif isConst?(berry,PBItems,:LIECHIBERRY)
      consumed=pbStatIncreasingBerry(PBStats::ATTACK,berryname)
    elsif isConst?(berry,PBItems,:GANLONBERRY) ||
          isConst?(berry,PBItems,:KEEBERRY)
      consumed=pbStatIncreasingBerry(PBStats::DEFENSE,berryname)
    elsif isConst?(berry,PBItems,:SALACBERRY)
      consumed=pbStatIncreasingBerry(PBStats::SPEED,berryname)
    elsif isConst?(berry,PBItems,:PETAYABERRY)
      consumed=pbStatIncreasingBerry(PBStats::SPATK,berryname)
    elsif isConst?(berry,PBItems,:APICOTBERRY) ||
          isConst?(berry,PBItems,:MARANGABERRY)
      consumed=pbStatIncreasingBerry(PBStats::SPDEF,berryname)
    elsif isConst?(berry,PBItems,:LANSATBERRY)
      if @effects[PBEffects::FocusEnergy]<2
        @effects[PBEffects::FocusEnergy]=2
        @battle.pbDisplay(_INTL("{1} used its {2} to get pumped!",pbThis,berryname))
        consumed=true
      end
    elsif isConst?(berry,PBItems,:MICLEBERRY)
      if [email protected][PBEffects::MicleBerry]
        @effects[PBEffects::MicleBerry]=true
        @battle.pbDisplay(_INTL("{1} boosted the accuracy of its next move using its {2}!",
           pbThis,berryname))
        consumed=true
      end
    elsif isConst?(berry,PBItems,:STARFBERRY)
      stats=[]
      for i in [PBStats::ATTACK,PBStats::DEFENSE,PBStats::SPATK,PBStats::SPDEF,PBStats::SPEED]
        stats.push(i) if pbCanIncreaseStatStage?(i,self)
      end
      if stats.length>0
        stat=stats[@battle.pbRandom(stats.length)]
        if hasWorkingAbility(:RIPEN)
          consumed=pbIncreaseStatWithCause(stat,4,self,berryname)
        else
          consumed=pbIncreaseStatWithCause(stat,2,self,berryname)
        end
      end
    end
#      
    if consumed
      # Cheek Pouch
      if hasWorkingAbility(:CHEEKPOUCH)
        amt=self.pbRecoverHP((@totalhp/3).floor,true)
        if amt>0
          @battle.pbDisplay(_INTL("{1}'s {2} restored its health!",
             pbThis,PBAbilities.getName(ability)))
        end
      end
      pbConsumeItem if consume
      self.pokemon.belch=true if self.pokemon
    end
  end


You have successfully implemented the ability!!!!
ΚΟΡΑ ΚΟΡΕ RPG MAKER XP
http://el.poke-kore.wikia.com/wiki/Qora#Λήψη - Download
http://el.poke-kore.wikia.com/wiki/Qora or just read the greek documentation (Note: May require google translator to read this in English)

My favorite Pokémon from the official games are Alcremie and Keklneon.

My favorite own self made Pokémon are Wikimedia and Frikipaideia

prankster

Male
Seen July 23rd, 2020
Posted November 25th, 2019
15 posts
5 Years
alright now that the datamines have dropped... anybody wants to claim a specific mechanic that they would like to implement?
I would suggest making a complete v17.2 Essentials with all mechanics upto Gen7 first and then adding changes onto that
maybe even making a GitHub of a single Essentials on which we'll add all the Gen8 stuff...

anyway, on the topic at hand, I'd like to claim all the Redirection-related stuffs... so basically Snipe Shot and Stalwart/PropellerTail
mostly because Maruno just recently discovered that RagePowder isn't exactly the same as FollowMe because Grass-types are immune to RagePowder because Powder-moves
so I plan to also add that change in it once I'm done

HM100

HM100 the Techno

Male
Seen 22 Hours Ago
Posted September 21st, 2020
116 posts
4 Years
alright now that the datamines have dropped... anybody wants to claim a specific mechanic that they would like to implement?
I would suggest making a complete v17.2 Essentials with all mechanics upto Gen7 first and then adding changes onto that
maybe even making a GitHub of a single Essentials on which we'll add all the Gen8 stuff...

anyway, on the topic at hand, I'd like to claim all the Redirection-related stuffs... so basically Snipe Shot and Stalwart/PropellerTail
mostly because Maruno just recently discovered that RagePowder isn't exactly the same as FollowMe because Grass-types are immune to RagePowder because Powder-moves
so I plan to also add that change in it once I'm done
I have coded these abilities as well. Only four Gen8 abilities are uncoded in my game.
ΚΟΡΑ ΚΟΡΕ RPG MAKER XP
http://el.poke-kore.wikia.com/wiki/Qora#Λήψη - Download
http://el.poke-kore.wikia.com/wiki/Qora or just read the greek documentation (Note: May require google translator to read this in English)

My favorite Pokémon from the official games are Alcremie and Keklneon.

My favorite own self made Pokémon are Wikimedia and Frikipaideia

prankster

Male
Seen July 23rd, 2020
Posted November 25th, 2019
15 posts
5 Years
so I started off with a few moves based on whatever info we have at the moment... I'll update this post if we find out more about these moves later on

Magic Powder (takes up a modified version of Soak's function code)

PBS Entry (it appears to be an exact copy of Soak anyway):
Spoiler:
XXX,MAGICPOWDER,Magic Powder,061,0,PSYCHIC,Status,100,20,0,00,0,bcel,"The user scatters a cloud of magic powder that changes the target to Psychic type."


Code:
Spoiler:
Replace Soak's function code with this one: (tested and works)
################################################################################
# 061 - Soak, Magic Powder
# Target becomes the type of this move.
################################################################################
class PokeBattle_Move_061 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if opponent.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(attacker)
      @battle.pbDisplay(_INTL("But it failed!"))  
      return -1
    end
    return -1 if pbTypeImmunityByAbility(pbType(@type,attacker,opponent),attacker,opponent)
    if isConst?(opponent.ability,PBAbilities,:MULTITYPE)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
    if opponent.type1==self.type && opponent.type2==self.type &&
       (opponent.effects[PBEffects::Type3]<0 ||
       opponent.effects[PBEffects::Type3]==self.type)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    opponent.type1=self.type; opponent.type2=self.type
    opponent.effects[PBEffects::Type3]=-1
    typename=PBTypes.getName(self.type)
    @battle.pbDisplay(_INTL("{1} transformed into the {2} type!",opponent.pbThis,typename))
    return 0
  end
end


and here's Bolt Beak / Fishous Rend (this one I have based off of Payback's code)

PBS entry:
Spoiler:
XX1,BOLTBEAK,Bolt Beak,17E,85,ELECTRIC,Physical,100,10,0,00,0,abef,"The user stabs the target with its electrified beak. If the user attacks before the target, the power of this move is doubled."
XX2,FISHIOUSREND,Fishious Rend,17E,85,WATER,Physical,100,10,0,00,0,abefi,"The user rends the target with its hard gills. If the user attacks before the target, the power of this move is doubled."


Code:
Spoiler:
of course, feel free to change up 17E to whatever is a suitable function code in your game
now I haven't tested this one just yet so... you've been warned
################################################################################
# 17E - Bolt Beak, Fishious Rend
# Power is doubled if the target has NOT already moved this round.
################################################################################
class PokeBattle_Move_17E < PokeBattle_Move
  def pbBaseDamage(basedmg,attacker,opponent)
    if @battle.choices[opponent.index][0]==1 && # Chose a move
       !opponent.hasMovedThisRound? # Not used its move yet
      return basedmg*2
    end
    return basedmg
  end
end


EDITS: Magic Powder is a powder-based move so I have edited the PBS Entry to reflect that. Same for Fishious Rend being a Biting-move. Bolt Beak & Fishious Rend also work for switch-ins, which is yet to be accounted for.

HM100

HM100 the Techno

Male
Seen 22 Hours Ago
Posted September 21st, 2020
116 posts
4 Years

Ice Scales ability (Find Fur Coat's code and paste this)


      if opponent.hasWorkingAbility(:ICESCALES) && pbIsSpecial?(type)
        damagemult=(damagemult*0.5).round
      end

Magic Powder Function (Alt code)


Spoiler:

################################################################################
# Target becomes Psychic type. (Magic Powder)
################################################################################
class PokeBattle_Move_δδδ < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if opponent.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(attacker)
      @battle.pbDisplay(_INTL("But it failed!"))  
      return -1
    end
    return -1 if pbTypeImmunityByAbility(pbType(@type,attacker,opponent),attacker,opponent)
    if isConst?(opponent.ability,PBAbilities,:MULTITYPE)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    if opponent.type1==getConst(PBTypes,:PSYCHIC) &&
       opponent.type2==getConst(PBTypes,:PSYCHIC) &&
       (opponent.effects[PBEffects::Type3]<0 ||
       opponent.effects[PBEffects::Type3]==getConst(PBTypes,:PSYCHIC))
       @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
    opponent.type1=getConst(PBTypes,:PSYCHIC)
    opponent.type2=getConst(PBTypes,:PSYCHIC)
    opponent.effects[PBEffects::Type3]=-1
    typename=PBTypes.getName(getConst(PBTypes,:PSYCHIC))
    @battle.pbDisplay(_INTL("{1} transformed into the {2} type!",opponent.pbThis,typename))
    return 0
  end
end
Replace δδδ with your desired thing such as 20A. Kore uses 265 as function code
ΚΟΡΑ ΚΟΡΕ RPG MAKER XP
http://el.poke-kore.wikia.com/wiki/Qora#Λήψη - Download
http://el.poke-kore.wikia.com/wiki/Qora or just read the greek documentation (Note: May require google translator to read this in English)

My favorite Pokémon from the official games are Alcremie and Keklneon.

My favorite own self made Pokémon are Wikimedia and Frikipaideia

HM100

HM100 the Techno

Male
Seen 22 Hours Ago
Posted September 21st, 2020
116 posts
4 Years

Teatime Code (It is the signature move of Polteageist)


Spoiler:

################################################################################
# Causes all other users to consume their held berries (Teatime)
################################################################################
class PokeBattle_Move_δδδ < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    didsomething=false
    for i in [attacker,attacker.pbPartner,attacker.pbOpposing1,attacker.pbOpposing2]
      next if !i || i.isFainted?
      next if !i.hasWorkingBerry
      pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation) if !didsomething
      didsomething=true
      i.pbActivateBerryEffect(i.item,false)
    end
    if !didsomething
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    else
      @battle.pbDisplay(_INTL("The battle is having a teatime"))
      return 0
    end
  end
end
Replace δδδ with your code such as 20A. Kore uses 264. Battle text display is fan made
ΚΟΡΑ ΚΟΡΕ RPG MAKER XP
http://el.poke-kore.wikia.com/wiki/Qora#Λήψη - Download
http://el.poke-kore.wikia.com/wiki/Qora or just read the greek documentation (Note: May require google translator to read this in English)

My favorite Pokémon from the official games are Alcremie and Keklneon.

My favorite own self made Pokémon are Wikimedia and Frikipaideia
Male
Seen 1 Hour Ago
Posted November 16th, 2019
8 posts
7.8 Years
I've managed to create EXP candies.

In PItem_ItemEffects underneath this:
Spoiler:
ItemHandlers::UseOnPokemon.add(:RARECANDY,proc{|item,pokemon,scene|
if pokemon.level>=PBExperience::MAXLEVEL || (pokemon.isShadow? rescue false)
scene.pbDisplay(_INTL("It won't have any effect."))
next false
else
pbChangeLevel(pokemon,pokemon.level+1,scene)
scene.pbHardRefresh
next true
end
})

Add these puppies:
Spoiler:
ItemHandlers::UseOnPokemon.add(:EXPCANDYXS,proc{|item,pokemon,scene|
if pokemon.level>=PBExperience::MAXLEVEL || (pokemon.isShadow? rescue false)
scene.pbDisplay(_INTL("It won't have any effect."))
next false
else
pokemon.changeExp("extrasmall")
scene.pbDisplay(_INTL("{1} gained a very small amount of Exp. Points.",pokemon.name))
pbChangeLevel(pokemon,pokemon.level+1,scene)
scene.pbHardRefresh
next true
end
})

ItemHandlers::UseOnPokemon.add(:EXPCANDYS,proc{|item,pokemon,scene|
if pokemon.level>=PBExperience::MAXLEVEL || (pokemon.isShadow? rescue false)
scene.pbDisplay(_INTL("It won't have any effect."))
next false
else
pokemon.changeExp("small")
scene.pbDisplay(_INTL("{1} gained a small amount of Exp. Points.",pokemon.name))
pbChangeLevel(pokemon,pokemon.level+1,scene)
scene.pbHardRefresh
next true
end
})

ItemHandlers::UseOnPokemon.add(:EXPCANDYM,proc{|item,pokemon,scene|
if pokemon.level>=PBExperience::MAXLEVEL || (pokemon.isShadow? rescue false)
scene.pbDisplay(_INTL("It won't have any effect."))
next false
else
pokemon.changeExp("medium")
scene.pbDisplay(_INTL("{1} gained a moderate amount of Exp. Points.",pokemon.name))
pbChangeLevel(pokemon,pokemon.level+1,scene)
scene.pbHardRefresh
next true
end
})

ItemHandlers::UseOnPokemon.add(:EXPCANDYL,proc{|item,pokemon,scene|
if pokemon.level>=PBExperience::MAXLEVEL || (pokemon.isShadow? rescue false)
scene.pbDisplay(_INTL("It won't have any effect."))
next false
else
pokemon.changeExp("large")
scene.pbDisplay(_INTL("{1} gained a large amount of Exp. Points.",pokemon.name))
pbChangeLevel(pokemon,pokemon.level+1,scene)
scene.pbHardRefresh
next true
end
})

ItemHandlers::UseOnPokemon.add(:EXPCANDYXL,proc{|item,pokemon,scene|
if pokemon.level>=PBExperience::MAXLEVEL || (pokemon.isShadow? rescue false)
scene.pbDisplay(_INTL("It won't have any effect."))
next false
else
pokemon.changeExp("extralarge")
scene.pbDisplay(_INTL("{1} gained a very large amount of Exp. Points.",pokemon.name))
pbChangeLevel(pokemon,pokemon.level+1,scene)
scene.pbHardRefresh
next true
end
})


Then hop down to PokeBattle_Pokemon and find and add whats in red:
Spoiler:
################################################################################
# Level
################################################################################
# Returns this Pokémon's level.
def level
return PBExperience.pbGetLevelFromExperience(@exp,self.growthrate)
end

# Sets this Pokémon's level by changing its Exp. Points.
def level=(value)
if value<1 || value>PBExperience::MAXLEVEL
raise ArgumentError.new(_INTL("The level number ({1}) is invalid.",value))
end
self.exp=PBExperience.pbGetStartExperience(value,self.growthrate)
end

# Changes the experience of this Pokémon depending on what happened to change it.
def changeExp(method)
gain=0; luxury=false
case method
when "extrasmall"
gain=100
when "small"
gain=800
when "medium"
gain=3000
when "large"
gain=10000
when "extralarge"
gain=30000
else
Kernel.pbMessage(_INTL("Unknown EXP-changing method."))
end
@exp+=gain
@exp=[[10000000,@exp].min,0].max
end


# Returns whether this Pokémon is an egg.
def egg?
return @eggsteps>0
end

alias isEgg? egg?

# Returns this Pokémon's growth rate.
def growthrate
dexdata=pbOpenDexData
pbDexDataOffset(dexdata,@species,20)
ret=dexdata.fgetb
dexdata.close
return ret
end

# Returns this Pokémon's base Experience value.
def baseExp
dexdata=pbOpenDexData
pbDexDataOffset(dexdata,self.fSpecies,38)
ret=dexdata.fgetw
dexdata.close
return ret
end


And add these to your Items PBS(Don't forget to change XXX to something that'll work for you):
Spoiler:
XXX,EXPCANDYXS,Exp. Candy XS,Exp. Candies XS,2,500,"A candy that is packed with energy. When consumed, it will grant a single Pokémon a very small amount of Exp. Points.",1,0,0,
XXX,EXPCANDYS,Exp. Candy S,Exp. Candies S,2,2500,"A candy that is packed with energy. When consumed, it will grant a single Pokémon a small amount of Exp. Points.",1,0,0,
XXX,EXPCANDYM,Exp. Candy M,Exp. Candies M,2,9000,"A candy that is packed with energy. When consumed, it will grant a single Pokémon a moderate amount of Exp. Points.",1,0,0,
XXX,EXPCANDYL,Exp. Candy L,Exp. Candies L,2,25000,"A candy that is packed with energy. When consumed, it will grant a single Pokémon a large amount of Exp. Points.",1,0,0,
XXX,EXPCANDYXL,Exp. Candy XL,Exp. Candies XL,2,70000,"A candy that is packed with energy. When consumed, it will grant a single Pokémon a very large amount of Exp. Points.",1,0,0,


And that's it. Surprisingly straight forward. A thing to note: any levels that you pass won't won't trigger any moves you'd learn on them. For example if you use an XL Candy at level five you'll fly up to level 32 but won't learn any moves that say were at levels 12, 17, 22, and 27. Do not pass go do not collect 200 dollars :( ,however, you will learn whatever is at 32, and evolve if you've met the criteria. Let me know if you get any errors and I'll see what I can do to help.
(Images are from https://www.serebii.net/swordshield/newitems.shtml resized and transparent for your pleasure :)

Diegou18

Forever Chandelure lover.

Age 21
Male
Seen 1 Day Ago
Posted September 2nd, 2020
75 posts
2.7 Years
Next, find where Delta Stream ability code exists. Now we add this after the strong winds weather initialization with DeltaStream:
      # Neutralizing Gas
      if self.hasWorkingAbility(:NEUTRALIZINGGAS) && [email protected][PBEffects::NeutralizingGas]  # Not hasWorkingAbility (We need to be workable even if other abilities supressed)
        @battle.field.effects[PBEffects::NeutralizingGas]=true
        PBDebug.log("[Ability triggered] #{pbThis}'s Neutralizing Gas started")
      end
Could you (or anyone else) post where you put it? I mean, the texts that there're before and after the code of the ability, please.
Thanks.

EDIT: Oh, and I've tested the script, it works good when it supresses abilities (by the way, it doesn't show the message of the ability when it's triggered or when you switch the Pokémon and the ability stops working, that's why I was asking the place where you put it before), but when you switch the Pokémon with Neutralizing Gas, the abilities don't activate again. I used a Gyarados and a Tapu Koko. Intimidation and Electric Surge don't activate, but when I switch my Weezing, those abilities don't activate again like it should happens.

HM100

HM100 the Techno

Male
Seen 22 Hours Ago
Posted September 21st, 2020
116 posts
4 Years
Could you (or anyone else) post where you put it? I mean, the texts that there're before and after the code of the ability, please.
Thanks.

EDIT: Oh, and I've tested the script, it works good when it supresses abilities (by the way, it doesn't show the message of the ability when it's triggered or when you switch the Pokémon and the ability stops working, that's why I was asking the place where you put it before), but when you switch the Pokémon with Neutralizing Gas, the abilities don't activate again. I used a Gyarados and a Tapu Koko. Intimidation and Electric Surge don't activate, but when I switch my Weezing, those abilities don't activate again like it should happens.
Unfortunately, this will be hard because we won't know if the abilities were before activated while no Pokémon with Neutralizing Gas existed in the battle. I tried to do that but it gave errors and that require heavy edition to make that working
ΚΟΡΑ ΚΟΡΕ RPG MAKER XP
http://el.poke-kore.wikia.com/wiki/Qora#Λήψη - Download
http://el.poke-kore.wikia.com/wiki/Qora or just read the greek documentation (Note: May require google translator to read this in English)

My favorite Pokémon from the official games are Alcremie and Keklneon.

My favorite own self made Pokémon are Wikimedia and Frikipaideia

prankster

Male
Seen July 23rd, 2020
Posted November 25th, 2019
15 posts
5 Years
Here's a better and simpler implementation of the EXP Candies...
A thing to note: any levels that you pass won't won't trigger any moves you'd learn on them. For example if you use an XL Candy at level five you'll fly up to level 32 but won't learn any moves that say were at levels 12, 17, 22, and 27.
Yes, this one does take into account the moves that you would learn if you just magically went from level x to level y.

PBS Entries (text cut down to fit the vanilla Essentials' Bag UI):
Spoiler:
XX1,EXPCANDYXS,Exp. Candy XS,Exp. Candies XS,2,0,"A candy packed with energy. When consumed, it grants a Pokémon a very small amount of Exp. Points.",1,0,0
XX2,EXPCANDYS,Exp. Candy S,Exp. Candies S,2,0,"A candy packed with energy. When consumed, it grants a Pokémon a small amount of Exp. Points.",1,0,0
XX3,EXPCANDYM,Exp. Candy M,Exp. Candies M,2,0,"A candy packed with energy. When consumed, it grants a Pokémon a moderate amount of Exp. Points.",1,0,0
XX4,EXPCANDYL,Exp. Candy L,Exp. Candies L,2,0,"A candy packed with energy. When consumed, it grants a Pokémon a large amount of Exp. Points.",1,0,0
XX5,EXPCANDYXL,Exp. Candy XL,Exp. Candies XL,2,0,"A candy packed with energy. When consumed, it grants a Pokémon a very large amount of Exp. Points.",1,0,0


and here's the implementation:
Spoiler:
In the scripts, find Rare Candy's block in PItem_ItemEffects (you can Ctrl+Shift+F for RARECANDY)
and add these below it
ItemHandlers::UseOnPokemon.add(:EXPCANDYXS,proc{|item,pokemon,scene|
   if pokemon.level>=PBExperience::MAXLEVEL || (pokemon.isShadow? rescue false)
     scene.pbDisplay(_INTL("It won't have any effect."))
     next false
   else
     oldLvl=pokemon.level
     newExp=PBExperience.pbAddExperience(pokemon.exp,getCandyExp(item),pokemon.growthrate)
     newLvl=PBExperience.pbGetLevelFromExperience(newExp,pokemon.growthrate)
     scene.pbDisplay(_INTL("{1} gained {2} Exp. Points!",pokemon.name,getCandyExp(item)))
     for i in 0...newLvl-oldLvl
       pbChangeLevel(pokemon,pokemon.level+1,scene)
       scene.pbHardRefresh
     end
     pbWait(20)
     next true
   end
})

ItemHandlers::UseOnPokemon.copy(:EXPCANDYXS,:EXPCANDYS,:EXPCANDYM,:EXPCANDYL,:EXPCANDYXL)

def getCandyExp(item)
  return 100 if item==getID(PBItems,:EXPCANDYXS)
  return 800 if item==getID(PBItems,:EXPCANDYS)
  return 3000 if item==getID(PBItems,:EXPCANDYM)
  return 10000 if item==getID(PBItems,:EXPCANDYL)
  return 30000 if item==getID(PBItems,:EXPCANDYXL)
  return 0
end

prankster

Male
Seen July 23rd, 2020
Posted November 25th, 2019
15 posts
5 Years
If you are like me and don't want to have 25 separate Nature Mints in your PBS, then you might like this: A single Nature Mint that freely allows 1 Nature change of the player's choice. (Not gonna lie, I directly copied the snippet from Debug_Pokemon but eh, whatever)

PBS Entry:
Spoiler:
XXX,NATUREMINT,Nature Mint,Nature Mints,2,0,"When a Pokémon smells this mint, its stats will grow more easily or slowly as desired.",1,0,0


Implementation:
Spoiler:
In the scripts, find Rare Candy's block in PItem_ItemEffects (you can Ctrl+Shift+F for RARECANDY)
and add these below it (or just absolutely anywhere, not that it matters tbh)
ItemHandlers::UseOnPokemon.add(:NATUREMINT,proc{|item,pokemon,scene|
  commands = []
  (PBNatures.getCount).times do |i|
    nd5=(i/5).floor
    nm5=(i%5).floor
    if nd5!=nm5
      text = _INTL("{1} (+{2}, -{3})",PBNatures.getName(i),
          PBStats.getNameBrief(nd5+1),PBStats.getNameBrief(nm5+1))
    else
      text = _INTL("{1} (---)",PBNatures.getName(i))
    end
    commands.push(text)
  end
  cmd = pokemon.nature
  oldnature = pokemon.nature
  msg = _INTL("Set which Nature?")
  cmd = scene.pbShowCommands(msg,commands,cmd)
  if cmd>=0 && cmd<PBNatures.getCount
    pokemon.setNature(cmd); pokemon.calcStats
  end
  scene.pbRefreshSingle(pokemon.id)
  next false if pokemon.natureflag==oldnature
  next true
})


and I have attached a custom made Nature Mint icon which is just a haphazard mesh of all the mints but it works I guess. Enjoy.

In case you wanted to know how any of the actual 25 mints would look like, here's an example that you can copy-paste for all 25 of them
Spoiler:
ItemHandlers::UseOnPokemon.add(:ADAMANTMINT,proc{|item,pokemon,scene|
  if pokemon.nature==getID(PBNatures,:ADAMANT)
    scene.pbDisplay(_INTL("It won't have any effect."))
    next false
  else
    pokemon.setNature(:ADAMANT); pokemon.calcStats
    scene.pbRefreshSingle(pokemon.id)
    next true
  end
})

I'll probably add a much simpler implementation to this later on too :)

Diegou18

Forever Chandelure lover.

Age 21
Male
Seen 1 Day Ago
Posted September 2nd, 2020
75 posts
2.7 Years
Unfortunately, this will be hard because we won't know if the abilities were before activated while no Pokémon with Neutralizing Gas existed in the battle. I tried to do that but it gave errors and that require heavy edition to make that working
Oh, well, that's right. I won't say anything else, because I don't know so much about scripting and I couldn't figure out a good way in order to help to achieve that, but thank you for your time.
Anyway, could you show me where you put this in your scripts, please?
Next, find where Delta Stream ability code exists. Now we add this after the strong winds weather initialization with DeltaStream:
      # Neutralizing Gas
      if self.hasWorkingAbility(:NEUTRALIZINGGAS) && [email protected][PBEffects::NeutralizingGas]  # Not hasWorkingAbility (We need to be workable even if other abilities supressed)
        @battle.field.effects[PBEffects::NeutralizingGas]=true
        PBDebug.log("[Ability triggered] #{pbThis}'s Neutralizing Gas started")
      end
I know you wrote "after the strong winds weather initialization with DeltaStream", but I'm pretty sure that I didn't paste the script in the right place (I just put it below Delta Stream's script). I'd like knowing what text is before and after that part of the script.
Thanks.
Seen 2 Days Ago
Posted 2 Weeks Ago
43 posts
2.8 Years
Hello!
I just came here to mention that the Gulp Missile ability code shown in this thread is actually wrong, I don't know how to fix it, but Ill mention the things that it doesnt have.

Gulp Missile triggers from the first turn of Dive even if the second turn doesn't happen (if Surf is fully blocked it doesn't trigger)
Gulp Missile's Arrokuda projectile deals 1/4 max HP damage and lowers the target's Defense 1 stage
Gulp Missile's Pikachu projectile deals 1/4 max HP damage and paralyzes the target (even Ground types)
Gulp Missile fires the projectile even if Cramorant gets knocked out
Gulp Missile's have types, Arrokuda is water type, Pikachu is Electric type, but it seems to only consider Super Effective damage, not Resisted
So Pikachu does 2/4 to water and flying, but still hit 1/4 to every other type
So Arrokuda does 2/4 towards rock and ground (unsure how it works against a rock/ground mon tho sorry), but does 1/4 against everything else.

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 5 Hours Ago
Posted 3 Weeks Ago
1,242 posts
2.3 Years
EDIT 02/22:
My Ice Scales was added in the same place than Heat Proof:
In 'PokeBattle_Move', find Heat Proof's code and paste inside 'if !attacker.hasMoldBreaker', like:
Spoiler:

    if !attacker.hasMoldBreaker
      if opponent.hasWorkingAbility(:HEATPROOF) && isConst?(type,PBTypes,:FIRE)
        damagemult=(damagemult*0.5).round
      end
      if opponent.hasWorkingAbility(:THICKFAT) &&
         (isConst?(type,PBTypes,:ICE) || isConst?(type,PBTypes,:FIRE))
        damagemult=(damagemult*0.5).round
      end
      if opponent.hasWorkingAbility(:FURCOAT) &&
         (pbIsPhysical?(type) || @function==0x122) # Psyshock
        damagemult=(damagemult*0.5).round
      end
      if opponent.hasWorkingAbility(:DRYSKIN) && isConst?(type,PBTypes,:FIRE)
        damagemult=(damagemult*1.25).round
      end
      if opponent.hasWorkingAbility(:ICESCALES) && pbIsSpecial?(type)
        damagemult=(damagemult*0.5).round
      end
    end
    # Gems are the first items to be considered, as Symbiosis can replace a

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 5 Hours Ago
Posted 3 Weeks Ago
1,242 posts
2.3 Years
Steely Spirit:
In 'PokeBattle_Move' script, paste above ' if attacker.hasWorkingItem(:THICKCLUB) &&':
    if attacker.pbPartner.hasWorkingAbility(:STEELYSPIRIT) && isConst?(type,PBTypes,:STEEL)
      atkmult=(atkmult*1.5).round
    end
    if attacker.hasWorkingItem(:THICKCLUB) &&
       (isConst?(attacker.species,PBSpecies,:CUBONE) ||
       isConst?(attacker.species,PBSpecies,:MAROWAK)) && pbIsPhysical?(type)
      atkmult=(atkmult*2.0).round
    end
    if attacker.hasWorkingItem(:DEEPSEATOOTH) &&

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 5 Hours Ago
Posted 3 Weeks Ago
1,242 posts
2.3 Years
Gorilla Tactics:
In ability txt, the info for:
XXX,GORILLATACTICS,Gorilla Tactics,"Boosts the Pokémon’s Attack stat but only allows the use of the first selected move."

In 'PBEffects' add a new effect for, inside ' ############# These effects apply to a battler' (XXX will be your last number):
    GorillaTactics     = XXX
    
    ############################################################################
    # These effects apply to a side
    CraftyShield       = 0
In 'PokeBattle_Battler' script, add a new effect for, inside 'def pbInitEffects(batonpass)' into the last line, above the 'end', like:
    @effects[PBEffects::GorillaTactics]   = -1
  end

  def pbUpdate(fullchange=false)
Then, 'def pbEndTurn(choice)' add for the ability:
    if @effects[PBEffects::GorillaTactics]<0 && @lastMoveUsed>=0 && !fainted? && 
       self.hasWorkingAbility(:GORILLATACTICS)
      @effects[PBEffects::GorillaTactics][email protected]
    end
    @battle.pbPrimordialWeather
Now, to power up thanks to ability, go to 'PokeBattle_Move' script and above THICKCLUB's code, paste:
    if attacker.hasWorkingAbility(:GORILLATACTICS) && pbIsPhysical?(type)
      atkmult=(atkmult*1.5).round
    end
    if attacker.hasWorkingItem(:THICKCLUB) &&
Finally, in 'PokeBattle_Battle' script, inside 'def pbCanChooseMove?(idxPokemon,idxMove,showMessages,sleeptalk=false)' paste below 'if thispkmn.effects[PBEffects::Encore]>0 && idxMove!=thispkmn.effects[PBEffects::EncoreIndex]', like:
    if thispkmn.effects[PBEffects::Encore]>0 && idxMove!=thispkmn.effects[PBEffects::EncoreIndex]
      return false
    end
    if thispkmn.effects[PBEffects::GorillaTactics]>=0 && thispkmn.hasWorkingAbility(:GORILLATACTICS)
      hasmove=false
      for i in 0...4
        if thispkmn.moves[i].id==thispkmn.effects[PBEffects::GorillaTactics]
          hasmove=true; break
        end
      end
      if hasmove && thismove.id!=thispkmn.effects[PBEffects::GorillaTactics]
        if showMessages
          pbDisplayPaused(_INTL("{1} can only use {2}!",
             thispkmn.pbThis,
             PBMoves.getName(thispkmn.effects[PBEffects::GorillaTactics])))
        end
        return false
      end
    end

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 5 Hours Ago
Posted 3 Weeks Ago
1,242 posts
2.3 Years
Perish Body:

In ability.txt add:
XXX,PERISHBODY,Perish Body,"When hit by a move that makes direct contact, the Pokémon and the attacker will faint after three turns unless they switch out of battle."

Now, 'PBEffects' script, add for:
    Yawn               = 108
    PerishBody     = 109
Then 'PokeBattle_Battler' script:
    @effects[PBEffects::Yawn]             = 0
    @effects[PBEffects::PerishBody]       = 0
Look for 'def pbEffectsOnDealingDamage(move,user,target,damage)' and add below POISONTOUCH's code:
        if user.hasWorkingAbility(:POISONTOUCH,true) &&
           target.pbCanPoison?(nil,false) && @battle.pbRandom(10)<3
          PBDebug.log("[Ability triggered] #{user.pbThis}'s Poison Touch")
          target.pbPoison(user,_INTL("{1}'s {2} poisoned {3}!",user.pbThis,
             PBAbilities.getName(user.ability),target.pbThis(true)))
        end
        if target.hasWorkingAbility(:PERISHBODY,true) && !user.hasMoldBreaker && 
           user.effects[PBEffects::PerishBody]==0 && target.effects[PBEffects::PerishBody]==0
          @battle.pbDisplay(_INTL("Both Pokémon will faint in three turns!"))
          user.effects[PBEffects::PerishBody]=3; target.effects[PBEffects::PerishBody]=3
        end
      end
    end
    if damage>0
Now in 'PokeBattle_Battle' script, use CTRL+F and find 'PBDebug.log("[Withdrew Pokémon] Player withdrew #{i.pbThis(true)}")' and paste below 'i.effects[PBEffects::PerishBody]=0 # Reset Perish Body if has one' (like):
    # Switch out Pokémon
    @switching=true
    switched=[]
    for i in priority
      if @choices[i.index][0]==2 && !i.effects[PBEffects::SkipTurn]
        [email protected][i.index][1] # party position of Pokémon to switch to
        newpokename=index
        if isConst?(pbParty(i.index)[index].ability,PBAbilities,:ILLUSION)
          newpokename=pbGetLastPokeInTeam(i.index)
        end
        self.lastMoveUser=i.index
        if !pbOwnedByPlayer?(i.index)
          owner=pbGetOwner(i.index)
          pbDisplayBrief(_INTL("{1} withdrew {2}!",owner.fullname,i.name))
          PBDebug.log("[Withdrew Pokémon] Opponent withdrew #{i.pbThis(true)}")
        else
          pbDisplayBrief(_INTL("{1}, that's enough!\r\nCome back!",i.name))
          PBDebug.log("[Withdrew Pokémon] Player withdrew #{i.pbThis(true)}")
        end
        i.effects[PBEffects::PerishBody]=0 # Reset Perish Body if has one
        for j in priority
          next if !i.pbIsOpposing?(j.index)
Finally to show the countdown, paste above # Uproar, like:
    # Perish Body
    for i in priority
      next if i.fainted?
      if i.effects[PBEffects::PerishBody]>0
        i.effects[PBEffects::PerishBody]-=1
        pbDisplay(_INTL("{1}'s perish count fell to {2}!",i.pbThis,i.effects[PBEffects::PerishBody]))
        PBDebug.log("[Lingering effect triggered] #{i.pbThis}'s Perish Body count dropped to #{i.effects[PBEffects::PerishBody]}")
        if i.effects[PBEffects::PerishBody]==0
          i.pbReduceHP(i.hp,true)
        end
      end
      if i.fainted?
        return if !i.pbFaint
      end
    end
    if @decision>0
      pbGainEXP
      return
    end
    # Uproar
    for i in priority
      next if i.fainted?
      if i.effects[PBEffects::Uproar]>0

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 5 Hours Ago
Posted 3 Weeks Ago
1,242 posts
2.3 Years
Sand Spit:

For ability.txt:
XXX,SANDSPIT,Sand Spit."The Pokémon creates a sandstorm when it’s hit by an attack."

Now in 'PokeBattle_Battler' script paste above Air Ballon's code (I just copied like SANDSTORM move works):
        if target.hasWorkingAbility(:SANDSPIT)
          if @battle.weather!=PBWeather::HEAVYRAIN || @battle.weather!=PBWeather::HARSHSUN || 
             @battle.weather!=PBWeather::STRONGWINDS || 
            @battle.weather!=PBWeather::SANDSTORM
            @battle.pbAnimation(getConst(PBMoves,:SANDSTORM),self,nil)
            @battle.weather=PBWeather::SANDSTORM
            @battle.weatherduration=5
            @battle.weatherduration=8 if target.hasWorkingItem(:SMOOTHROCK)
            @battle.pbCommonAnimation("Sandstorm",nil,nil)
            @battle.pbDisplay(_INTL("A sandstorm brewed!"))
          end
        end
        if target.hasWorkingItem(:AIRBALLOON,true)
          PBDebug.log("[Item triggered] #{target.pbThis}'s Air Balloon popped")
          @battle.pbDisplay(_INTL("{1}'s Air Balloon popped!",target.pbThis))
          target.pbConsumeItem(true,false)

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 5 Hours Ago
Posted 3 Weeks Ago
1,242 posts
2.3 Years
Ice Face:

For ability.txt:
XXX,ICEFACE,Ice Face,"The Pokémon's ice head can take a physical attack as a substitute, but the attack also changes the Pokémon's appearance. The ice will be restored when it hails."

Now, in 'PokeBattle_Battler' script look for SNOWWARNING's code to add ICEFACE case:
        if self.hasWorkingAbility(:SNOWWARNING) && (@battle.weather!=PBWeather::HAIL || @battle.weatherduration!=-1)
          @battle.weather=PBWeather::HAIL
          if USENEWBATTLEMECHANICS
            @battle.weatherduration=5
            @battle.weatherduration=8 if hasWorkingItem(:ICYROCK)
          else
            @battle.weatherduration=-1
          end
          @battle.pbCommonAnimation("Hail",nil,nil)
          @battle.pbDisplay(_INTL("{1}'s {2} made it hail!",pbThis,PBAbilities.getName(self.ability)))
          PBDebug.log("[Ability triggered] #{pbThis}'s Snow Warning made it hail")
          for i in 0...4
            [email protected][i]
            if poke.hasWorkingAbility(:ICEFACE) && isConst?(poke.species,PBSpecies,:EISCUE) && poke.form!=0
              poke.form=0
              poke.pbUpdate(true)
              @battle.scene.pbChangePokemon(poke,poke.pokemon)
              @battle.pbDisplay(_INTL("{1} transformed!",poke.pbThis))
              PBDebug.log("[Form changed] #{poke.pbThis} changed to form #{poke.form}")
            end
          end
        end
      end
      if self.hasWorkingAbility(:AIRLOCK) ||
Now, I added like DISGUISE works, if hit itself thanks to Confusion, will trigger the ability:
Inside 'if !turneffects[PBEffects::SkipAccuracyCheck]' add:
    if !turneffects[PBEffects::SkipAccuracyCheck]
      if @effects[PBEffects::Confusion]>0
        @effects[PBEffects::Confusion]-=1
        if @effects[PBEffects::Confusion]<=0
          pbCureConfusion
        else
          pbContinueConfusion
          PBDebug.log("[Status] #{pbThis} remained confused (count: #{@effects[PBEffects::Confusion]})")
          if @battle.pbRandom(3)==0
            if isConst?(self.species,PBSpecies,:EISCUE) && self.hasWorkingAbility(:ICEFACE) && self.form!=1
              @battle.pbAnimation(getConst(PBMoves,:TACKLE),self,self)
              self.form=1; pbUpdate(true)
              @battle.scene.pbChangePokemon(self,@pokemon)
              @battle.pbDisplay(_INTL("{1} transformed!",self.pbThis))
              PBDebug.log("[Form changed] #{self.pbThis} changed to form #{self.form}")
              return false
            else  
              pbConfusionDamage
              @battle.pbDisplay(_INTL("It hurt itself in its confusion!")) 
              PBDebug.log("[Status] #{pbThis} hurt itself in its confusion and couldn't move")
              return false
            end
          end
        end
      end
    end
    if @effects[PBEffects::Flinch]
Then, in 'PokeBattle_Move' script inside ' def pbReduceHPDamage(damage,attacker,opponent)' add elsif for ICEFACE case:
    if opponent.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(attacker) &&
       (!attacker || attacker.index!=opponent.index)
      PBDebug.log("[Lingering effect triggered] #{opponent.pbThis}'s Substitute took the damage")
      damage=opponent.effects[PBEffects::Substitute] if damage>opponent.effects[PBEffects::Substitute]
      opponent.effects[PBEffects::Substitute]-=damage
      opponent.damagestate.substitute=true
      @battle.scene.pbDamageAnimation(opponent,0)
      @battle.pbDisplayPaused(_INTL("The substitute took damage for {1}!",opponent.name))
      if opponent.effects[PBEffects::Substitute]<=0
        opponent.effects[PBEffects::Substitute]=0
        @battle.pbDisplayPaused(_INTL("{1}'s substitute faded!",opponent.name))
        PBDebug.log("[End of effect] #{opponent.pbThis}'s Substitute faded")
      end
      opponent.damagestate.hplost=damage
      damage=0
    elsif isConst?(opponent.species,PBSpecies,:EISCUE) && opponent.hasWorkingAbility(:ICEFACE) && 
          opponent.form!=1 && pbIsPhysical?(type) && !attacker.hasMoldBreaker
      opponent.form=1; opponent.pbUpdate(true)
      @battle.scene.pbChangePokemon(opponent,opponent.pokemon)
      @battle.pbDisplay(_INTL("{1} transformed!",opponent.name))
      PBDebug.log("[Form changed] #{opponent.pbThis} changed to form #{opponent.form}")
      opponent.damagestate.hplost=damage
      damage=0
    else 
      opponent.damagestate.substitute=false
Finally, in 'PokeBattle_MoveEffects' add inside HAIL move script, ICEFACE case, like:
################################################################################
# Starts hail weather. (Hail)
################################################################################
class PokeBattle_Move_102 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    case @battle.weather
    when PBWeather::HEAVYRAIN
      @battle.pbDisplay(_INTL("There is no relief from this heavy rain!"))
      return -1
    when PBWeather::HARSHSUN
      @battle.pbDisplay(_INTL("The extremely harsh sunlight was not lessened at all!"))
      return -1
    when PBWeather::STRONGWINDS
      @battle.pbDisplay(_INTL("The mysterious air current blows on regardless!"))
      return -1
    when PBWeather::HAIL
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
    pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
    @battle.weather=PBWeather::HAIL
    @battle.weatherduration=5
    @battle.weatherduration=8 if attacker.hasWorkingItem(:ICYROCK)
    @battle.pbCommonAnimation("Hail",nil,nil)
    @battle.pbDisplay(_INTL("It started to hail!"))
    for i in 0...4
      [email protected][i]
      if poke.hasWorkingAbility(:ICEFACE) && isConst?(poke.species,PBSpecies,:EISCUE) && poke.form!=0
        poke.form=0
        poke.pbUpdate(true)
        @battle.scene.pbChangePokemon(poke,poke.pokemon)
        @battle.pbDisplay(_INTL("{1} transformed!",poke.pbThis))
        PBDebug.log("[Form changed] #{poke.pbThis} changed to form #{poke.form}")
      end
    end
    return 0
  end
end
Seen 2 Days Ago
Posted 2 Weeks Ago
43 posts
2.8 Years
Hello!
I'm here to deliver information on things, I'm not a coder, I'm just the information delivery guy.

General Mechanic changes:

Speed is calculated immediatly:
Getting paralized in a turn, will make your speed change at that exact moment,
instead of waiting for the start of the next turn like in gen 7

Gen 8 Moves

Spoiler:


---------Dragon Darts----------

In doubles:
If target is immune, it will redirect itself towards the second opponent
If both are immune, it will simply show the message that the enemy is immune

If target uses a move that makes it vanish, (fly, dig etc) it will target the second opponent
If the other opponent is also vanished or immune, it will fail

It will hit twice the follow me user

It hits both opponents once if none of the things above happen

---------Clangorous Scales-------

If Kommo-o is low HP, and will otherwise die upon using this move, the move will fail

It will fail if the enemy has Soundproof

It will not fail if Kommo-O has Soundproof

It is a sound move, and if Kommo-O is holding Throat Spray, it will activate the item

-------No Retreat--------

If you got Mean Looked or trapped by another move or ability, you can use this move as many times as you want

If you aren't, you can only use this move once

------Octolock--------

You can still use a trapping move (wrap, snap trap, etc) even while the enemy is octolocked in the fight



Gen 8 Items

Spoiler:


-------Blunder Policy-----------

Works if:

If you attack your partner and miss

If you miss an attack because of Hustle or Wonder Skin

If the enemy used evasion moves, or has an evasion ability and you miss

Doesn't work if:

If the enemy is under effects of vanishing (fly, dig, phantom force...)

If you missed an OHKO move

--------Eject Pack------------

Activates when:
Triggers on self-inflicted stat drops

Triggers even if your stats are decreased but stay in the positive stat levels

Triggers from Stockpile release (aka using Swallow or Spit Up)

Triggers from allies lowering your stats




Gen 8 Abilities

Spoiler:


----------Punk Rock------------

Boosts sound moves by 1.3

Makes the user resist sound moves by 50%

-----------Steely Spirit--------------

Boosts partner steel type moves by 1.5
(it also seems to boost itself surprisingly, but its not too important)

------------Power Spot-----------

Boosts partner moves base power by 1.3


------Neutralizing Gas--------

If Neutralizing Gas is out turn 1, and enemy has an ability that usualy activates at start of turn
it will stop the enemies ability from triggering

If Neutralizing Gas leaves the field in this case, the enemies ability will trigger on the
Neutralizing Gas user, and then he will switch out

Neutralizing Gas prevents Imposter from activating if both enter the field at the same time,
or if Imposter is sent out into Neutralizing Gas

If an Imposter Ditto starts a battle against a Neutralizing Gas Weezing, and Weezing switches out while Ditto uses Transform, £
Transform goes off and Imposter doesn't happen.

-------Ice Face---------

It can regenerate its head even when Neutralizing Gas is active (but it will not protect from physical damage with the head, it simply allows it to regen it)