Bigpokemonfan0

Male
Seen April 11th, 2019
Posted July 6th, 2018
39 posts
8.5 Years
Hey everyone! I figured out a solution to Reflect/Light Screen problem.

Turns out you need to insert 'pbWildBattle(species,level,variable=nil,canescape=true,canlose=false)' to the code.

Like an example below:

   # Reflect
    if skill>=PBTrainerAI.highSkill
      if opponent.pbOwnSide.effects[PBEffects::Reflect]>0 && move.pbIsPhysical?(type)
        if !opponent.pbPartner.fainted?
          damage=(damage*0.66).round
        else
          damage=(damage*0.5).round
        end
      end
    else
      if pbWildBattle(species,level,variable=nil,canescape=true,canlose=false)
        if opponent.pbOwnSide.effects[PBEffects::Reflect]>0 && move.pbIsPhysical?(type)
          if !opponent.pbPartner.fainted?
            damage=(damage*0.66).round
          else
            damage=(damage*0.5).round
          end
        end
      end
    end
This is only for wild pokemon battles.

There even other errors like wild held berries and abilities that includes Solid Rock.

I'd like to add a tutorial, but this isn't much of a tutorial, is there?

Edit: I'm sorry for this incorrect script. It doesn't work on trainer battles below high AI. I'll try to test again, properly this time.