Accuracy: Difference between revisions

73 bytes removed ,  9 August 2020
Writing a proper section on accuracy checks
(Moving from Statistic)
(Writing a proper section on accuracy checks)
Line 1: Line 1:
{{move|Move accuracy}}
{{move|Move accuracy}}
{{samename|in-battle stat|Statistic#Accuracy|Statistic → Accuracy}}
{{samename|in-battle stat|Statistic#Accuracy|Statistic → Accuracy}}
'''Accuracy''' (Japanese: '''めいちゅう''' ''accuracy'') is an aspect of [[move]]s that, in conjunction with the user's in-battle {{stat|accuracy}} stat and the target's {{stat|evasion}} stat, determines how reliable they can hit their target. Although the concept was introduced in [[Generation I]], a move's accuracy was not displayed until [[Generation III]].  
'''Accuracy''' (Japanese: '''めいちゅう''' ''accuracy'') is property of [[move]]s that, in conjunction with the user's in-battle {{stat|accuracy}} stat and the target's {{stat|evasion}} stat, determines how likely a move is to hit.
 
Move accuracy exists in all [[core series]] Pokémon games, but was not displayed in-game until [[Generation III]].


A move's accuracy can be any number from 1-100, reflecting the probability of the move being successful as a percentage (if neither {{stat|accuracy}} nor {{stat|evasion}} are modified in-battle). Currently, however, only multiples of 5 between 30 and 100 (inclusive) are used.
A move's accuracy can be any number from 1-100, reflecting the probability of the move being successful as a percentage (if neither {{stat|accuracy}} nor {{stat|evasion}} are modified in-battle). Currently, however, only multiples of 5 between 30 and 100 (inclusive) are used.
Line 9: Line 11:
==In the core series games==
==In the core series games==
===Accuracy check===
===Accuracy check===
====Generations I and II====
When a Pokémon uses a move that can target opponents (even if it targets an ally), except when using a [[:Category:Moves that cannot miss|move that cannot miss]], the game performs an accuracy check to determine if the move hits each of its targets.
Whether a move hits depends on the formula:
 
Moves with 100% still perform an accuracy check. This is necessary because these moves can miss if the user's {{stat|accuracy}} is lowered or the target's {{stat|evasion}} is increased.
 
====Generation I and II====
Whether a move hits is determined by the modified move accuracy with a random number.
 
The modified move accuracy ''A'' is an integer that is at least 1 and at most 255. It is calculated as follows:


  T = Accuracy<sub>move</sub> * Accuracy<sub>user</sub> * Evasion<sub>target</sub> - BrightPowder
  A = Accuracy<sub>move</sub> * Accuracy<sub>user</sub> * Evasion<sub>target</sub> - BrightPowder


Where...
Where...
* ''T'' is the computed threshold value that will determine whether the move will hit, always at least 1 and at most 255,
* ''Accuracy<sub>move</sub>'' is the move's accuracy, a value from 0 to 255,
* ''Accuracy<sub>move</sub>'' is the move's [[accuracy]], a value from 0 to 255,
* ''Accuracy<sub>user</sub>'' is the accuracy [[Statistic#Stage multipliers|stage multiplier]] of the user,
* ''Accuracy<sub>user</sub>'' is the accuracy [[#Stage multipliers|stage multiplier]] of the user,
* ''Evasion<sub>target</sub>'' is the evasion stage multiplier of the target, and
* ''Evasion<sub>target</sub>'' is the evasion stage multiplier of the target, and
* ''BrightPowder'' is 20 if the user is [[held item|holding]] [[Bright Powder|BrightPowder]] (in Generation II) or 0 otherwise.
* ''BrightPowder'' is 20 if the user is [[held item|holding]] [[Bright Powder|BrightPowder]] (only applicable in Generation II), or 0 otherwise.


The game then selects a random number ''r'' from 0 to 255 and compares it to ''T'' to determine whether the move hits.
The random number ''R'' is a [[Pseudorandom number generation in Pokémon|pseudorandomly]] generated integer between 0 and 255 (inclusive). In {{eng|Pokémon Stadium}} only, it is a between 0 and 254 (inclusive).


In Generation I, if ''r'' is less than ''T'', the move hits. This results in a bug where no move can be guaranteed to hit (excluding {{m|Bide}} and {{m|Swift}}) since even if ''T'' is 255, if ''r'' is also 255, the move will miss.
In the Generation I handheld games and Pokémon Stadium, if ''R'' is strictly less than ''A'', the move hits, otherwise it misses. In the Generation I handheld games only, this results in a bug where, unless the accuracy check is skipped entirely, every move has at least a 1 in 256 chance to miss—this is because if ''R'' is 255, it will always be greater than or equal to ''A'' regardless of the value of ''A''. In Pokémon Stadium, because ''R'' is never equal to 255, this bug does not occur.


In Generation II, if ''T'' is 255 or else if ''r'' is less than ''T'', the move hits. This eliminates the bug from Generation I.
In Generation II, if ''A'' is equal to 255, the game never generates a random number at all and the move is guarenteed to hit. Otherwise, if ''R'' is strictly less than ''A'', the move hits, otherwise it misses.
 
=====Special misses=====
In all Generation I and II games, except the Western versions of {{game2|Red|Blue|Yellow}}, {{cat|HP-draining moves}} always miss when used on a Pokémon that is behind a {{m|substitute}}.
 
Moves always a miss a Pokémon that is in the semi-invulnerable turn of {{m|Fly}} or {{m|Dig}}, except {{cat|moves that cannot miss}}. In the Japanese version of the Generation I handheld games, due to a bug, even moves that cannot miss will miss when used against a Pokémon that is in the semi-invulnerable turn of a move, unless that target is behind a substitute.


====Generations III onward====
====Generations III onward====
Whether a move hits depends on the formula:
Whether a move hits depends on the formula:


  T = Accuracy<sub>move</sub> * Adjusted_stages * Other_mods
  A = Accuracy<sub>move</sub> * Adjusted_stages * Other_mods


Where...
Where...
* ''T'' is the computed threshold value that will determine whether the move will hit,
* ''A'' is the computed threshold value that will determine whether the move will hit,
* ''Accuracy<sub>move</sub>'' is the move's [[accuracy]], a value from 1 to 100 (internally, 0 is also a valid value, but this is displayed as "&mdash;" and means that the move ignores accuracy checks),
* ''Accuracy<sub>move</sub>'' is the move's accuracy, a value from 1 to 100 (internally, 0 is also a valid value, but this is displayed as "&mdash;" and means that the move ignores accuracy checks),
* ''Adjusted_stages'' is the equivalent accuracy [[#Stage multipliers|stage multiplier]] of the user after the target's evasion stage is subtracted from the user's accuracy stage, both possibly modified by Ability or move effects such as {{a|Simple}} or {{m|Foresight}} (to no less than -6 and no more than 6 after the subtraction), and
* ''Adjusted_stages'' is the equivalent accuracy [[#Stage multipliers|stage multiplier]] of the user after the target's evasion stage is subtracted from the user's accuracy stage, both possibly modified by Ability or move effects such as {{a|Simple}} or {{m|Foresight}} (to no less than -6 and no more than 6 after the subtraction), and
* ''Other_mods'' encompasses all multipliers from other accuracy or evasion modifiers from Ability effects, [[fog]], move effects, and item effects (as can be seen in the table in the following section), serially applied.
* ''Other_mods'' encompasses all multipliers from other accuracy or evasion modifiers from Ability effects, [[fog]], move effects, and item effects (as can be seen in the table in the following section), serially applied.


The game then selects a random number ''r'' from 1 to 100 and compares it to ''T'' to determine whether the move hits. If ''r'' is less than or equal to ''T'', the move hits.
The game then selects a random number ''R'' from 1 to 100 and compares it to ''A'' to determine whether the move hits. If ''R'' is less than or equal to ''A'', the move hits.
 
===1/256 miss glitch===
In the [[Generation I]] handheld games, moves with 100% accuracy have a chance to miss if neither {{stat|accuracy}} nor {{stat|evasion}} stats are modified, due to accuracy being internally stored as a single byte ranging from 0 to 255, and the probability of a move hitting being determined by comparing a randomly generated byte to the accuracy value, with the move hitting if it was less and missing if it was equal or greater. There is therefore a 1/256 chance of the randomly generated byte being equal to 255, which can never be less than even the highest possible accuracy value, causing moves intended to be 100% accurate to miss 1/256 of the time (yielding an effective accuracy of about 99.6%). {{m|Swift}} is unaffected in non-Japanese games, as it automatically skips all accuracy checks (including the invulnerability effects of {{m|Fly}} and {{m|Dig}}) and thus truly has 100% accuracy. A similar bug also applied to [[critical hit]]s.
 
The bug was partially fixed in {{g|Stadium}} by allowing the move to hit if the random byte is either less than the accuracy value or exactly equal to 255; this fix effectively causes every move in the game to hit 1/256 more often than indicated. The fix does not apply to critical hits, which are still capped at a 255/256 probability. In [[Generation II]], the glitch was entirely fixed by removing the extra check and instead allowing moves calculated to have 100% accuracy (after applying all modifiers) to skip the random byte generation entirely, and by introducing new critical hit mechanics.


==In the Pokémon Mystery Dungeon series==
==In the Pokémon Mystery Dungeon series==