Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. ################################################################################
  2. # Ensures the next hit is critical and lowers the opponents speed. (420 No Scope)
  3. ################################################################################
  4. class PokeBattle_Move_1B8 < PokeBattle_Move
  5. def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
  6. if attacker.effects[PBEffects::LaserFocus]
  7. @battle.pbDisplay(_INTL("But it failed!"))
  8. return -1
  9. end
  10. pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
  11. attacker.effects[PBEffects::LaserFocus]=true
  12. @battle.pbDisplay(_INTL("{1} is focused!",attacker.pbThis))
  13. return 0
  14. return super(attacker,opponent,hitnum,alltargets,showanimation)
  15. return -1 if pbTypeImmunityByAbility(pbType(@type,attacker,opponent),attacker,opponent)
  16. return -1 if !opponent.pbCanReduceStatStage?(PBStats::SPEED,attacker,true,self)
  17. pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
  18. ret=opponent.pbReduceStat(PBStats::SPEED,1,attacker,false,self)
  19. return ret ? 0 : -1
  20. end
  21. end
  22.  
  23. def pbAdditionalEffect(attacker,opponent)
  24. return if opponent.damagestate.substitute
  25. if opponent.pbCanReduceStatStage?(PBStats::SPEED,attacker,false,self)
  26. opponent.pbReduceStat(PBStats::SPEED,1,attacker,false,self)
  27. end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement