- 85
- Posts
- 7
- Years
- Seen Nov 24, 2023
I want to make a pokeball that has a 100% catch rate on a pokemon that hasn't been recorded in the pokedex yet, but will always fail if it was already recorded. Here is the code that I have:
This doesn't crash the game, but it seems to act more like a normal pokeball when I use it in battle regardless on wheter I use it on a pokemon that I've already encountered or not.
Can anyone help me out?
Code:
BallHandlers::ModifyCatchRate.add(:BALL,proc{|ball,catchRate,battle,battler|
if battle.pbPlayer.seen[battler.species]
next (catchRate*0).floor
else
next true
end
})
This doesn't crash the game, but it seems to act more like a normal pokeball when I use it in battle regardless on wheter I use it on a pokemon that I've already encountered or not.
Can anyone help me out?