Pokérus: Difference between revisions
(→Generation II: Technical details) |
(→Infection and spread details: whoops forgot a mask and had a wrong mask) |
||
Line 72: | Line 72: | ||
The spread code checks if a random byte is less than 85 and if the party has multiple members before proceeding as follows: if the spreader is the last party member, or if a random byte is less than 128, iterate backwards, otherwise iterate forwards. If the member being iterated over has an active infection, they are skipped over and become the spreader. If they are clear and never had the Pokérus, they are infected. The '''Y''' value for an infection is generated from the '''X''' value as it is for a spontaneous infection, unlike in future games where it is copied. The iteration stops when a member is newly infected, when it reaches a cured member, or when it would be about to pass through the beginning or end of the party. | The spread code checks if a random byte is less than 85 and if the party has multiple members before proceeding as follows: if the spreader is the last party member, or if a random byte is less than 128, iterate backwards, otherwise iterate forwards. If the member being iterated over has an active infection, they are skipped over and become the spreader. If they are clear and never had the Pokérus, they are infected. The '''Y''' value for an infection is generated from the '''X''' value as it is for a spontaneous infection, unlike in future games where it is copied. The iteration stops when a member is newly infected, when it reaches a cured member, or when it would be about to pass through the beginning or end of the party. | ||
The new infection code first checks if the flag for having visited Goldenrod City is set, terminating if not. Then, it checks if a random byte is equal to zero and another random byte is less than three, terminating if not. It then chooses a random party member by generating a random byte and keeping its bottom three bits, rerolling until that number is a valid party index. If that party member has ever had the Pokérus, the code terminates. Otherwise, a random byte is rolled, rerolling if zero until not zero. This byte shall be represented as '''AB''' (not to be confused with registers A and B) in the same way that the Pokérus byte is represented as '''XY'''. If '''A''' is not zero, '''B''''s bottom three bits (bitwise ''and'' with seven) are copied as a four-bit value, incremented, and put into '''X''', and '''X''''s bottom two bits (bitwise ''and'' with | The new infection code first checks if the flag for having visited Goldenrod City is set, terminating if not. Then, it checks if a random byte is equal to zero and another random byte is less than three, terminating if not. It then chooses a random party member by generating a random byte and keeping its bottom three bits (bitwise ''and'' with seven), rerolling until that number is a valid party index. If that party member has ever had the Pokérus, the code terminates. Otherwise, a random byte is rolled, rerolling if zero until not zero. This byte shall be represented as '''AB''' (not to be confused with registers A and B) in the same way that the Pokérus byte is represented as '''XY'''. If '''A''' is not zero, '''B''''s bottom three bits (bitwise ''and'' with seven) are copied as a four-bit value, incremented, and put into '''X''', and '''X''''s bottom two bits (bitwise ''and'' with three) are copied as a three-bit value, incremented, and put into '''Y'''. Otherwise, it is likely intended to copy '''B''' into '''X''', but, perhaps due to a misplaced load, zero is copied into '''X''' instead; '''Y''' is then derived from '''X''' with the same code as with '''A''' not zero, but since '''X''' is always zero, '''Y''' is always one. (If the misplaced load is placed in a more logical place, the '''Y''' value ends up always being one anyway, so there may have been more required effort to make the code work as intended.) | ||
'''X''' values of zero and eight can occur naturally: the latter is as designed, the former is due to the above bug. Due to this bug, an '''X''' value above eight cannot occur naturally. Probabilities of each strain is as follows: | '''X''' values of zero and eight can occur naturally: the latter is as designed, the former is due to the above bug. Due to this bug, an '''X''' value above eight cannot occur naturally. Probabilities of each strain is as follows: |
Revision as of 16:28, 20 April 2023
Pokérus is in need of spading. See its section on the spading page for more information, and how you can help. |
The Pokérus (Japanese: ポケルス Pokérus), from "Pokémon virus", is a microscopic life-form that may attach to Pokémon, first appearing in the Generation II games. It is a beneficial mechanic that a Pokémon can obtain.
In the games
When a Pokémon has the Pokérus, it gains double the effort values from battling (e.g., fighting a Magikarp will give two Speed EVs, rather than one). Effort points gained from Vitamins and Feathers are not doubled. The infected Pokémon can infect other Pokémon with the virus for a period of one to four days. However, the Pokérus timer can be delayed by several methods, such as by placing the infected Pokémon in a PC Box.
While it is represented similarly to status conditions, the Pokérus is not a status condition, so it cannot be healed at a Pokémon Center or with any status condition healing item.
Pokérus has a 3 in 65,536 (or approximately a 1 in 21,845) chance of being generated on one of the player's Pokémon after a battle, making it rarer than encountering or hatching a Shiny Pokémon. If any of the player's Pokémon are infected, the Pokérus may spread among Pokémon in the player's party after any battle.
From Generation IV onward, the Pokérus became more accessible, with worldwide trading facilitated by Nintendo Wi-Fi Connection.
Infection
When a Pokémon is infected with the Pokérus, their status screen will display an icon indicating this special "status" the same way status conditions would be noted. If the Pokémon becomes affected by a status condition such as Sleep, the Pokérus icon will be temporarily replaced until the status condition is cured. As long as the Pokémon is infected with the Pokérus, it can spread the virus to other Pokémon in the player's party.
The Pokérus may spread if an infected Pokémon is in the player's party after a battle. The Pokérus may only spread to a Pokémon directly adjacent to an already infected Pokémon, and only if they have never had Pokérus before. Eggs may catch the Pokérus like any other Pokémon.
Becoming cured
A Pokérus infection only progresses towards cured status when a new day starts with the infected Pokémon in the party (or if, when the game is loaded, it is not the same day as it was when the game was saved). The number of days before a Pokémon will be cured of the Pokérus can vary from one to four days. Once this time has passed, the Pokémon becomes cured and will be immune to the virus in the future. The Pokémon still gains double effort values when cured.
Due to the beneficial nature of the Pokérus, players will often place an infected Pokémon in the PC where it will keep the infection indefinitely, so that it may be withdrawn to spread the virus at will. Other options include putting a Pokémon in the Day Care or sending it to Stadium 2 in Generation II, Pokémon Box Ruby & Sapphire in Generation III, My Pokémon Ranch in Generation IV, Pokémon Bank in Generation VI and Generation VII, or Pokémon HOME in Generation VIII.
In Generation III, if the player deposits an infected Pokémon inside a PC, saves inside a Pokémon Center prior to midnight, shuts off the game, resumes the game after midnight, withdraws the infected Pokémon from the PC, and exits the Pokémon Center, it is possible for the infected Pokémon to be cured of the Pokérus upon stepping outside of the building. This does not happen in any other generation.
In Generation VIII, the game will check on the next available random event increment after midnight. This can result in a Pokémon that was infected while in a box, and withdrawn directly after resuming the game from sleep, being subsequently cured of the Pokérus after the next battle or similar event.
Technical information
The Pokérus is stored in a Pokémon's 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 the 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 the Pokérus. If both X and Y are 0, then the Pokémon has never been affected by the Pokérus.
Whenever the game's internal clock strikes midnight, every currently infected Pokémon in the player's party has their Pokérus value decreased by one. Once the Y value reaches 0, the Pokémon will be cured of the Pokérus.
Strains
Whenever the game creates the Pokérus on a Pokémon, the value assigned to Y (days) depends on the value assigned to X (strain). Specifically, the number of days will be set to X modulo 4 + 1. In other words, the higher two bits of X are irrelevant to the "strain".
Strain | X values | Duration (Y value) |
---|---|---|
A | 0, 4, 8, 12 | 1 day |
B | 1, 5, 9, 13 | 2 days |
C | 2, 6, 10, 14 | 3 days |
D | 3, 7, 11, 15 | 4 days |
Whenever the Pokérus spreads from an infected Pokémon to a new Pokémon, the new Pokémon inherits the infected Pokémon's strain of the Pokérus (X) and Y is copied directly from the infected Pokémon. As an example, if a Pokémon has the Pokérus with an X value of 7 and a Y value of 2 (2 days remaining before it will be cured) and it infects another Pokémon, the new Pokémon will be infected with Pokérus with an X value of 7 and a Y value of 2. Infecting other Pokémon does not reset the Y value to the default value for a given strain on the newly infected Pokémon, nor for the original host.
In Pokémon Emerald onward, X values of 0 and 8 do not generate legitimately, as the RNG doesn't permit these values to generate. Additionally with a value of 0, upon being "cured" the Pokémon would appear to have never had the Pokérus at all.
After having the virus
Once a Pokémon's immune system has fought off the virus, they cannot spread it further, nor can it be spread to them by other Pokémon. In Generations II and III, a dot will appear on the Pokémon's status screen to indicate that they have had the virus previously, while in Generation IV and onward, it will be a small face. Though the virus is gone, the Pokémon will still gain twice the EVs it would have gained before the virus.
Differences between generations
Generation II
When the player first encounters the virus in one of the Generation II games, the nurse at the Pokémon Center will make note of it when the Pokémon is first healed after contracting it, saying that there are "tiny life forms" on the Pokémon. After leaving the Pokémon Center, Professor Elm will call the player to tell them that the virus has no effect and will wear off. A Pokémon with active Pokérus will list its status as such, and a Pokémon that has had the Pokérus and is cured will have a small dot near its HP meter on the status screen. At the end of a battle, the virus has a 1/3 chance to spread. If the infected Pokémon is adjacent to two Pokémon who have never had it before, one of them will catch the Pokérus. Pokérus can infect Eggs as well. An indicator for Pokérus will not show up on the Egg's status screen, but once it hatches, it will appear under its status on the status screen like normal.
If a Pokémon with any stage of the Pokérus (active or cured) is traded back to a Generation I game, or withdrawn from Pokémon Stadium 2 by a Generation I game, all traces of that Pokémon having had the Pokérus will disappear. This is because a Pokémon's Pokérus status is not saved in any form in the Generation I games, thereby making it possible for a Pokémon to legitimately contract the Pokérus multiple times by trading it back and forth, once it becomes cured of a given infection. The only benefit of doing so would be to allow other Pokémon to contract the virus.
The Pokérus cannot randomly occur before the player has visited Goldenrod City[1] (but it may spread between Pokémon before then). If a Pokémon in the party has the Pokérus, other Pokémon cannot randomly contract it; they can only receive it from that Pokémon.[2]
Infection and spread details
The party is first iterated over to determine if any member has the Pokérus. If so, the spread code is called for each member with the Pokérus and not the new infection code, and if not vice versa.
The spread code checks if a random byte is less than 85 and if the party has multiple members before proceeding as follows: if the spreader is the last party member, or if a random byte is less than 128, iterate backwards, otherwise iterate forwards. If the member being iterated over has an active infection, they are skipped over and become the spreader. If they are clear and never had the Pokérus, they are infected. The Y value for an infection is generated from the X value as it is for a spontaneous infection, unlike in future games where it is copied. The iteration stops when a member is newly infected, when it reaches a cured member, or when it would be about to pass through the beginning or end of the party.
The new infection code first checks if the flag for having visited Goldenrod City is set, terminating if not. Then, it checks if a random byte is equal to zero and another random byte is less than three, terminating if not. It then chooses a random party member by generating a random byte and keeping its bottom three bits (bitwise and with seven), rerolling until that number is a valid party index. If that party member has ever had the Pokérus, the code terminates. Otherwise, a random byte is rolled, rerolling if zero until not zero. This byte shall be represented as AB (not to be confused with registers A and B) in the same way that the Pokérus byte is represented as XY. If A is not zero, B's bottom three bits (bitwise and with seven) are copied as a four-bit value, incremented, and put into X, and X's bottom two bits (bitwise and with three) are copied as a three-bit value, incremented, and put into Y. Otherwise, it is likely intended to copy B into X, but, perhaps due to a misplaced load, zero is copied into X instead; Y is then derived from X with the same code as with A not zero, but since X is always zero, Y is always one. (If the misplaced load is placed in a more logical place, the Y value ends up always being one anyway, so there may have been more required effort to make the code work as intended.)
X values of zero and eight can occur naturally: the latter is as designed, the former is due to the above bug. Due to this bug, an X value above eight cannot occur naturally. Probabilities of each strain is as follows:
X values | Chance to occur |
---|---|
0 | 15/255 (5.88235%) |
1, 2, 3, 4, 5, 6, 7, 8 | 30/255 (11.76471%) |
9, 10, 11, 12, 13, 14, 15 | 0/255 (Cannot naturally occur) |
Generation III
The Pokérus can only be contracted or cured in Ruby, Sapphire, and Emerald. In FireRed and LeafGreen, as well as Colosseum and Pokémon XD, since the time function is absent, a Pokémon with the Pokérus will keep it indefinitely (it can't spread the Pokérus, either), until it is transferred to the Hoenn-based games. When a Pokémon can spread the Pokérus, it has a 1/3 chance to spread it to both adjacent Pokémon.
Otherwise, the Pokérus operates in much the same way as in Generation II, but it is now possible for the Pokérus to be randomly contracted even when another Pokémon in the party already has it (and the Pokérus can spread after the same battle where it was contracted)[3], and there is no location requirement before the Pokérus can randomly be contracted. Eggs infected with Pokérus will now indicate as such.
In Ruby and Sapphire only[4], X values of 0 and 8 do occur naturally, whereas in Pokémon Emerald onward, the RNG does not allow them to occur at all. The following is the chance to obtain each strain in Ruby and Sapphire:
X values | Chance to occur |
---|---|
0 | 30/255 (11.76470%) |
1, 2, 3, 4, 5, 6, 7 | 31/255 (12.15686%) |
8, 9, 10, 11, 12, 13, 14, 15 | 1/255 (0.39215%) |
Generation IV
The mechanics remain the same from Generation III. Additionally, much like storage in Pokémon Box Ruby & Sapphire and in the PC, storage in My Pokémon Ranch will keep a Pokémon's Pokérus status indefinitely. The Pokérus doubles the EVs earned from Power items.
In HeartGold and SoulSilver, Professor Elm calls the player soon after healing their first Pokémon with the Pokérus to tell them that it has no effect and will wear off. If he is called back, he will claim that Pokémon will level up better with the Pokérus while infected.
Generation V
The mechanics remain more or less the same, but now the icon that appears if a Pokémon has previously had the Pokérus is pinkish in color instead of the former yellow/orange color.
Pseudorandom number generation
To determine if any Pokémon in the player's party is to be infected, the game calls the Mersenne twister table to get a 32-bit random number, discards the lowest 16 bits, and then discards the highest two bits (a bitwise and with 0x3FFF). If this number is 0, the game will choose a Pokémon in the party to be infected.
To determine what party member is to be infected, the game takes another value from the Mersenne twister table, multiplies it by the party count, then discards the lowest 32 bits of the result. If this number is an Egg, the calculation is repeated. Otherwise, if that party member has already been infected, nothing else will happen.
If a Pokémon will be infected, the game takes the next value from the Mersenne twister table and discards the lowest 24 bits (if the lowest three bits of this result are all 0, another number is chosen). If any of the highest four bits are nonzero, the highest five bits are discarded. The resulting number will be X, the Pokérus strain; the duration of the virus will be set to X modulo 4 + 1.
These calculations mean that the strains 0 and 8 will never occur, and that the remaining strains are biased towards the lower numbers (with 1 through 7 being much more common than 9 through 15).
X values | Chance to occur |
---|---|
0, 8 | 0/224 (Cannot naturally occur) |
1, 2, 3, 4, 5, 6, 7 | 31/224 (13.83929%) |
9, 10, 11, 12, 13, 14, 15 | 1/224 (0.44643%) |
Generation VI
In Generation VI, the Pokérus does not affect EVs gained from Super Training. However, it increases the rate of Double-Up Bags that are received during the training regimen. The icon that appears if a Pokémon has the Pokérus has been changed to spell out the full word, while the cured icon uses a design similar to the Gen V icon, with the mouth and eyes having a white color.
Generation VII
During battle, a Pokémon's summary will display a "Pokérus" icon beside its name if it has the Pokérus. The icon remains after the Pokémon is cured. An Egg infected with the Pokérus does not have this symbol on its summary screen. It can still spread the virus normally, and the Pokémon that hatches from the Egg will immediately acquire the icon.
Pokérus is not present in Pokémon: Let's Go, Pikachu! and Let's Go, Eevee!.
Generation VIII
In Sword and Shield, a Pokémon's summary screen will show the Pokérus icon along with full text saying "POKÉRUS" with the typical smile icon next to the text. When cured, this text is then removed and only the cured icon is shown. These icons are shown with the rest of the Pokémon's icons such as the origin mark and shiny status. In the PC, this text is removed regardless if the Pokémon is infected or cured, only showing the face icon matching the status of infection. It can be seen next to the Pokémon's type and shiny status.
In Brilliant Diamond and Shining Pearl, the Pokémon Center nurse will tell the player that their Pokémon has been infected with Pokérus like in the original Diamond and Pearl games. The icon for the games is almost like how it was in Sword and Shield, except that the infected icon in the PC preview is contained in a pink box similar to how it is presented with text in the summary. The infection text in the Pokémon summary is written out as "Pokérus", with a capital P.
Pokérus does not appear natively in Pokémon Legends: Arceus. It cannot be contracted naturally, nor can infected Pokémon spread the virus to other party members. It also cannot progress towards becoming cured, and is not displayed on status screens. However, an infected Pokemon transferred into Legends: Arceus from Pokémon HOME will still gain bonus EVs.
Generation IX
In Pokémon Scarlet and Violet, Pokérus no longer generates naturally, does not spread to adjacent party Pokémon, cannot be seen on a Pokémon's summary, and does not provide double effort values during battle. However, the data itself is retained in the data structure of the Pokémon, and will remain stored with the Pokémon if transferred from previous games via HOME into Scarlet or Violet, despite no longer having any visible indicator nor in-game effects.
Comments
Generation II
Nurse's comments
"Your Pokémon appear to have tiny life forms stuck to them.
Your Pokémon are healthy and seem to be fine.
But we can't tell you anything more at a Pokémon Center."
Elm's explanation
"Hello, <player>?
I discovered an odd thing.
Apparently there's something called Pokérus that infects Pokémon.
Yes, it's like a virus, so it's called Pokérus.
It multiplies fast and infects other Pokémon too. But that's all.
It doesn't seem to do anything, and it goes away over time.
I guess it's nothing to worry about. Bye!"
Generation III
"Your Pokémon may be infected with Pokérus.
Little is known about the Pokérus except that they are microscopic life-forms that attach to Pokémon.
While infected, Pokémon are said to grow exceptionally well."
Generation IV
Nurse's comments
"Your Pokémon may be infected with the Pokérus.
Little is known about the Pokérus except that they are microscopic life-forms that attach to Pokémon.
While infected, Pokémon are said to grow exceptionally well."
Elm's explanation
When calling the player: "Hello, <player>?
I discovered an odd thing.
Apparently there's something called Pokérus that infects Pokémon.
Yes, it's like a virus, so it's called Pokérus.
It multiplies fast and infects other Pokémon too. But that's all.
It doesn't seem to do anything, and it goes away over time.
I guess it's nothing to worry about. Bye!"
When called by the player: "Hello, <player>?
It seems that Pokémon that have been infected with Pokérus level up better.
We're not quite sure why..."
Generations V-VIII
"Oh... It looks like your Pokémon may be infected with the Pokérus.
Little is known about the Pokérus, except that it is a microscopic life-form that attaches to Pokémon.
While infected, Pokémon are said to grow exceptionally well."
Status icons
Icon from Stadium 2 |
Icon from Generation III |
Icon from Colosseum |
Icon from Generations IV and V |
Icon from Generation VI |
Icon from Generation VII |
Icon from Generation VIII | |||
Cured icon from Generation II |
Cured icon from Stadium 2 |
Cured icon from Generation III |
Cured icon from Colosseum |
Cured icon from Generation IV |
Cured icon from Generation V |
Cured icon from Generation VI |
Cured icon from Generation VII |
Infected and cured icon from Generation VIII |
In the anime
In Oaknapped!, Dr. Namba explained to Professor Oak that the mysterious viral lifeform Pokérus is an important component of his Pokémon Power Acceleration Project (PPAP), a secret project that aims to infect Pokémon with the Pokérus to evolve them at a faster rate. However, all of his specimens had died out. Professor Oak also explains that the term "Pokérus" was coined by combining the words "Pokémon" and "virus" together. Later, Professor Oak began researching about the Pokérus and Team Rocket's true intentions of using it.
In the manga
Pokémon Adventures
Platinum arc
The Pokérus was discussed in The Final Dimensional Duel IX, when Platinum's team was discovered to have this virus and, as a result, became stronger. Her Froslass, Pachirisu, and Cherrim had it prior to being taken from the hospital, and then it spread to the rest of her party. At the hospital, Daisy Oak and Yanase Berlitz realize that the infection is, in fact, the Pokérus.
Trivia
- The Pokérus is an example of a mutualistic virus, in which both host and virus benefit.
- The removal of Pokérus functionality in Pokémon Legends: Arceus, Scarlet, and Violet coincided with the COVID-19 pandemic, as both games would have been in active development during this period. Its removal may have been done to avoid potential controversy, such as the implication of a beneficial virus, or the act of purposely spreading a virus.
In other languages
|
References
This game mechanic article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games. |