################################################################################
# Lowers the Attack, Special Attack, and Speed of a Poisoned target (Venom Drench)
################################################################################
class PokeBattle_Move_### < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if opponent.status!=PBStatuses::POISON
@battle.pbDisplay(_INTL("But it failed!"))
return -1
else
if opponent.effects[PBEffects::Substitute]>0
@battle.pbDisplay(_INTL("{1}'s attack missed!",attacker.pbThis))
return -1
end
if opponent.pbTooLow?(PBStats::ATTACK) &&
opponent.pbTooLow?(PBStats::SPATK) &&
opponent.pbTooLow?(PBStats::SPEED)
@battle.pbDisplay(_INTL("{1}'s stats won't go any lower!",opponent.pbThis))
return -1
end
if opponent.pbOwnSide.effects[PBEffects::Mist]>0
@battle.pbDisplay(_INTL("{1} is protected by Mist!",opponent.pbThis))
return -1
end
if isConst?(opponent.ability,PBAbilities,:CLEARBODY) ||
isConst?(opponent.ability,PBAbilities,:WHITESMOKE)
@battle.pbDisplay(_INTL("{1}'s {2} prevents stat loss!",opponent.pbThis,
PBAbilities.getName(opponent.ability)))
return -1
end
pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
ret=-1; showanim=true
if opponent.pbReduceStat(PBStats::ATTACK,1,false,showanim)
ret=0; showanim=false
end
if opponent.pbReduceStat(PBStats::SPATK,1,false,showanim)
ret=0; showanim=false
end
if opponent.pbReduceStat(PBStats::SPEED,1,false,showanim)
ret=0; showanim=false
end
return ret
end
end
end