509
edits
m (→Shininess: bitwise means bit not byte) |
(→Gender) |
||
Line 6: | Line 6: | ||
<code>00000000 00000000 00000000 <span style="background:#FF9999">00000000</span></code> | <code>00000000 00000000 00000000 <span style="background:#FF9999">00000000</span></code> | ||
A Pokémon's [[gender]] is determined by the lowest eight digits (a byte) of ''p'' in binary form; essentially, ''p''[[wp:modulo operation|%]]256. This value will, from here on out, be known as ''p<sub>gender</sub>'' | A Pokémon's [[gender]] is determined by the lowest eight digits (a byte) of ''p'' in binary form; essentially, <code>''p'' [[wp:modulo operation|%]] 256</code>. This value will, from here on out, be known as ''p<sub>gender</sub>''. | ||
In a Pokémon species's [[Pokémon base stats data structure in the GBA|base stat structure]], there is a byte that may be set to any value between <code>00000000</code> and <code>11111111</code>. For genderless Pokémon such as {{p|Magnemite}}, the value of this byte always is <code>11111111</code>. For female only Pokémon such as {{p|Nidoran♀}}, the value of this byte is <code>11111110</code>. For male only Pokémon such as {{p|Nidoran♂}}, the value of this byte is <code>00000000</code>. Pokémon with ''both'' genders, however, occupy the rest of the spectrum. For these Pokémon, if the value of ''p<sub>gender</sub>'' is greater than that of the base stat value, the Pokémon is male, otherwise it is female. | |||
<br><br> | |||
<!--Is this calctable correct?--> | <!--Is this calctable correct?--> | ||
{| border=1 align="left" style="background: #fff; border:1px solid #000; border-collapse:collapse;" | {| border=1 align="left" style="background: #fff; border:1px solid #000; border-collapse:collapse;" | ||
Line 60: | Line 60: | ||
| 0% | | 0% | ||
|} | |} | ||
==Ability== | ==Ability== |
edits