Hi I just started using Pokemon Essentials, and I'm trying to create a move where the user changes the opponent's stats back to normal. So far it isn't working in the Script.rxdata, and nothing happens in the game when I use it. Here's how the script looks for the move:
[S-HIGHLIGHT]class PokeBattle_Move_13B < PokeBattle_Move
def pbEffect(opponent,hitnum=0,alltargets=nil,showanimation=true)
for i in 0...4
@battle.opponent.stages[PBStats::ATTACK] = 0
@battle.opponent.stages[PBStats::DEFENSE] = 0
@battle.opponent.stages[PBStats::SPEED] = 0
@battle.opponent.stages[PBStats::SPATK] = 0
@battle.opponent.stages[PBStats::SPDEF] = 0
@battle.opponent.stages[PBStats::ACCURACY] = 0
@battle.opponent.stages[PBStats::EVASION] = 0
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
@battle.pbDisplay(_INTL("All opponents' stat changes were eliminated!"))
return 0
end
end[/S-HIGHLIGHT]