Damage: Difference between revisions

204 bytes added ,  13 September 2022
(→‎Generation V onward: Simplified priority Z and Max Move cases)
Line 123: Line 123:
* ''Type'' is the {{DL|Type|type effectiveness}}. This can be 0.125, 0.25, 0.5 (not very effective); 1 (normally effective); 2, 4, or 8 (super effective), depending on both the move's and target's [[type]]s. The 0.125 and 8 can potentially be obtained on a Pokémon under the effect of {{m|Forest's Curse}} or {{m|Trick-or-Treat}}. If the target is under the effect of {{m|Tar Shot}} and the used move is {{type|Fire}}, multiply this by 2. If the used move is {{m|Struggle}} or [[typeless]] {{m|Revelation Dance}}, or the target is typeless, ''Type'' is always 1. Decimals are rounded down to the nearest integer.
* ''Type'' is the {{DL|Type|type effectiveness}}. This can be 0.125, 0.25, 0.5 (not very effective); 1 (normally effective); 2, 4, or 8 (super effective), depending on both the move's and target's [[type]]s. The 0.125 and 8 can potentially be obtained on a Pokémon under the effect of {{m|Forest's Curse}} or {{m|Trick-or-Treat}}. If the target is under the effect of {{m|Tar Shot}} and the used move is {{type|Fire}}, multiply this by 2. If the used move is {{m|Struggle}} or [[typeless]] {{m|Revelation Dance}}, or the target is typeless, ''Type'' is always 1. Decimals are rounded down to the nearest integer.
* ''Burn'' is 0.5 if the attacker is {{status|burned}}, its Ability is not {{a|Guts}}, and the used move is a [[physical move]] (other than {{m|Facade}} from [[Generation VI]] onward), and 1 otherwise.
* ''Burn'' is 0.5 if the attacker is {{status|burned}}, its Ability is not {{a|Guts}}, and the used move is a [[physical move]] (other than {{m|Facade}} from [[Generation VI]] onward), and 1 otherwise.
* ''other'' is 1 in most cases, and a different multiplier when specific interactions of moves, Abilities, or items take effect, in this order:
* ''other'' is 1 in most cases, and a different multiplier when specific interactions of moves, Abilities, or items take effect, in this order (and if multiple moves, Abilities, or items take effect, they do so in the order of the out-of-battle {{stat|Speed}} stats of the Pokémon with them):
{| class="roundy expandable" style="background:#{{White color}}; border: 3px solid #{{Red color}}"
{| class="roundy expandable" style="background:#{{White color}}; border: 3px solid #{{Red color}}"
!Effect
!Effect
Line 208: Line 208:
* ''ZMove'' is 0.25 if the move is a [[Z-Move]], [[Max Move]], or [[G-Max Move]] being used into a protection move ({{m|Protect}}, {{m|Detect}}, {{m|King's Shield}}, {{m|Spiky Shield}}, {{m|Mat Block}}, {{m|Baneful Bunker}}, or {{m|Obstruct}}), the move is {{m|Clangorous Soulblaze}} being used into {{m|Wide Guard}}, or the move is a Z-Move, Max Move, or G-Max Move given [[priority]] by {{a|Prankster}} or {{a|Gale Wings}} being used into {{m|Quick Guard}}, and 1 otherwise.
* ''ZMove'' is 0.25 if the move is a [[Z-Move]], [[Max Move]], or [[G-Max Move]] being used into a protection move ({{m|Protect}}, {{m|Detect}}, {{m|King's Shield}}, {{m|Spiky Shield}}, {{m|Mat Block}}, {{m|Baneful Bunker}}, or {{m|Obstruct}}), the move is {{m|Clangorous Soulblaze}} being used into {{m|Wide Guard}}, or the move is a Z-Move, Max Move, or G-Max Move given [[priority]] by {{a|Prankster}} or {{a|Gale Wings}} being used into {{m|Quick Guard}}, and 1 otherwise.


In the first four Generations, during the calculation, any operations are carried out on integers internally, such that effectively each division is a [[wp:Rounding#Rounding_to_integer|truncated integer division]] (rounding towards zero, cutting off any decimals), and any decimals are cut off after each multiplication operation. From [[Generation V]] onward, however, there are three different types of rounding; a simple decimal truncation (also known as flooring), standard rounding, but rounding down at 0.5, and standard rounding, but rounding up at 0.5. If the calculation yields 0, the move will deal 1 HP damage instead (unless ''Type'' is equal to 0); however, in Generation V, a move may deal 0 damage when ''other'' is less than 1, because the routine to prevent 0 damage is erroneously performed before applying the ''other'' factor.
In the first four Generations, during the calculation, any operations are carried out on integers internally, such that effectively each division is a [[wp:Rounding#Rounding_to_integer|truncated integer division]] (rounding towards zero, cutting off any decimals), and any decimals are cut off after each multiplication operation. From [[Generation V]] onward, however, there are three different types of rounding; a simple decimal truncation (also known as flooring), standard rounding, but rounding down at 0.5, and standard rounding, but rounding up at 0.5. If the calculation yields 0, the move will deal 1 HP damage instead (unless ''Type'' is equal to 0, in which case damage calculation is skipped entirely); however, in Generation V, a move may deal 0 damage when ''other'' is less than 1, because the routine to prevent 0 damage is erroneously performed before applying the ''other'' factor.


===Example===
===Example===