77,334
edits
m (→Generation III onward: xor is associative) |
|||
Line 112: | Line 112: | ||
{{main|Personality value#Shininess}} | {{main|Personality value#Shininess}} | ||
From [[Generation III]] onward, whether a Pokémon is Shiny depends on the Pokémon's [[Original Trainer]]'s [[ID number]] and secret ID number, as well as the Pokémon's [[personality value]]. The exact calculation is: | From [[Generation III]] onward, whether a Pokémon is Shiny depends on the Pokémon's [[Original Trainer]]'s [[ID number]] and secret ID number, as well as the Pokémon's [[personality value]]. The exact calculation is: | ||
:<code> | :<code>TrainerID '''xor''' SecretID '''xor''' PersonalityValue<sub>31..16</sub> '''xor''' PersonalityValue<sub>15..0</sub></code> | ||
where the latter two values represent the highest and lowest 16 bits of the 32-bit personality value respectively. | where the latter two values represent the highest and lowest 16 bits of the 32-bit personality value respectively. | ||