Advertisement
Vendily

Wild Drop Item

Jan 11th, 2017
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.51 KB | None | 0 0
  1.         if @battlers[1].pokemon && !@opponent # edit
  2.           items=@battlers[1].pokemon.wildHoldItems
  3.           firstpoke=$Trainer.firstParty
  4.           chances=[50,5,1]
  5.           chances=[60,20,5] if firstpoke && !firstpoke.isEgg? &&
  6.                 isConst?(firstpoke.ability,PBAbilities,:COMPOUNDEYES)
  7.           itemrnd=rand(100)
  8.           if itemrnd<chances[0] || (items[0]==items[1] && items[1]==items[2])
  9.             Kernel.pbItemBall(items[0]) if @battlers[1].isFainted?
  10.           elsif itemrnd<(chances[0]+chances[1])
  11.             Kernel.pbItemBall(items[1]) if @battlers[1].isFainted?
  12.           elsif itemrnd<(chances[0]+chances[1]+chances[2])
  13.             Kernel.pbItemBall(items[2]) if @battlers[1].isFainted?
  14.           end
  15.           if @battlers[3].pokemon && @battlers[3].isFainted?
  16.             items=@battlers[1].pokemon.wildHoldItems
  17.             firstpoke=$Trainer.firstParty
  18.             chances=[50,5,1]
  19.             chances=[60,20,5] if firstpoke && !firstpoke.isEgg? &&
  20.                   isConst?(firstpoke.ability,PBAbilities,:COMPOUNDEYES)
  21.             itemrnd=rand(100)
  22.             if itemrnd<chances[0] || (items[0]==items[1] && items[1]==items[2])
  23.               Kernel.pbItemBall(items[0]) if @battlers[3].isFainted?
  24.             elsif itemrnd<(chances[0]+chances[1])
  25.               Kernel.pbItemBall(items[1]) if @battlers[3].isFainted?
  26.             elsif itemrnd<(chances[0]+chances[1]+chances[2])
  27.               Kernel.pbItemBall(items[2]) if @battlers[3].isFainted?
  28.             end
  29.           end
  30.         end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement