From Bulbapedia, the community-driven Pokémon encyclopedia.
The Pomeg glitch is a glitch exclusive to Pokémon Emerald, and Generation IV games.
Performing the glitch
The Pomeg glitch involves using a Pomeg Berry to lower a Pokémon's maximum HP by 2 or more. To perform the glitch, the player must use a Pomeg Berry on a Pokémon to lower the HP when it is low. Since the Pomeg Berry lowers HP by 10 or more EV points, the HP stat of the Pokémon becomes for example -1, which the game interprets as 65,535 because the byte managing HP is unsigned (displayed as "?35"). In Generation IV, the glitch still exists but must be performed on a Pokémon with greater than four health. (This is possible, because if the player exploits the glitch with a Pokémon which has over 100 EVs in HP, its EVs in HP will be reset to 100).
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. These sub-glitches cannot be performed in Pokémon Ruby and Sapphire.
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, if Shiny 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.
Attempting to battle with only a fainted Pokémon in Generation IV will result in a game freeze, unless a trainer in the Battleground is battled, in which case the player will send out a -----.
Battling with an egg
If the player has only an egg in his or her 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 of 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, EVs reset to zero and all EXP gained in the egg is removed. This allows level 5 versions of high-evolutionary Pokémon such as Tyranitar or Dragonite to be obtainable, it also allows otherwise illegal moveset/level combinations, such as a level 5 Staryu with Hydro Pump.
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 Absorb, the Pokémon's HP will be stolen until it reaches the normal maximum amount, nearly 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.
A video detailing the various effects of the glitch
|| This section does not yet meet the quality standards of Bulbapedia. Please feel free to edit this section to make it conform to Bulbapedia norms and conventions.
This sub-glitch changes a Pokémon's sprite depending on the moves the affected Pokemon performs or is attacked with.
After performing the Pomeg glitch, the player must enter a battle using a Pokemon under its effect 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. Were this to happen, it is only required to be hit once by the effective move.
These are some (not all) of the moves that affect sprite of glitched Pokémon,
||Drags sprite towards enemy
||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!
A video about the enemy attacking you
These are also some (not all) moves that affect the enemy Pokémon,
||Depends on enemy Pokémon, commonly reduces size of enemy spirte.
A video about attacking the enemy
|| This section is incomplete.|
Please feel free to edit this section to add missing information and complete it.
*Indicates glitches which have been officially acknowledged