Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if @battlers[1].pokemon && !@opponent # edit
- items=@battlers[1].pokemon.wildHoldItems
- firstpoke=$Trainer.firstParty
- chances=[50,5,1]
- chances=[60,20,5] if firstpoke && !firstpoke.isEgg? &&
- isConst?(firstpoke.ability,PBAbilities,:COMPOUNDEYES)
- itemrnd=rand(100)
- if itemrnd<chances[0] || (items[0]==items[1] && items[1]==items[2])
- Kernel.pbItemBall(items[0]) if @battlers[1].isFainted?
- elsif itemrnd<(chances[0]+chances[1])
- Kernel.pbItemBall(items[1]) if @battlers[1].isFainted?
- elsif itemrnd<(chances[0]+chances[1]+chances[2])
- Kernel.pbItemBall(items[2]) if @battlers[1].isFainted?
- end
- if @battlers[3].pokemon && @battlers[3].isFainted?
- items=@battlers[1].pokemon.wildHoldItems
- firstpoke=$Trainer.firstParty
- chances=[50,5,1]
- chances=[60,20,5] if firstpoke && !firstpoke.isEgg? &&
- isConst?(firstpoke.ability,PBAbilities,:COMPOUNDEYES)
- itemrnd=rand(100)
- if itemrnd<chances[0] || (items[0]==items[1] && items[1]==items[2])
- Kernel.pbItemBall(items[0]) if @battlers[3].isFainted?
- elsif itemrnd<(chances[0]+chances[1])
- Kernel.pbItemBall(items[1]) if @battlers[3].isFainted?
- elsif itemrnd<(chances[0]+chances[1]+chances[2])
- Kernel.pbItemBall(items[2]) if @battlers[3].isFainted?
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement