Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. Whether a move scores a critical hit is determined by comparing a 1-byte random number (0 to 255) against a 1-byte threshold value (also 0 to 255); if the random number is less than the threshold, the Pokémon scores a critical hit. If the threshold value is T, then this means the probability (P) of scoring a critical hit is P = T / 256. (Note that this means it is impossible for a critical hit to be guaranteed; there will always be a 1/256 chance that a critical hit will not be scored.)
  2.  
  3. The value of T is based on a Pokémon's base Speed. For a normal move, T is half the base Speed:
  4.  
  5. T = BaseSpeed / 2 or P = BaseSpeed / 512
  6.  
  7. Due to a bug, Focus Energy and Dire Hit lower a Pokémon's chance of scoring a critical hit instead of raising it, dividing T by 4:
  8.  
  9. TFE = BaseSpeed / 8 or PFE = BaseSpeed / 2048
  10.  
  11. If the move being used has a high critical-hit ratio (Crabhammer, Karate Chop, Razor Leaf, or Slash), T is multiplied by 8:
  12.  
  13. THighCHR = BaseSpeed * 4 or PHighCHR = BaseSpeed / 64
  14.  
  15. Both effects may also be active at the same time. This would result in:
  16.  
  17. TFE+HighCHR = BaseSpeed or PFE+HighCHR = BaseSpeed / 256
  18.  
  19. At all times, the maximum value for T is 255 (which equally means the maximum value for P is 255/256). All operations that factor into T are also integer operations (meaning divisions are rounded down to the nearest whole number). (Note that the division in P = T / 256 is not rounded.) Due to the process the game uses to compute T, BaseSpeed is also effectively rounded down to the nearest even number.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement