################################################################################
# Paralyzes the target.
# Thunder Wave: Doesn't affect target if move's type has no effect on it.
# Bolt Strike: Powers up the next Fusion Flare used this round.
################################################################################
class PokeBattle_Move_007 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if pbIsDamaging?
ret=super(attacker,opponent,hitnum,alltargets,showanimation)
if opponent.damagestate.calcdamage>0 && isConst?(@id,PBMoves,:BOLTSTRIKE)
@battle.field.effects[PBEffects::FusionFlare]=true
end
return ret
else
if isConst?(@id,PBMoves,:STUNSPORE)
if USENEWBATTLEMECHANICS && (opponent.pbHasType?(:GRASS) ||
(!attacker.hasMoldBreaker && opponent.hasWorkingAbility(:OVERCOAT)) ||
opponent.hasWorkingItem(:SAFETYGOGGLES))
@battle.pbDisplay(_INTL("It doesn't affect {1}...",opponent.pbThis(true)))
return -1
end
return -1 if pbTypeImmunityByAbility(pbType(@type,attacker,opponent),attacker,opponent)
pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
opponent.pbParalyze(attacker)
return 0
end
if isConst?(@id,PBMoves,:THUNDERWAVE)
if pbTypeModifier(type,attacker,opponent)==0
@battle.pbDisplay(_INTL("It doesn't affect {1}...",opponent.pbThis(true)))
return -1
end
end
return -1 if pbTypeImmunityByAbility(pbType(@type,attacker,opponent),attacker,opponent)
return -1 if !opponent.pbCanParalyze?(attacker,true,self)
pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
opponent.pbParalyze(attacker)
return 0
end
return -1
end
def pbAdditionalEffect(attacker,opponent)
return if opponent.damagestate.substitute
if opponent.pbCanParalyze?(attacker,false,self)
opponent.pbParalyze(attacker)
end
end
end