Did the first-generation capture algorithm. The things I would give for the word "divide". Although really the biggest source of obfuscation here is the lack of any actual Pokémon-related words; I can't just say "Marowak" or "Great Ball" and instead have to talk around it in a ridiculous way.
When you throw a ball, the game does some things one after another. Here are the things it does:
1. If the pocket animal to be caught is the one found dead at the top of the tall pocket animal building in the sad town, it won't be caught.
2. If the ball thrown is the ball that always catches the pocket animal, the pocket animal will always be caught.
3. If not, then make a number that we can call the ball number. The ball number can be any of the numbers from 0 to another number. The highest possible number can change if you throw different balls. If you throw the worst kind of ball, the highest possible number is 255. If you throw a slightly better kind of ball, the highest possible number is 200. If you throw the best kind of ball that doesn't always catch the pocket animal, the highest possible number is 150.
4. Make another number that means the state of the pocket animal. If it is asleep or iced, the state number is 25. If it is sick or can't move well, the state number is 12. If the pocket animal is fine, the state number is 0.
5. Make another number, the new ball number, that's the ball number with the state number taken away from it.
6. If the new ball number is less than nothing, the pocket animal will be caught.
7. If not, then make another number called the hit point number. You make that number like this:
1. Take the number of hit points the pocket animal has when it's okay times 255.
2. If you used the second worst kind of ball, take the highest number you could take 8 times and get something lower than the number before, and make that be the hit point number. If you used any other kind of ball, take the highest number you could take 12 times and get something lower than the number before, and make that be the hit point number.
3. Take the highest number you could take four times and get something lower than the hit points the pocket animal has now. If this number is more than nothing, then take the highest number you could take that number of times and get something lower than the hit point number you had before, and then make that the hit point number.
4. If the hit point number is more than 255, then make the hit point number 255.
8. If the catch number of the kind of pocket animal that you're trying to catch is less than the new ball number, then it won't be caught.
9. Make a number that we can call the hit point check number. This number can be any of the numbers from 0 to 255.
10. If the hit point check number is less than or the same as the hit point number, the pocket animal will be caught.
11. If not, then it won't be caught. The game will show the ball either missing, shaking once, shaking two times or shaking three times. Here is how it decides how many shakes to show:
1. Take the pocket animal's catch number times 100 and call that the shake number.
2. Take the highest possible number for the ball number that I told you about in step 3, and take the highest number that you could take that number of times and get something less than the shake number. Then make that the new shake number.
3. If the shake number is more than 255, the ball will shake three times.
4. If not, take the shake number times the hit point number that you made above and make that the new shake number.
5. Take the highest number that you could take 255 times and get something less than the shake number, and make that the new shake number.
6. If the pocket animal is asleep or iced, then add 10 to the shake number. If it is sick or can't move well, then add 5 to the shake number.
7. If the shake number is less than 10, the ball misses. If the shake number is 10 or more but less than 30, the ball shakes once. If the shake number is 30 or more but less than 70, the ball shakes two times. If the shake number if 70 or more, the ball shakes three times.