class PokeBattle_Move_159 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
return super(attacker,opponent,hitnum,alltargets,showanimation) if pbIsDamaging?
speed=opponent.pbCanReduceStatStage?(PBStats::SPEED,attacker,false,self)
poison=opponent.pbCanPoison?(attacker,false,self)
pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation) if speed || poison
ret=false
ret=opponent.pbReduceStat(PBStats::SPEED,1,attacker,true,self) if speed
ret|=poison
opponent.pbPoison(attacker) if poison
@battle.pbDisplay(_INTL("But it failed!")) if !ret
return ret ? 0 : -1
end
def pbAdditionalEffect(attacker,opponent)
return if opponent.damagestate.substitute
if opponent.pbCanReduceStatStage?(PBStats::SPEED,attacker,false,self)
opponent.pbReduceStat(PBStats::SPEED,1,attacker,false,self)
end
if opponent.pbCanPoison?(attacker,false,self)
opponent.pbPoison(attacker)
end
end
end