Pokérus: Difference between revisions

32 bytes removed ,  18 December 2014
→‎Technical information: So that this applies to more games than just Gen II
(→‎Trivia: This is just multiplying numbers together and has no real value to the article. Also, it's likely factually inaccurate as the games don't use a true RNG (Emerald in particular))
(→‎Technical information: So that this applies to more games than just Gen II)
Line 25: Line 25:


====Technical information====
====Technical information====
Pokérus is stored in a Pokémon's [[Pokémon data structure in Generation II|data structure]] as a single byte at offset 0x1C. In hexadecimal, this can be represented as a two-digit number '''XY'''. The upper 4 bits of the byte, '''X''', represent the specific strain of Pokérus the Pokémon has contracted. The lower 4 bits, '''Y''', represent the number of days remaining before the infected Pokémon is cured of the virus.
Pokérus is stored in a Pokémon's [[Pokémon data structure|data structure]] as a single byte. In hexadecimal, this can be represented as a two-digit number '''XY'''. The upper 4 bits of the byte, '''X''', represent the specific strain of Pokérus the Pokémon has contracted. The lower 4 bits, '''Y''', represent the number of days remaining before the infected Pokémon is cured of the virus.


A Pokémon is or has been infected if '''X''' (the strain) is a nonzero value. If '''Y''' (days remaining) is nonzero when '''X''' is also nonzero, this means the Pokémon is currently infected. If '''Y''' is 0 and '''X''' is nonzero, then the Pokémon is "cured" of Pokérus. If both '''X''' and '''Y''' are 0, then the Pokémon has never been affected by Pokérus.
A Pokémon is or has been infected if '''X''' (the strain) is a nonzero value. If '''Y''' (days remaining) is nonzero when '''X''' is also nonzero, this means the Pokémon is currently infected. If '''Y''' is 0 and '''X''' is nonzero, then the Pokémon is "cured" of Pokérus. If both '''X''' and '''Y''' are 0, then the Pokémon has never been affected by Pokérus.