TechSkylander1518

Move effects that depend on # of times used

Apr 12th, 2021 (edited)
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.85 KB | None | 0 0
  1. #Script section PokeBattle_Battler, under the line
  2. # attr_accessor :movesUsed
  3. attr_accessor :movesUsage
  4.  
  5. #Script section Battler_Initialize, under the line
  6. #     @movesUsed             = []
  7.     @movesUsage             = []
  8.  
  9. #Script section Battler_UseMove, under the line
  10. # @movesUsed.push(move.id) if [email protected]?(move.id)   # For Last Resort
  11.       if @movesUsage[move.id]
  12.         @movesUsage[move.id]+=1
  13.       else
  14.         @movesUsage[move.id]=1
  15.       end
  16.  
  17.  
  18. #Script section Battle_UseMove, under the lines
  19. #        chance = move.pbAdditionalEffectChance(user,b)
  20. #        next if chance<=0
  21.         if user.movesUsage[move.id]>0
  22.           userusage=user.movesUsage[move.id]
  23.           if userusage>=chance/10
  24.             chance=100
  25.             user.movesUsage[move.id]=0
  26.           else
  27.             chance=0
  28.           end
  29.         end
  30.  
Add Comment
Please, Sign In to add comment