Advertisement
TechSkylander1518

Stat Up/Down Move

Sep 14th, 2021
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.13 KB | None | 0 0
  1.  
  2. class PokeBattle_StatUpTargetStatDownMove < PokeBattle_Move
  3.   def pbFailsAgainstTarget?(user,target)
  4.     return false if damagingMove?
  5.     return !target.pbCanLowerStatStage?(@statDown[0],user,self,true)
  6.   end
  7.  
  8.  
  9.   def pbMoveFailed?(user,targets)
  10.     return false if damagingMove?
  11.     return !user.pbCanRaiseStatStage?(@statUp[0],user,self,true)
  12.   end
  13.  
  14.  
  15.   def pbEffectGeneral(user)
  16.     return if damagingMove?
  17.     user.pbRaiseStatStage(@statUp[0],@statUp[1],user)
  18.   end
  19.  
  20.  
  21.   def pbEffectAgainstTarget(user,target)
  22.     return if damagingMove?
  23.     target.pbLowerStatStage(@statDown[0],@statDown[1],user)
  24.   end
  25.  
  26.  
  27.   def pbAdditionalEffect(user,target)
  28.     if user.pbCanRaiseStatStage?(@statUp[0],user,self)
  29.       user.pbRaiseStatStage(@statUp[0],@statUp[1],user)
  30.     end
  31.     if !target.damageState.substitute && target.pbCanLowerStatStage?(@statDown[0],user,self)
  32.       target.pbLowerStatStage(@statDown[0],@statDown[1],user)
  33.     end
  34.   end
  35.  
  36. end
  37.  
  38.  
  39.  
  40. class PokeBattle_Move_CODE < PokeBattle_StatUpTargetStatDownMove
  41.   def initialize(battle,move)
  42.     super
  43.     @statUp = [:STAT,amount]
  44.     @statDown = [:STAT,amount]
  45.   end
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement