Advertisement
Redylriws

Illuni custom Function Codes

Jun 24th, 2015
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. ################################################################################
  2. # Temporal Destruction
  3. ################################################################################
  4. class PokeBattle_Move_163 < PokeBattle_Move
  5. def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
  6. ret=super(attacker,opponent,hitnum,alltargets,showanimation)
  7. if opponent.damagestate.calcdamage>0
  8. showanim=true
  9. if attacker.pbCanReduceStatStage?(PBStats::DEFENSE,false,true,attacker)
  10. attacker.pbReduceStat(PBStats::DEFENSE,1,true,showanim,true,attacker)
  11. showanim=false
  12. end
  13. if attacker.pbCanReduceStatStage?(PBStats::SPDEF,false,true,attacker)
  14. attacker.pbReduceStat(PBStats::SPDEF,1,true,showanim,true,attacker)
  15. showanim=false
  16. end
  17. end
  18. end
  19. def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
  20. ret=super(attacker,opponent,hitnum,alltargets,showanimation)
  21. if opponent.damagestate.calcdamage>0
  22. attacker.effects[PBEffects::HyperBeam]=2
  23. attacker.currentMove=@id
  24. end
  25. return ret
  26. end
  27. def pbCalcDamage(attacker,opponent)
  28. return super(attacker,opponent,PokeBattle_Move::IGNOREPKMNTYPES)
  29. end
  30. end
  31.  
  32. ################################################################################
  33. # Appare Giri
  34. ################################################################################
  35. class PokeBattle_Move_164 < PokeBattle_Move
  36. def pbAccuracyCheck(attacker,opponent)
  37. return true
  38. end
  39. def pbAdditionalEffect(attacker,opponent)
  40. if !opponent.hasWorkingAbility(:INNERFOCUS) &&
  41. opponent.effects[PBEffects::Substitute]==0
  42. opponent.effects[PBEffects::Flinch]=true
  43. return true
  44. end
  45. return false
  46. end
  47.  
  48. def pbModifyDamage(damagemult,attacker,opponent)
  49. if opponent.effects[PBEffects::Minimize]
  50. return (damagemult*2.0).round
  51. end
  52. return damagemult
  53. end
  54. end
  55.  
  56. ################################################################################
  57. # Leaf Hurricane
  58. ################################################################################
  59. class PokeBattle_Move_165 < PokeBattle_Move
  60. def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
  61. ret=super(attacker,opponent,hitnum,alltargets,showanimation)
  62. if opponent.damagestate.calcdamage>0
  63. showanim=true
  64. if attacker.pbCanReduceStatStage?(PBStats::SPEED,false,true,attacker)
  65. attacker.pbReduceStat(PBStats::SPEED,1,true,showanim,true,attacker)
  66. showanim=false
  67. end
  68. if attacker.pbCanReduceStatStage?(PBStats::DEFENSE,false,true,attacker)
  69. attacker.pbReduceStat(PBStats::DEFENSE,1,true,showanim,true,attacker)
  70. showanim=false
  71. end
  72. if attacker.pbCanReduceStatStage?(PBStats::SPDEF,false,true,attacker)
  73. attacker.pbReduceStat(PBStats::SPDEF,1,true,showanim,true,attacker)
  74. showanim=false
  75. end
  76. end
  77. end
  78. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement