Author: Tom
Posted: 30 Nov 2012 02:27:58 am (GMT -5)
I have coded many pokemon games, and here are the catch mechanics i use in all my pokemon games. The pokeballs must shake 3 times. The math done here is 40+H/2-C-S-G-(1/M) If the result if below 0 it sets it to 0%
H= Health
C= Condition (SLP=10 PAR=7 PSN=4 FRZ=15 BRN=4)
S= Times the pokeball has been shaken (0= 0 1st=5 2nd=10 3rd=15) The pokemon can break free before the pokeball has a chance to shake thats why i have the 0 time in there.
G= Pokeball grade (Pokeball = 0 Greatball = 10 Ultraball = 20)
M= Masterball? (If false then return 1 if true return 0) If M=0 then the math is impossible because you can't divide by 0 so an exception handler sets the chances of it breaking free to 0%
So if the pokemon has 20 health and is frozen and a Ultraball is used then:
0 Time: 40+(20/2)-15-0-20-1= 14%
1 Time: 40+(20/2)-15-5-20-1= 9%
2 Time: 40+(20/2)-15-10-20-1= 4%
3 Time: 40+(20/2)-15-15-20-1= -1% (Exception handler sets to 0%)
All that creates almost real pokemon physics. If you want to make it harder increase the value 40 on the formula.
Posted: 30 Nov 2012 02:27:58 am (GMT -5)
I have coded many pokemon games, and here are the catch mechanics i use in all my pokemon games. The pokeballs must shake 3 times. The math done here is 40+H/2-C-S-G-(1/M) If the result if below 0 it sets it to 0%
H= Health
C= Condition (SLP=10 PAR=7 PSN=4 FRZ=15 BRN=4)
S= Times the pokeball has been shaken (0= 0 1st=5 2nd=10 3rd=15) The pokemon can break free before the pokeball has a chance to shake thats why i have the 0 time in there.
G= Pokeball grade (Pokeball = 0 Greatball = 10 Ultraball = 20)
M= Masterball? (If false then return 1 if true return 0) If M=0 then the math is impossible because you can't divide by 0 so an exception handler sets the chances of it breaking free to 0%
So if the pokemon has 20 health and is frozen and a Ultraball is used then:
0 Time: 40+(20/2)-15-0-20-1= 14%
1 Time: 40+(20/2)-15-5-20-1= 9%
2 Time: 40+(20/2)-15-10-20-1= 4%
3 Time: 40+(20/2)-15-15-20-1= -1% (Exception handler sets to 0%)
All that creates almost real pokemon physics. If you want to make it harder increase the value 40 on the formula.