################################################################################
# Target can no longer switch out or flee, as long as the user remains active.
# (Block, Mean Look, Spider Web, Thousand Waves)
################################################################################
class PokeBattle_Move_0EF < 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 && !opponent.damagestate.substitute &&
!opponent.fainted?
if opponent.effects[PBEffects::MeanLook]<0 &&
(!USENEWBATTLEMECHANICS || !opponent.pbHasType?(:GHOST))
opponent.effects[PBEffects::MeanLook]=attacker.index
@battle.pbDisplay(_INTL("{1} can no longer escape!",opponent.pbThis))
end
end
return ret
end
if opponent.effects[PBEffects::MeanLook]>=0 ||
(opponent.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(attacker))
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
if USENEWBATTLEMECHANICS && opponent.pbHasType?(:GHOST)
@battle.pbDisplay(_INTL("It doesn't affect {1}...",opponent.pbThis(true)))
return -1
end
pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
opponent.effects[PBEffects::MeanLook]=attacker.index
@battle.pbDisplay(_INTL("{1} can no longer escape!",opponent.pbThis))
return 0
end
end