Advertisement
stringflow

[Fire Red Round 2] Safari Mechanics

Mar 19th, 2020
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. all of this assumes integer math
  2.  
  3. at the start of the encounter:
  4. - safariGoNearCounter is initialized to 0
  5. - safariPkblThrowCounter is initialized to 0
  6. - safariCatchFactor is initialized to catch rate * 100 / 1275
  7. - safariEscapeFactor is initialized to flee rate * 100 / 1275
  8. - if safariEscapeFactor <= 1, safariEscapeFactor is set to 2
  9.  
  10. before your turn it is decided whether or not the pokemon will run:
  11. - if safariGoNearCounter > 0
  12. - safariFleeRate is set to safariEscapeFactor * 2
  13. - if safariFleeRate > 20, then safariFleeRate is set to 20
  14. - else if safariPkblThrowCounter > 0
  15. - safariFleeRate is set to safariEscapeFactor / 4
  16. - if safariEscapeFactor == 0, then safariEscapeFactor is set to 1
  17. - else
  18. - safariFleeRate is set to safariEscapeFactor
  19. - safariFleeRate is multiplied by 5
  20. - if a random number between 0 and 99 is less than safariFleeRate it runs, otherwise it doesn't
  21.  
  22. every time a rock is thrown:
  23. - safariPkblThrowCounter is set to 0
  24. - safariGoNearCounter is increased by 2 + a random value between 0 and 4
  25. - if safariGoNearCounter > 6, then safariGoNearCounter is set to 6
  26. - safariCatchFactor is bitshifted left by 1, essentially multiplied by 2
  27. - if safariCatchFactor > 20, then safariCatchFactor is set to 20
  28.  
  29. every time a bait is thrown:
  30. - safariGoNearCounter is set to 0
  31. - safariPkblThrowCounter is increased by 2 + a random value between 0 and 4
  32. - if safariPkblThrowCounter > 6, then safariPkblThrowCounter is set to 6
  33. - safariCatchFactor is bitshifted right by 1, essentially divided by 2
  34. - if safariCatchFactor <= 2, then safariCatchFactor is set to 3
  35.  
  36. every time the pokemon doesn't run:
  37. - if safariGoNearCounter != 0
  38. - safariGoNearCounter is decreased by 1
  39. - if it reached 0, safariCatchFactor is reset to its initial state (catch rate * 100 / 1275)
  40. - else if safariPkblThrowCounter != 0
  41. - safariPkblThrowCounter is decreased by 1
  42. - NOTE: no resetting of safariCatchFactor if reached 0
  43.  
  44. in the catch formula:
  45. - when using a safari ball, catch rate is set to safariCatchFactor * 1275 / 100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement