Damage: Difference between revisions

no edit summary
(It's safe to take for granted that ignorable Abilities are not applied when they are ignored (or suppressed). It would only be worth mentioning if they _were_ applied despite being ignored.)
No edit summary
Line 107: Line 107:


===[[Generation V]] onward===
===[[Generation V]] onward===
Unless otherwise specified, all divisions and multiplications past the initial base damage calculation are rounded to the nearest integer if the result is not an integer (rounding down at 0.5).
:<math>\text{Damage} = \left(\frac{\left( \frac{2 \times \text{Level}}{5} + 2\right) \times \text{Power} \times\frac{A}{D}}{50} + 2\right) \times \text{Targets} \times \text{PB} \times \text{Weather} \times \text{GlaiveRush} \times \text{Critical} \times \text{random} \times \text{STAB} \times \text{Type} \times \text{Burn} \times \text{other} \times \text{ZMove} \times \text{TeraShield}</math>
:<math>\text{Damage} = \left(\frac{\left( \frac{2 \times \text{Level}}{5} + 2\right) \times \text{Power} \times\frac{A}{D}}{50} + 2\right) \times \text{Targets} \times \text{PB} \times \text{Weather} \times \text{GlaiveRush} \times \text{Critical} \times \text{random} \times \text{STAB} \times \text{Type} \times \text{Burn} \times \text{other} \times \text{ZMove} \times \text{TeraShield}</math>


where (and unless specified otherwise, all divisions and multiplications past the initial base damage calculation are subject to standard rounding, rounding down at 0.5, if necessary)
where


* ''Level'' is the [[level]] of the attacking Pokémon.
* ''Level'' is the [[level]] of the attacking Pokémon.
Line 225: Line 227:
|1 + (819/4096 (~0.2) per successful consecutive use of the same move) if held by the attacker, but no more than 2
|1 + (819/4096 (~0.2) per successful consecutive use of the same move) if held by the attacker, but no more than 2
|}
|}
:If multiple effects influence the ''other'' value, their values stack multiplicatively, in the order listed above. This is done by starting at 4096, multiplying it by each number above in the order listed above, and whenever there is a decimal, standard rounding it and rounding up at 0.5. When the final value is obtained, it is divided by 4096, and this becomes ''other''. For example, if both {{a|Multiscale}} and a [[Chilan Berry]] take effect, ''other'' is <math>\frac{4096 \times 0.5 \times 0.5}{4096}</math> = 0.25.
:If multiple effects influence the ''other'' value, their values stack multiplicatively, in the order listed above. This is done by starting at 4096, multiplying it by each number above in the order listed above, and rounding to the nearest integer whenever the result is not an integer (rounding up at 0.5). When the final value is obtained, it is divided by 4096, and this becomes ''other''. For example, if both {{a|Multiscale}} and a [[Chilan Berry]] take effect, ''other'' is <math>\frac{4096 \times 0.5 \times 0.5}{4096}</math> = 0.25.
* ''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}}, {{m|Obstruct}}, or {{m|Silk Trap}}, or potentially {{m|Wide Guard}} or {{m|Quick Guard}} if the move has multiple targets or is given priority, respectively; if the move triggers the "couldn't fully protect" message, the multiplier will be applied), 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}}, {{m|Obstruct}}, or {{m|Silk Trap}}, or potentially {{m|Wide Guard}} or {{m|Quick Guard}} if the move has multiple targets or is given priority, respectively; if the move triggers the "couldn't fully protect" message, the multiplier will be applied), and 1 otherwise.
* ''TeraShield'' is applied in [[Tera Raid Battle]]s when the Raid boss's shield is active, and is 0.2 if the player's Pokémon is not [[Terastal phenomenon|Terastallized]], 0.35 if it is but the used move is not of its Tera Type, and 0.75 if it is and the used move is of its Tera Type. The result is subject to standard rounding, rounding up at 0.5.
* ''TeraShield'' is applied in [[Tera Raid Battle]]s when the Raid boss's shield is active. It is 0.2 if the player's Pokémon is not [[Terastal phenomenon|Terastallized]], 0.35 if it is but the used move is not of its Tera Type, and 0.75 if it is and the used move is of its Tera Type. The result is subject to standard rounding (rounding up at 0.5).
 
In the first four generations, during the calculation, all operations are carried out on integers internally—this means that all division operations are [[wp:Rounding#Rounding to integer|truncated integer division]] (i.e. rounding down if the result is not an integer), and the results of multiplication operations are rounded down afterwards (truncating any fractional part). From [[Generation V]] onward, there are three different types of rounding; a {{wp|Floor (function)|flooring}} (the same as previous generations), rounding to the nearest integer while rounding down at 0.5, and rounding to the nearest integer while rounding up at 0.5.


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.
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===
Line 236: Line 240:
:<math>
:<math>
\begin{align}
\begin{align}
Damage & = \left(\frac{\left( \frac{2 \times 75}{5} + 2\right) \times 65 \times 123 / 163}{50} + 2\right) \times 1 \times 1 \times 1 \times 1 \times (rand \in [0.85,1.00]) \times 1.5 \times 4 \times 1 \times 1\\
Damage &= \left(\frac{\left( \frac{2 \times 75}{5} + 2\right) \times 65 \times 123 / 163}{50} + 2\right) \times 1 \times 1 \times 1 \times 1 \times (rand \in [0.85,1.00]) \times 1.5 \times 4 \times 1 \times 1\\
& = rand \in [168,196]  
& = rand \in [168,196]  
\end{align}
\end{align}
Line 247: Line 251:
:<math>
:<math>
\begin{align}
\begin{align}
Damage & = \left(\frac{\left( \frac{2 \times 75}{5} + 2\right) \times 71 \times 123 / 163}{50} + 2\right) \times 1 \times 1 \times 1 \times 1.5 \times (rand \in [0.85,1.00]) \times 1.5 \times 4 \times 1 \times 1 \\
Damage &= \left(\frac{\left( \frac{2 \times 75}{5} + 2\right) \times 71 \times 123 / 163}{50} + 2\right) \times 1 \times 1 \times 1 \times 1.5 \times (rand \in [0.85,1.00]) \times 1.5 \times 4 \times 1 \times 1 \\
&= rand \in [268,324]
&= rand \in [268,324]
\end{align}
\end{align}
Line 274: Line 278:
** Splinter damage (from {{m|Ceaseless Edge}}, {{m|Pin Missile}}, {{m|Spikes}}, {{m|Stealth Rock}} and {{m|Stone Axe}}) is not subject to this factor.<!--Works like Gen I's Bind-->
** Splinter damage (from {{m|Ceaseless Edge}}, {{m|Pin Missile}}, {{m|Spikes}}, {{m|Stealth Rock}} and {{m|Stone Axe}}) is not subject to this factor.<!--Works like Gen I's Bind-->
* <math>Type</math> is the {{DL|Type|type effectiveness}}. This can be 0.4, 0.5 (not very effective); 1 (normally effective); 2, or 2.5 (super effective), depending on both the move's and target's [[type]]s.
* <math>Type</math> is the {{DL|Type|type effectiveness}}. This can be 0.4, 0.5 (not very effective); 1 (normally effective); 2, or 2.5 (super effective), depending on both the move's and target's [[type]]s.
* <math>Weather</math> is 0.75 if a Fire-type move is used during rain, and 1 otherwise. The result is subject to standard rounding, rounding down at 0.5.
* <math>Weather</math> is 0.75 if a Fire-type move is used during rain, and 1 otherwise. The result is rounded to the nearest integer (rounding down at 0.5).
* <math>Critical</math> is 1.5 for a critical hit, and 1 otherwise.
* <math>Critical</math> is 1.5 for a critical hit, and 1 otherwise.
* <math>STAB</math> is the [[same-type attack bonus]]. This is equal to 1.25 if the move's [[type]] matches any of the user's types, and 1 otherwise. The result is subject to standard rounding, rounding down at 0.5.
* <math>STAB</math> is the [[same-type attack bonus]]. This is equal to 1.25 if the move's [[type]] matches any of the user's types, and 1 otherwise. The result is rounded to the nearest integer (rounding down at 0.5).
* <math>BurnFrostbite</math> is 0.5 if the attacker is [[burn]]ed and the used move is [[physical]], or if the attacker is [[frostbite|frostbitten]] and the used move is [[special]], and 1 otherwise.
* <math>BurnFrostbite</math> is 0.5 if the attacker is [[burn]]ed and the used move is [[physical]], or if the attacker is [[frostbite|frostbitten]] and the used move is [[special]], and 1 otherwise.
* <math>Drowsy</math> is 1.33 if the target is [[drowsy]], and 1 otherwise.
* <math>Drowsy</math> is 1.33 if the target is [[drowsy]], and 1 otherwise.