Hidden Power (move)/Calculation: Difference between revisions
HyperHacker (talk | contribs) m (→Base Power: remove old template) |
(→Generation III and on: fixing second formula, simplifying fraction, fixing probabilities. More research needed, but I can't find the template) |
||
Line 104: | Line 104: | ||
==Generation III and on== | ==Generation III and on== | ||
===Type=== | ===Type=== | ||
{{ | |||
Consider an example Pokémon, like Pikachu with this set of IVs: | Consider an example Pokémon, like Pikachu with this set of IVs: | ||
Line 111: | Line 113: | ||
:type = (def % 2) + ((spd % 2) * 2) + ((spatk % 2) * 4) + ((spdef % 2) * 8) | :type = (def % 2) + ((spd % 2) * 2) + ((spatk % 2) * 4) + ((spdef % 2) * 8) | ||
Another way of expressing this is that the type is derived from the least significant bits of the Special Defense, Special Attack, Speed and Defense IVs, in order from most to least significant bit of the result; i.e.: | Another way of expressing this is that the type is derived from the least significant bits of the Special Defense, Special Attack, Speed and Defense IVs, in order from most to least significant bit of the result; i.e.: | ||
Line 177: | Line 178: | ||
===Base Power=== | ===Base Power=== | ||
Base power of the Hidden Power is calculated in a manner very similar to that of its type, using the following formula: | Base power of the Hidden Power is calculated in a manner very similar to that of its type, using the following formula: | ||
:power = floor(((1 + ((hp / 2) % 2) + ((atk / 2) % 2) + ((def / 2) % 2) + ((spd / 2) % 2) + ((spatk / 2) % 2) + ((spdef / 2) % 2)) * | :power = floor(((1 + ((hp / 2) % 2) + 2*((atk / 2) % 2) + 4*((def / 2) % 2) + 8*((spd / 2) % 2) + 16*((spatk / 2) % 2) + 32*((spdef / 2) % 2)) * 5) / 8 + 30) | ||
where ''hp'' is the HP IV, ''atk'' is the Attack IV, ''def'' is the Defense IV, ''spd'' is the Speed IV, ''spatk'' is the Special Attack IV, ''spdef'' is the Special Defense IV, and ''%'' is the [[wp:Modulo_operation|modulo operator]] (i.e. x % y = the remainder of x / y). | |||
In our example, we get: | In our example, we get: | ||
{{Hidden Power calculation/IV|30<br>''1''|31<br>''1''|31<br>''1''|31<br>''1''|30<br>''1''|31<br>''1''}} | {{Hidden Power calculation/IV|30<br>''1''|31<br>''1''|31<br>''1''|31<br>''1''|30<br>''1''|31<br>''1''}} | ||
:power = floor(((1 + 1 + 1 + 1 + 1 + 1 + 1) * | :power = floor(((1 + 1*1 + 2*1 + 4*1 + 8*1 + 16*1 + 32*1) * 5) / 8 + 30), which means that our Pikachu's Hidden Power's power is '''70''' | ||
===Number of possible Hidden Powers=== | ===Number of possible Hidden Powers=== | ||
Line 194: | Line 195: | ||
{{Hidden Power calculation/IV|'''26'''|31|31|31|30|31|Ani025MS.png}} | {{Hidden Power calculation/IV|'''26'''|31|31|31|30|31|Ani025MS.png}} | ||
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). | 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: | In fact, there are only four essentially different types of IV when calculating Hidden Power: | ||
Line 222: | Line 223: | ||
===Percentage distribution of different variations of Hidden Power=== | ===Percentage distribution of different variations of Hidden Power=== | ||
Due to the fact that | Due to the fact that Hidden Power's power is the product of rounding down, the chances of getting a Pokémon with a certain Hidden Power base power are not equal, as one might have thought, and are different for every Hidden Power's damage value. | ||
As | As stated before, the number of theoretically different values for base damage is 2<sup>6</sup> = 64, since there are two possibilities for each bit. After rounding down, however, the number of 64 "powers" is reduced to 41. | ||
{| style="background: #{{normal color}}; border: 3px solid #{{normal color dark}}; {{roundy|10px}}" | {| style="background: #{{normal color}}; border: 3px solid #{{normal color dark}}; {{roundy|10px}}" | ||
|+ '''Percentage distribution of Hidden Power's powers''' | |+ '''Percentage distribution of Hidden Power's powers''' | ||
Line 328: | Line 233: | ||
! style="text-align: center;" style="background:#{{normal color light}}; {{roundytr|5px}}" | % | ! style="text-align: center;" style="background:#{{normal color light}}; {{roundytr|5px}}" | % | ||
|- style="background: #fff;" | |- style="background: #fff;" | ||
| 30, | | 30, 32, 34, 37, 39, 42, 44, 47, 49,<br />52, 54, 57, 59, 62, 64, 67, 69, 70 | ||
| 18 × 64 | | 18 × 64 | ||
| 1.5625% | | 1.5625% each | ||
|- style="background: #fff;" | |- style="background: #fff;" | ||
| 31, 33, 35, 36, 38, 40, 41, 43, 45, 46, 48, 50,<br />51, 53, 55, 56, 58, 60, 61, 63, 65, 66, 68 | |||
| 23 × 128 | |||
| 3.125% each | |||
|- | |||
| | | | ||
| 4096 | | 4096 | ||
| 100% | | 100% | ||
|} | |} | ||
Revision as of 07:07, 26 April 2013
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 the sixteen other natural types and with a power between 30 and 70.
The type of Hidden Power can be checked in Veilstone Game Corner's prize house in Pokémon Platinum, the Celadon Game Corner in Pokémon HeartGold and SoulSilver, in Mistralton City's Pokémon Center in Pokémon Black and White, and at the PWT in Pokémon Black 2 and White 2. There remains no in-game way to determine the power level directly, however.
Generation II
Type
Consider an example Pokémon, like Pikachu with this set of IVs:
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:
HPtype=4*(15 mod 4)+(15 mod 4)=4*3+3=12+3=15, which means that our Pikachu has a Dark-type Hidden Power.
Damage
The damage 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 and w depend on the Attack and Defense stats respectively.
- x depends on the Speed stat.
- y depends on the Special stat.
- Z is equal to the Special stat when the Special stat is less than or equal to 3; when the Special stat is greater than 3, Z is equal to 3.
Hidden Power's power is therefore a number ranging from 31 to 70, inclusively.
In our example, we get:
Hit Points | Attack | Defense | Speed | Special | |
---|---|---|---|---|---|
14 N/A |
15 1 |
15 1 |
15 1 |
14 1 |
HP Power = Floor[(5*(1 + 2*1 + 4*1 + 8*1) + 3)/2+31] = Floor[(5*(1 + 2 + 4 + 8) + 3)/2+31] = Floor[(5*15 + 3)/2+31] = Floor[(75 + 3)/2+31] = Floor[78/2+31] = Floor[39+31] = Floor[70] = 70, which means that our Pikachu's Hidden Power's power is 70
Hit Points | Attack | Defense | Speed | Special | |
---|---|---|---|---|---|
14 | 15 | 15 | 15 | 14 |
Hidden Power: | Type: Dark |
Power: 70 |
Generation III and on
Type
{{
Consider an example Pokémon, like Pikachu with this set of IVs:
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:
- type = (def % 2) + ((spd % 2) * 2) + ((spatk % 2) * 4) + ((spdef % 2) * 8)
Another way of expressing this is that the type is derived from the least significant bits of the Special Defense, Special Attack, Speed and Defense IVs, in order from most to least significant bit of the result; i.e.:
- type = (def & 1) + ((spd & 1) << 1) + ((spatk & 1) << 2) + ((spdef & 1) << 3)
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:
Hit Points | Attack | Defense | Speed | Sp. Attack | Sp. Defense | |
---|---|---|---|---|---|---|
30 0 |
31 1 |
31 1 |
31 1 |
30 0 |
31 1 |
- type = 1 + (1 * 2) + (0 * 4) + (1 * 8) = 11, which means that our Pikachu has an Electric-type Hidden Power.
Base Power
Base power of the Hidden Power is calculated in a manner very similar to that of its type, using the following formula:
- power = floor(((1 + ((hp / 2) % 2) + 2*((atk / 2) % 2) + 4*((def / 2) % 2) + 8*((spd / 2) % 2) + 16*((spatk / 2) % 2) + 32*((spdef / 2) % 2)) * 5) / 8 + 30)
where hp is the HP IV, atk is the Attack IV, def is the Defense IV, spd is the Speed IV, spatk is the Special Attack IV, spdef is the Special Defense IV, and % is the modulo operator (i.e. x % y = the remainder of x / y).
In our example, we get:
Hit Points | Attack | Defense | Speed | Sp. Attack | Sp. Defense | |
---|---|---|---|---|---|---|
30 1 |
31 1 |
31 1 |
31 1 |
30 1 |
31 1 |
- power = floor(((1 + 1*1 + 2*1 + 4*1 + 8*1 + 16*1 + 32*1) * 5) / 8 + 30), which means that our Pikachu's Hidden Power's power is 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:
Hit Points | Attack | Defense | Speed | Sp. Attack | Sp. Defense | |
---|---|---|---|---|---|---|
30 | 31 | 31 | 31 | 30 | 31 |
and
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=212=64*64=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 function floor[], which reduces theoretically different numbers (for example 10.952 and 10.476) to the same integer, or whole number (in this case 10).
Percentage distribution of different variations of Hidden Power
Due to the fact that Hidden Power's power is the product of rounding down, the chances of getting a Pokémon with a certain Hidden Power base power are not equal, as one might have thought, and are different for every Hidden Power's damage value.
As stated before, the number of theoretically different values for base damage is 26 = 64, since there are two possibilities for each bit. After rounding down, however, the number of 64 "powers" is reduced to 41.
Powers | Qty | % |
---|---|---|
30, 32, 34, 37, 39, 42, 44, 47, 49, 52, 54, 57, 59, 62, 64, 67, 69, 70 |
18 × 64 | 1.5625% each |
31, 33, 35, 36, 38, 40, 41, 43, 45, 46, 48, 50, 51, 53, 55, 56, 58, 60, 61, 63, 65, 66, 68 |
23 × 128 | 3.125% each |
4096 | 100% |
Trivia
- Although Hidden Power is listed as a Normal-type move, it cannot damage as a Normal-type attack.
- In Generation II, the calculation of the type and power of Hidden Power is completely independent of the HP IV.
External links
Many Pokémon related sites prepared web-based calculators, which allows to compute Hidden Power of a Pokémon with given IVs:
- Psypoke's Hidden Power calculator (Generation II)
- Psypoke's Hidden Power calculator (Generation III and on)
- Legendary Pokémon Hidden Power calculator (Generation III and on)
This game mechanic article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games. |