Bigpokemonfan0
DBZFan13
- 82
- Posts
- 14
- Years
- Seen Apr 27, 2025
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:
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.
Code:
# 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
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.
Last edited: