The Glitchhouse · Gen 1 battle bugs

The Fly and Dig glitch in Pokemon Red, Blue and Yellow

Get fully paralyzed at the top of a Fly, and the game forgets to bring you down. Your Pokemon fights on, and almost nothing can touch it.

By GardenFlouer · tested in the game's own code in an emulator, 10 November 2026 · part of The Glitchhouse and Gen 1 battle bugs

The short answer. In Pokemon Red, Blue and Yellow, a Pokemon that is fully paralyzed on the turn it would come down from Fly (or up from Dig) stays invulnerable. The game clears its charging flag but not its invulnerable flag, so it picks moves as normal while every move that rolls to hit misses it, until it uses Fly or Dig to the end again or switches out. Swift and Bide still hit it.

Your Pidgeot against a Jolteon with THUNDER WAVE. Once Pidgeot is paralyzed, use FLY: if it is fully paralyzed on the way down, Jolteon's moves miss it from then on.Try it in the battler

Flag by flag

A Pokemon in battle carries a byte of flags, wPlayerBattleStatus1 (the other side has its own). Fly and Dig use two of them: "charging up" and "invulnerable". Step through it and watch the byte:

The code

ChargeEffect (engine/battle/effects.asm) sets both flags on Fly's first turn. On the second turn, if nothing stops it, PlayerCanExecuteChargingMove clears both and Fly hits:

; pret pokered engine/battle/core.asm
PlayerCanExecuteChargingMove:
	ld hl, wPlayerBattleStatus1
	res CHARGING_UP, [hl]
	res INVULNERABLE, [hl]
	...
; CheckPlayerStatusConditions, when it is fully paralyzed
.MonHurtItselfOrFullyParalysed
	ld hl, wPlayerBattleStatus1
	ld a, [hl]
	; clear bide, thrashing, charging up, and trapping moves such as warp
	and ~((1 << STORING_ENERGY) | (1 << THRASHING_ABOUT) | (1 << CHARGING_UP) | (1 << USING_TRAPPING_MOVE))
	ld [hl], a

Full paralysis jumps to .MonHurtItselfOrFullyParalysed, which clears charging up and leaves invulnerable set. Next turn the Pokemon is not charging, so the battle menu comes back and it picks moves like any other turn. But every move aimed at it goes through MoveHitTest, and there:

	bit INVULNERABLE, [hl]
	jp nz, .moveMissed   ; before any random number is drawn

Nothing clears the flag except finishing a Fly or Dig (the same PlayerCanExecuteChargingMove) or switching out, when a fresh Pokemon's flags are cleared. The other side's routines are copies, so a foe can get stuck the same way.

What still hits it

Not confusion

pret's comment at PlayerCanExecuteChargingMove says "being fully paralyzed or hurting oneself in confusion removes charging up status resulting in the Pokemon being invulnerable for the whole battle". The code says otherwise for confusion. Before a confused Pokemon hurts itself, CheckPlayerStatusConditions runs:

	ld hl, wPlayerBattleStatus1
	ld a, [hl]
	and 1 << CONFUSED ; if mon hurts itself, clear every other status from wPlayerBattleStatus1
	ld [hl], a

That keeps only the confusion bit, so invulnerable goes too. In my test a confused Pidgeot flew up, hurt itself on the way down, and Golbat's Wing Attack hit it the next turn. Only full paralysis leaves a Pokemon stuck.

Transform, the other side of the bug

TransformEffect_ (engine/battle/move_effects/transform.asm) was meant to fail against a target in the air or underground, but it reads the wrong byte (pret: "this should be target's BattleStatus1"). On your turn it reads your own flag, so a Pokemon stuck invulnerable cannot Transform: in Red and in Yellow, a stuck Mew's Transform said "But, it failed!". On the other side's turn it reads a number that never has that bit, so the other side's Transform always works, even on you while you are stuck. The battler on this site does the same on both sides.

How I checked it

Pidgeot against a Jolteon with THUNDER WAVE: get paralyzed, then FLY until it sticks.Try it in the battler

Questions

What is the Fly glitch in Pokemon Red and Blue?

If a Pokemon is fully paralyzed on the turn it would come down from Fly (or up from Dig), Red, Blue and Yellow clear its charging flag but leave its invulnerable flag set. It then picks moves as normal, while every move that rolls to hit misses it, until it uses Fly or Dig to the end again or switches out.

How do you do the Fly or Dig invulnerability glitch?

Your Pokemon has to be paralyzed, then use Fly or Dig, then be fully paralyzed on the second turn, when it would attack. Full paralysis happens 63 times in 256 (about 25%) each turn, so a paralyzed Pokemon gets stuck on about one Fly in four.

What can hit a Pokemon stuck invulnerable in Gen 1?

Swift (it skips the hit test), Bide's release (it skips it too), the other side's Transform, and Haze, which affects both sides. Every other move that rolls to hit misses with no roll at all, and status moves fail the same way.

Does confusion cause the Fly glitch too?

No, even though pret's comment on the code says so. When a confused Pokemon hurts itself, the game first clears every battle flag except confusion, the invulnerable one included. Only full paralysis leaves it set.

Is the Fly glitch in Gold and Silver?

This page only covers Red, Blue and Yellow; Gold, Silver and Crystal were rewritten and are not covered here.

Was this tested on a real Game Boy?

No. I read the routines in pret's disassembly and ran the game's own code in the PyBoy emulator, in Red and in Yellow: a paralyzed Pidgeot with Fly and a paralyzed Dugtrio with Dig, each fully paralyzed on purpose. Thunderbolt and Tackle then missed them with no hit roll, while Swift and Bide hit.

More Gen 1 battle bugs