Hidden Power (move)/Calculation: Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
(→‎Generation III onward: Changed example of Hidden Power type and power calculation from Generation III onward)
Tags: Mobile edit Mobile web edit
m (why change the example when the template is specifically designed with an example pokemon in mind?)
Tag: Undo
Line 15: Line 15:
==Generation II==
==Generation II==
===Type===
===Type===
Consider an example Pokémon, like Shellder with this set of IVs:
Consider an example Pokémon, like Pikachu with this set of IVs:


{{Hidden Power calculation/II|12|10|10|13|8}}
{{Hidden Power calculation/II|14|15|15|15|14}}


The type is determined by taking the two {{wp|least significant bit}}s of the Attack and Defense IVs, then {{wp|Concatenation|concatenating}} these two values in that order.
The type is determined by taking the two {{wp|least significant bit}}s of the Attack and Defense IVs, then {{wp|Concatenation|concatenating}} these two values in that order.
Line 82: Line 82:
<math>
<math>
\begin{align}
\begin{align}
HP_{type} & = 4 \times 10 \bmod 4 + 10 \bmod 4 \\
HP_{type} & = 4 \times 15 \bmod 4 + 15 \bmod 4 \\
& = 4 \times 2 + 2 \\
& = 4 \times 3 + 3 \\
& = 8 + 2 \\
& = 12 + 3 \\
& = 10
& = 15
\end{align}
\end{align}
</math>
</math>


Since this value is equal to 10, per the table above, this means that our Shellder has a {{type|Grass}} {{m|Hidden Power}}.
Since this value is equal to 15, per the table above, this means that our Pikachu has a {{type|Dark}} {{m|Hidden Power}}.


===Power===
===Power===
Line 107: Line 107:
In our example, we get:
In our example, we get:


{{Hidden Power calculation/II|12<br>''N/A''|10<br>''1''|10<br>''1''|13<br>''1''|8<br>''1''}}
{{Hidden Power calculation/II|14<br>''N/A''|15<br>''1''|15<br>''1''|15<br>''1''|14<br>''1''}}


<math>
<math>
\begin{align}
\begin{align}
HP_{power} & = \bigg\lfloor \frac{5 \times (1 + 2 \cdot 1 + 4 \cdot 1 + 8 \cdot 1) + 0}{2}\bigg\rfloor + 31 \\
HP_{power} & = \bigg\lfloor \frac{5 \times (1 + 2 \cdot 1 + 4 \cdot 1 + 8 \cdot 1) + 2}{2}\bigg\rfloor + 31 \\
& = \bigg\lfloor \frac{5 \times (1 + 2 + 4 + 8)}{2}\bigg\rfloor + 31 \\
& = \bigg\lfloor \frac{5 \times (1 + 2 + 4 + 8) + 2}{2}\bigg\rfloor + 31 \\
& = \bigg\lfloor \frac{5 \times 15}{2}\bigg\rfloor + 31 \\
& = \bigg\lfloor \frac{5 \times 15 + 2}{2}\bigg\rfloor + 31 \\
& = \bigg\lfloor \frac{75}{2}\bigg\rfloor + 31 \\
& = \bigg\lfloor \frac{75 + 2}{2}\bigg\rfloor + 31 \\
& = \lfloor 37.5 \rfloor + 31 \\
& = \bigg\lfloor \frac{77}{2}\bigg\rfloor + 31 \\
& = 37 + 31 \\
& = \lfloor 38.5 \rfloor + 31 \\
& = 68
& = 38 + 31 \\
& = 69
\end{align}
\end{align}
</math>
</math>


Which means that our Shellder's Hidden Power's power is '''68'''.
Which means that our Pikachu's Hidden Power's power is '''69'''.


{{Hidden Power calculation/II|12|10|10|13|8}}
{{Hidden Power calculation/II|14|15|15|15|14}}
{| class="roundy" style="width: 650px; border: 2px solid #{{Grass color light}}"  
{| class="roundy" style="width: 650px; border: 2px solid #{{Dark color light}}"  
|- style="text-align: center; color: #FFF"
|- style="text-align: center; color: #FFF"
| style="width: 33%; background: #{{Grass color}}; {{roundyleft|10px}}" | {{mcolor|Hidden Power|FFF}}:
| style="width: 33%; background: #{{Dark color}}; {{roundyleft|10px}}" | {{mcolor|Hidden Power|FFF}}:
| style="background: #{{Grass color}}" | Type:<br>'''{{tcolor|Grass|FFF}}'''
| style="background: #{{Dark color}}" | Type:<br>'''{{tcolor|Dark|FFF}}'''
| style="background: #{{Grass color}}; {{roundyright|10px}}" | Power:<br>'''68'''
| style="background: #{{Dark color}}; {{roundyright|10px}}" | Power:<br>'''69'''
|}
|}


Line 137: Line 138:
==Generation III onward==
==Generation III onward==
===Type===
===Type===
Consider an Unown with this set of IVs:
Consider an example Pokémon, like Pikachu with this set of IVs:


{{Hidden Power calculation/IV|25|2|12|17|5|8|201Unown.png{{!}}100px}}
{{Hidden Power calculation/IV|30|31|31|31|30|31|025Pikachu.png{{!}}100px}}


Hidden Power's type of a Pokémon with given IVs is represented by a number, calculated with this formula:
Hidden Power's type of a Pokémon with given IVs is represented by a number, calculated with this formula:
Line 212: Line 213:
In our example, we get:
In our example, we get:


{{Hidden Power calculation/IV|25<br>''1''|2<br>''0''|12<br>''0''|17<br>''1''|5<br>''1''|8<br>''0''|201Unown.png{{!}}100px}}
{{Hidden Power calculation/IV|30<br>''0''|31<br>''1''|31<br>''1''|31<br>''1''|30<br>''0''|31<br>''1''|025Pikachu.png{{!}}100px}}


<math>
<math>
\begin{align}
\begin{align}
HP_{type} & = \left\lfloor \frac{(1 \cdot 1 + 2 \cdot 0 + 4 \cdot 0 + 8 \cdot 1 + 16 \cdot 1 + 32 \cdot 0) \times 15}{63}\right\rfloor \\
HP_{type} & = \left\lfloor \frac{(1 \cdot 0 + 2 \cdot 1 + 4 \cdot 1 + 8 \cdot 1 + 16 \cdot 0 + 32 \cdot 1) \times 15}{63}\right\rfloor \\
& = \left\lfloor \frac{(1 + 0 + 0 + 8 + 16 + 0) \times 15}{63}\right\rfloor \\
& = \left\lfloor \frac{(0 + 2 + 4 + 8 + 0 + 32) \times 15}{63}\right\rfloor \\
& = \left\lfloor \frac{25 \times 15}{63}\right\rfloor \\
& = \left\lfloor \frac{46 \times 15}{63}\right\rfloor \\
& = \left\lfloor \frac{375}{63}\right\rfloor & \bigg(\frac{690}{63} \approx 5.952\bigg)\\
& = \left\lfloor \frac{690}{63}\right\rfloor & \bigg(\frac{690}{63} \approx 10.952\bigg)\\
& = 5
& = 10
\end{align}
\end{align}
</math>
</math>


Which means that our Unown has a {{type|Bug}} {{m|Hidden Power}}.
Which means that our Pikachu has a {{type|Grass}} {{m|Hidden Power}}.


===Damage===
===Damage===
Line 240: Line 241:
In our example, we get:
In our example, we get:


{{Hidden Power calculation/IV|25<br>''0''|2<br>''1''|12<br>''0''|17<br>''0''|5<br>''0''|8<br>''0''|201Unown.png{{!}}100px}}
{{Hidden Power calculation/IV|30<br>''1''|31<br>''1''|31<br>''1''|31<br>''1''|30<br>''1''|31<br>''1''|025Pikachu.png{{!}}100px}}


<math>
<math>
\begin{align}
\begin{align}
HP_{power} &= \left\lfloor \frac{(1 \cdot 0 + 2 \cdot 1 + 4 \cdot 0 + 8 \cdot 0 + 16 \cdot 0 + 32 \cdot 0) \times 40}{63}\right\rfloor + 30 \\
HP_{power} &= \left\lfloor \frac{(1 \cdot 1 + 2 \cdot 1 + 4 \cdot 1 + 8 \cdot 1 + 16 \cdot 1 + 32 \cdot 1) \times 40}{63}\right\rfloor + 30 \\
&= \left\lfloor \frac{(0 + 2 + 0 + 0 + 0 + 0) \times 40}{63}\right\rfloor + 30 \\
&= \left\lfloor \frac{(1 + 2 + 4 + 8 + 16 + 32) \times 40}{63}\right\rfloor + 30 \\
&= \left\lfloor \frac{2 \times 40}{63}\right\rfloor + 30 \\
&= \left\lfloor \frac{63 \times 40}{63}\right\rfloor + 30 \\
&= \left\lfloor \frac{80}{63}\right\rfloor + 30 \\
&= \left\lfloor \frac{2520}{63}\right\rfloor + 30 \\
&= \lfloor 1 \rfloor + 30 \\
&= \lfloor 40 \rfloor + 30 \\
&= 1 + 30 \\
&= 40 + 30 \\
&= 31 \\
&= 70 \\
\end{align}
\end{align}
</math>
</math>


Which means that our Unown's Hidden Power's power is '''31'''.
Which means that our Pikachu's Hidden Power's power is '''70'''


{{Hidden Power calculation/IV|25|2|12|17|5|8|201Unown.png{{!}}100px}}{{-}}
{{Hidden Power calculation/IV|30|31|31|31|30|31|025Pikachu.png{{!}}100px}}{{-}}
{| class="roundy" style="width: 650px; border: 2px solid #{{Bug color light}}"  
{| class="roundy" style="width: 650px; border: 2px solid #{{Grass color light}}"  
|- style="text-align: center"
|- style="text-align: center"
| style="width: 33%; background: #{{Bug color}}; {{roundyleft|10px}}" | {{mcolor|Hidden Power|000}}:
| style="width: 33%; background: #{{Grass color}}; {{roundyleft|10px}}" | {{mcolor|Hidden Power|000}}:
| style="background: #{{Bug color}}" | Type:<br>'''{{tcolor|Bug|000}}'''
| style="background: #{{Grass color}}" | Type:<br>'''{{tcolor|Grass|000}}'''
| style="background: #{{Bug color}}; {{roundyright|10px}}" | Power:<br>'''31'''
| style="background: #{{Grass color}}; {{roundyright|10px}}" | Power:<br>'''70'''
|}
|}



Revision as of 15:38, 11 December 2023

Main article: Hidden Power (move)

In the Pokémon games, Hidden Power is a Normal-type move when the type is displayed, such as in battle and on status screens. However, the actual type of Hidden Power is determined by the Pokémon's individual values, and through calculation, can be set as one of other natural types. In Generations II to V, Hidden Power's base power is also determined by the Pokémon's individual values; in Generation II, it ranges from 31 to 70, while in Generation III to V, it ranges from 30 to 70. From Generation VI onward, Hidden Power's base power is always 60.

The type of Hidden Power can be checked in certain locations in the games by talking to certain NPCs. These NPCs will refuse to tell the player the Hidden Power type of a Pokémon unless it can learn the move via level up or TM (even if it knows Hidden Power at the time).

There is no in-game way to determine Hidden Power's power directly in games where it is not fixed.

Generation II

Type

Consider an example Pokémon, like Pikachu with this set of IVs:

Spr 2c 001.png Hit Points Attack Defense Speed Special
14 15 15 15 14

The type is determined by taking the two least significant bits of the Attack and Defense IVs, then concatenating these two values in that order.

Mathematically, this is the equivalent of , where a represents the Attack IV and b represents the Defense IV.

The resulting number will correspond to a type as marked below.

Number Type
0  Fighting 
1  Flying 
2  Poison 
3  Ground 
4  Rock 
5  Bug 
6  Ghost 
7  Steel 
8  Fire 
9  Water 
10  Grass 
11  Electric 
12  Psychic 
13  Ice 
14  Dragon 
15  Dark 

In our example, we get:

Since this value is equal to 15, per the table above, this means that our Pikachu has a Dark-type Hidden Power.

Power

The power of the Hidden Power is calculated using the following formula:

  • The variables v through y (the "damage bits") represent the most significant bit of each IV. If a variable is less than eight, this bit is 0; otherwise, it is 1.
  • v depends on the Special IV.
  • w depends on the Speed IV.
  • x depends on the Defense IV.
  • y depends on the Attack IV.
  • Z is equal to the Special IV mod 4 (its remainder when divided by 4).

Hidden Power's base power is therefore a number ranging from 31 to 70, inclusively.

In our example, we get:

Spr 2c 001.png Hit Points Attack Defense Speed Special
14
N/A
15
1
15
1
15
1
14
1

Which means that our Pikachu's Hidden Power's power is 69.

Spr 2c 001.png Hit Points Attack Defense Speed Special
14 15 15 15 14
Hidden Power: Type:
Dark
Power:
69

Remarks

  • Because Shininess is also determined by IVs, Shiny Pokémon can only have a Grass-type or Dragon-type Hidden Power with a power of 49 or 69.
  • Because gender is also determined by the Attack IV, female Pokémon of species with a seven male to one female ratio can only have a physical Hidden Power.

Generation III onward

Type

Consider an example Pokémon, like Pikachu with this set of IVs:

025Pikachu.png Hit Points Attack Defense Speed Sp. Attack Sp. Defense
30 31 31 31 30 31

Hidden Power's type of a Pokémon with given IVs is represented by a number, calculated with this formula:

where a, b, c, d, e, f (the "type bits") are the least significant bit of their respective IVs. If a number is odd, its least significant bit is 1; otherwise (if the number is even), it is 0.

  • a depends on the HP IV.
  • b and c depend on the Attack and Defense IVs respectively.
  • d depends on the Speed IV.
  • e and f depend on the Special Attack and Special Defense IVs respectively.

The sum inside the formula may range from 0 (when all IVs are even) to 63 (when all IVs are odd), inclusive. This sum is equivalent to constructing the binary number (fedcba)2.

The sum is then multiplied by 15 and divided by 63. This ensures that the number representing the type ranges from 0 to 15, inclusive. The floor of this value is taken, meaning that if the result is not an integer, it will be rounded down to the nearest integer less than it.

The resulting number will correspond to a type as marked below.

Number Type
0  Fighting 
1  Flying 
2  Poison 
3  Ground 
4  Rock 
5  Bug 
6  Ghost 
7  Steel 
8  Fire 
9  Water 
10  Grass 
11  Electric 
12  Psychic 
13  Ice 
14  Dragon 
15  Dark 

In our example, we get:

025Pikachu.png Hit Points Attack Defense Speed Sp. Attack Sp. Defense
30
0
31
1
31
1
31
1
30
0
31
1

Which means that our Pikachu has a Grass-type Hidden Power.

Damage

Damage of the Hidden Power is calculated in a manner very similar to that of its type, using the following formula:

  • The variables u through z (the "damage bits") represent the second least significant bit of each IV. If a variable has a remainder of 2 or 3 when divided by 4, this bit is 1; otherwise, the bit is 0.
  • u depends on the HP stat.
  • v and w depend on the Attack and Defense stats respectively.
  • x depends on the Speed stat.
  • y and z depend on the Special Attack and Special Defense stats respectively.

Like before, the sum may range from 0 to 63, inclusively. The calculated number is then multiplied by 40 and divided by 63 to make sure that the fraction will not exceed 40. Then, the number is increased by 30 and rounded down, making Hidden Power's power a number ranging from 30 to 70, inclusively.

In our example, we get:

025Pikachu.png Hit Points Attack Defense Speed Sp. Attack Sp. Defense
30
1
31
1
31
1
31
1
30
1
31
1

Which means that our Pikachu's Hidden Power's power is 70

025Pikachu.png Hit Points Attack Defense Speed Sp. Attack Sp. Defense
30 31 31 31 30 31


Hidden Power: Type:
Grass
Power:
70

Number of possible Hidden Powers

As there are 6 IVs, ranging from 0 to 31 (32 in total), the number of different possible Hidden Powers should be 326=230, which is more than one billion possibilities. But let us consider two Pokémon with one different IV:

025Pikachu.png Hit Points Attack Defense Speed Sp. Attack Sp. Defense
30 31 31 31 30 31

and

025Pikachu.png Hit Points Attack Defense Speed Sp. Attack Sp. Defense
26 31 31 31 30 31

As we see, both 26 and 30 are divisible by 2 and give the remainder of 2 when divided by 4. So, in both cases the algorithms will interpret the IVs of those Pokémon in the same way, returning Grass-type Hidden Power with 70 power. It means that for the mentioned algorithms an IV of 30 is treated in the same way like IVs of 2,6,10,14,18,22 and 26 (8 in total).

In fact, there are only four essentially different types of IV when calculating Hidden Power:

1. IV that gives a remainder of 0 when divided by 4—has damage bit 0 and type bit 0: 0, 4, 8, 12, 16, 20, 24, 28
2. IV that gives a remainder of 1 when divided by 4—has damage bit 0 and type bit 1: 1, 5, 9, 13, 17, 21, 25, 29
3. IV that gives a remainder of 2 when divided by 4—has damage bit 1 and type bit 0: 2, 6, 10, 14, 18, 22, 26, 30
4. IV that gives a remainder of 3 when divided by 4—has damage bit 1 and type bit 1: 3, 7, 11, 15, 19, 23, 27, 31

In other words: only four IVs that give different remainders when divided by four would cover all possible Hidden Power types and powers.

If so, the number of possible Hidden Powers should be 46 = 4096. This number, however is again far too large, as the real number of possible variations of Hidden power is simply 16*41=656, as Hidden Power exists in 16 types and has 41 different powers. The significant difference between 656 and 4096 is explained by the fact that the floor function results in distinct values (e.g. 10.952 and 10.476) being mapped to the same integer result (in this case 10).

Percentage distribution of different variations of Hidden Power

Due to the fact that both Hidden Power's type and its power are the products of rounding down, chances of getting a Pokémon with certain Hidden Power are not equal, as one might have thought, and are different for every Hidden Power's type and damage value.

As it was stated before, the number of theoretically different Hidden Powers is 4096, which is the result of multiplying theoretical values of possible types (64) and powers (also 64). It means that every of 64 "types" comes into 64 "powers". After rounding down, however, the number of 64 "types" is reduced to 16 and the number of 64 "powers" to 41.

Percentage distribution of Hidden Power's type
Number Type Qty %
0 Fighting 320 7.8125%
1 Flying 256 6.25%
2 Poison 256 6.25%
3 Ground 256 6.25%
4 Rock 256 6.25%
5 Bug 320 7.8125%
6 Ghost 256 6.25%
7 Steel 256 6.25%
8 Fire 256 6.25%
9 Water 256 6.25%
10 Grass 320 7.8125%
11 Electric 256 6.25%
12 Psychic 256 6.25%
13 Ice 256 6.25%
14 Dragon 256 6.25%
15 Dark 64 1.5625%
Percentage distribution of Hidden Power's powers (prior to Generation VI)
Powers Qty %
30, 31, 33, 35, 36, 38,
40, 42, 43, 45, 47, 49,
50, 52, 54, 56, 57, 59,
61, 63, 64, 66, 68
128 each (23×) 3.125% each (23×)
32, 34, 37, 39, 41, 44,
46, 48, 51, 53, 55, 58,
60, 62, 65, 67, 69, 70
64 each (18×) 1.5625% each (18×)

External links

Many Pokémon related sites prepared web-based calculators, which allows to compute Hidden Power of a Pokémon with given IVs:

Project Games logo.png This game mechanic article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games.