Pomeg glitch

The Pomeg glitch is a glitch exclusive to , , and .
==Performing the glitch==
The Pomeg glitch involves using a Pomeg Berry on a Pokémon whose current HP is very low. The Pomeg Berry lowers the HP s of a Pokémon by 10 starting in . Since every 4 EVs is equivalent to 1 HP (at level 100), the Pokémon's HP will decrease with each Pomeg Berry used, as long as the Pokémon has 4 or more EVs in HP. In this way, it is possible to lower the Pokémon's current HP to 0 (without causing it to faint) or a negative number.
For example, if a Pokémon with 8 HP EVs currently has 1 HP out of a maximum of 300, using a Pomeg Berry will decrease the EVs to 0. As a result, the Pokémon should lose 2 HP and have a current HP of -1 and a maximum of 298. However, due to the unsigned manner in which this data is stored, the game interprets a negative number as a very high number; therefore, if a Pokémon's current HP drops to -1, it will be interpreted as 65,535 (two bytes) and be displayed as "?35" as well as the HP bar showing the incorrect amount in percent.
In Generation IV, the glitch was partially corrected so that a Pomeg Berry could not glitch a Pokémon with 3 or fewer HP (a Pomeg Berry will usually decrease a Pokémon's HP by 2). The glitch still exists, but must be performed on a Pokémon with 4 or more current HP and 116 or more HP EVs. When a Pomeg Berry is consumed with more than 110 HP EVs, it resets the EVs to 100. With an EV total of 116, the Pokémon would lose at least 4 HP to reach 0 current HP. The Pomeg glitch does not occur in or Generation V as the current HP will no longer change if it would not exceed the reduced maximum HP. In addition, in Generation V, the behavior of the Berries reducing EVs was reverted to always reducing EVs by up to 10, even if it had more than 110 EVs on that particular stat.
The player can undo the effects by simply healing in a Pokémon Center or using a Revive when the HP goes back to 0 after using a healing item during which the HP is at "?35".
===Setting up the glitch===
This is most commonly done by using a Pokémon with and an odd HP stat. The procedure to prepare a Pokémon to use for the glitch differs between games.
In , the player would go to 's tall grass or to in Sootopolis City's waters, where all damaging moves known by wild Pokémon are , then encounter two wild Pokémon separately (because Curse fails on an already afflicted target), use Curse during each battle, and run away from both battles.
In , the procedure instead involves . Once the Pokémon has reached 1 HP, the player must defeat wild Pokémon, e.g. (which can be encountered on Route 201) to increase HP EVs, so that it will eventually have 4 HP. Since stats are only recalculated when the Pokémon levels up or evolves, a vitamin or a , except the Pomeg Berry, must be used on the Pokémon afterward. 
==Sub-glitches==
Several other glitches derive from the Pomeg glitch, such as the ability to battle with an Egg, battling with no Pokémon at all, or battling for an unlimited amount of times. Other than Eruption/Water Spout related sub-glitch, these cannot be performed in .
===In Generation III===
====Reviving Glitched Pokémon====
If a Potion is used in battle, returning the glitched Pokémon to 0 HP, and the offending Pokémon causes damage to the glitched Pokémon, the glitched Pokémon's sprite will disappear for the remainder of the battle, and the Pokémon will return to full HP, minus the damage from the previous attack.
====Battling with no Pokémon====
If there is only one Pokémon in the player's party when affected by this glitch, and goes into faint status using a healing item, the player will not white out. This is because the game does not check for this on the field. If the player walks into tall grass and encounters a wild Pokémon or starts a battle in any other way, the Pokémon will be sent out with 0 HP, the animation will not play, and will faint at the beginning of the battle if it is commanded to attack the opponent, causing the normal whiteout scenario. If on the first turn an item is used to revive the Pokémon the battle will continue as normal.
====Battling with an Egg====
If the player has only an Egg in their party with the Pokémon affected, the Egg (or rather, the Pokémon that would be inside) can be forced into battle by following the same steps, but putting the Egg at the head of the party. The Egg will have the same stats it would have upon hatching, as well as all the moves. This allows it to battle as if it were a normal Pokémon. When battling with an Egg, the sprite of the Pokémon within the Egg is displayed; however, there may be irregularity in the coloring of the Pokémon. This may be because the game is reading the backsprite of the Pokémon within the Egg and the color palette of the Egg itself. 
An Egg that battles can gain experience in this way, and with patience, level up, learn moves, and even evolve before hatching. However, when it hatches the level is set to 5, s reset to zero and all EXP gained in the Egg is removed. This allows level 5 versions of high-evolutionary Pokémon such as or to be obtainable, it also allows otherwise illegal moveset/level combinations, such as a level 5 with .
If the player has other Pokémon in the party, to prevent blacking out, the player has to use a (Max) Revive or a Revival Herb on any other Pokémon in the party.
====Healing with Eruption/Water Spout====
If the Pokémon that has been affected by the glitch uses Eruption or Water Spout, the attack may heal the opponent if the user has high enough Sp. Atk and the opponent has a low level, low Sp. Def and double weakness to the attack.
This is because Water Spout deals damage based on the user's current HP, and performing the Pomeg Glitch gives the user approximately 65535 HP. With a high enough Sp.Atk value, it causes the damage dealt to be so high it underflows to a negative value (the damage value was a integer in this generation, which was changed to unsigned in Generation V). A full health opponent's HP bar will appear to drain, but it will not faint. An opponent with less than full HP will be healed to full HP.
====Near-infinite battle====
If the Pokémon that has been affected is sent out with 65,535 HP against an opponent that uses an HP-stealing move like , the Pokémon's HP will be stolen until it reaches the normal maximum amount, which is usually over 65,000 HP lower than the glitched amount for a Pokémon with the absolute maximum HP. If a second HP-stealing move is used, the Pokémon will lose its full HP, go down to 0, and then repeat from the top again.
====Sprite glitch====
This sub-glitch changes a Pokémon's sprite depending on the moves the affected Pokémon performs or is attacked with.
After performing the Pomeg glitch, the player must enter a battle using a Pokémon currently affected by the glitch against another that knows one of the correct moves. The second step is letting a turn pass either by use of the Oran Berry on the glitched Pokémon, moves with little or no damage to the foe, or wait for it to use the effective move twice, unless the player's Pokémon has been damaged before. If this were to happen, it will only require being hit once by the effective move.
Certain moves affect the glitched Pokémon.
Move	Effect
 	Drags sprite towards enemy
 	Enemy sprite goes near Acid and moves with it.
 	Moves the Pokémon from the enemy to the original position of the glitched Pokémon
 	Moves along the string
 	Never ends, screen freezes with the words "Wild/Foe (Pokémon) used Odor Sleuth!"
 	User flies down with the sun's rays.
 	Moves along the bottom Jaw/Teeth.
 	User shrinks to very small size.
 	User's sprite is rotated.
Certain moves also affect the opponent Pokémon.
Move	Effect
 	Depends on opponent Pokémon, commonly reduces size of opponent sprite.
 	Inverts opponent Pokémon's sprite. Causes very odd effects between turns.
 	A box (color depends by Pokémon) appears on user and user goes narrower. After this user returns to normal width. Part of Sunny Day's odd effects.
====Egg trade evolution glitch====
If a Pokémon in an evolves into a Pokémon that evolves by trade such as , the Egg will evolve when traded, for example into .
====Access Pokémon beyond slot 6====
This sub-glitch allows the player to access Pokémon beyond slot 6. 
To do this, the player has to have at least 3 Pokémon in their party, one to four fainted, one normal, and one affected by the Pomeg glitch.
The player should enter a wild battle with their Pomeg glitched Pokémon, swap to their normal Pokémon, and then run. After doing this, the normal Pokémon should be deposited into a PC at a Pokémon Center, and then a Potion should be used on the Pomeg-affected Pokémon to get its HP at 0. Once done, entering any battle will cause the player to send out ??????????, and viewing its Pokémon screen, looking at any of its stats, exiting the stat screen, and then scrolling down allows the player access Pokémon beyond the 6th slot.
=====Glitzer Popping=====
===In Generation IV===
====Battling with no Pokémon====
In , if the player's only Pokémon are fainted or s, battling a Trainer in the Battleground, , or Seven Stars Restaurant will cause the player to send out a ----- (or two ----- at the Seven Stars Restaurant). 
This glitch can be performed if the last conscious non-Egg Pokémon in the player's party is a Pokémon whose level is above 40 but less than 100 with a high amount of s, whose remaining HP is the same as below.
Remaining HP = (HP lost through use of a Pomeg Berry) - (HP gained through use of a Rare Candy after using a Pomeg Berry)
Then a Pomeg Berry must be used, which makes the Pokémon's HP roll over to a number. Then a Rare Candy must be used to level up the Pokémon, causing it to faint. The player does not black out.
By battling at the or Battleground, the player will send out a -----.
At the Seven Stars Restaurant, the player can perform the glitch in a Double Battle. Once the battle starts, the player will send out two -----. Due to being unable to target -----, opponents will target their ally.
This can be performed with one or more Pokémon, as long as all of them are fainted or s. If performed with more than one Pokémon, the second Pokémon will appear in the first slot on the party screen, the third in the second, etc.
During the battle, if the game checks to see if either player has no Pokémon left (whenever a Pokémon takes damage and at the end of each round), the player will automatically black out if the only Pokémon they have are -----. If performed the glitch with a fainted Pokémon in the second party slot or further and a Revive or Revival Herb is used to revive it mid-battle, the player will not lose; however, at the end of the round the player will be forced to switch it in. If this happens in a Double Battle under this glitch, the Pokémon will replace the left -----; the right -----'s sprite will remain, but its turn will always be skipped.
(glitch begins at 5:14)
==Related articles==
Category:Glitches
fr:Bug de la Baie Grena
it:Glitch della Baccagrana
zh:榴石果（漏洞）