Spelunky is © 2008, 2009 Derek Yu and Mossmouth, LLC, and is used under the [Spelunky User License v1.1b](https://spelunky.ai/LICENSE.txt). spelunky.ai is an unofficial fan project, not affiliated with or endorsed by Mossmouth. The game and its assets may not be sold.

Music by George Buzinkai and Jonathan Perry; sound effects made in SFXR. From Spelunky Classic 1.1, © 2008, 2009 Derek Yu and Mossmouth, LLC.

# Full fly knockback

From the spelunky.ai wiki: <https://spelunky.ai/wiki/fly-full-knockback>. Verified against the spelunky.ai port [v0.1.13](https://github.com/851-labs/spelunky/releases/tag/v0.1.13) on 28 October 2026.

Full fly knockback is a quirk of Spelunky Classic in which a Tomb Lord's fly knocks any monster back at full strength, where a heavy one should get half.

| Quirk     |                                                                                                                                                                                                                   |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle                                                                                                                                                                                                      |
| Where     | [`objects/oFly/collision_oEnemy.gml:1-14`](https://spelunky.ai/wiki/source/objects/oFly/collision_oEnemy#L1-L14)                                                                                                  |
| Pinned by | `fidelity/replays/enemy-tomb-lord-fly-knockback.txt`                                                                                                                                                              |
| Row       | [docs/quirks.md §1, Bugs and leftovers in the 1.1 source](https://github.com/851-labs/spelunky/blob/main/docs/quirks.md#1-bugs-and-leftovers-in-the-11-source): “A fly gives a heavy monster the full knockback.” |

A [Tomb Lord](https://spelunky.ai/wiki/tomb-lord)'s flies hurt monsters as well as the player, and knock them back. The code means a heavy
monster to be knocked back half as far, but every monster is heavy, and the lines after the halving set the full
knockback again, so every monster the flies hit, a [Caveman](https://spelunky.ai/wiki/caveman) or a [Hawkman](https://spelunky.ai/wiki/hawkman), is sent flying.

## What happens

A Tomb Lord spits its flies at the player, and a caveman stands between them. The first fly to hit it knocks it
back at the fly's 4 pixels a step and 4 up, and the next at 5[^1].

**Clip: A fly knocks a monster back at full strength.** A Tomb Lord spits flies at the player, and a caveman between them is hit. Each fly knocks it back at the fly's full speed and 4 up, though a heavy monster, as every monster is, should get half the speed and 2 up. ([video](https://spelunky.ai/wiki/media/clips/quirks/fly-full-knockback/clip.mp4))

## Why

When a fly touches a monster other than a Tomb Lord, it picks the knockback by whether the monster is heavy, then
sets the light one again for both:

```gml objects/oFly/collision_oEnemy.gml:1-14
if (other.type != "Tomb Lord")
{
    if (other.heavy)
    {
        other.xVel = xVel*0.5;
        other.yVel = -2;
    }
    else
    {
        other.xVel = xVel;
        other.yVel = -4;
    }
    other.xVel = xVel;
    other.yVel = -4;
```

[`objects/oFly/collision_oEnemy.gml:1-14`](https://spelunky.ai/wiki/source/objects/oFly/collision_oEnemy#L1-L14), from `spelunky.gmk`, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC ([Spelunky User License v1.1b](https://spelunky.ai/LICENSE.txt)).

Every monster is heavy: the monsters' shared create event sets `heavy`, and none of them clears it[^2]. So the heavy branch is the one that runs, and the two lines after it
undo it: every monster a fly hits gets the fly's own speed, 3 to 5 pixels a step, and 4 pixels a step up[^3]. The fly then takes 2 of its hit points and stuns it[^4].

## Reproducing it

Stand in front of a Tomb Lord with a Caveman or a Hawkman between you, so its flies hit the monster first. It
happens in the Temple wherever the three meet. The replay of the clip stages it: the player stands on a pillar in
the Tomb Lord's line, and a caveman stands below, between them. The first fly to hit the caveman (frame 272)
knocks it back at 4 pixels a step and 4 up, not 2 and 2, and takes 2 of its 3 hit points; the next (279) at 5 and
4 up[^5].

## In the port

The spelunky.ai port reproduces it exactly: it's in docs/quirks.md's list of the 1.1 source's bugs[^3], and the oracle's fingerprint of the replay pins both knockbacks. No option turns it off.

## FAQ

### What happens when a Tomb Lord's fly hits another monster in Spelunky Classic?

It takes 2 of the monster's hit points, stuns it, and knocks it back the way the fly was going, at the fly's speed, 3 to 5 pixels a step, and 4 pixels a step up. Only another Tomb Lord is left alone.

### Why doesn't a heavy monster resist the flies' knockback?

The code gives a heavy monster half the push and half the lift, and then sets the full push and lift again for every monster, whatever it just set. As every monster is heavy, the lighter knockback never sticks.

### Where do the flies hit monsters in Spelunky Classic?

In the Temple, where a Tomb Lord spitting at the player can hit a Caveman or a Hawkman standing between them.

## See also

- **Related:** [Tomb Lord](https://spelunky.ai/wiki/tomb-lord), [Caveman](https://spelunky.ai/wiki/caveman), [Hawkman](https://spelunky.ai/wiki/hawkman)

## References

[^1]: Clip quirks/fly-full-knockback

[^2]: [`objects/oEnemy/create.gml:15`](https://spelunky.ai/wiki/source/objects/oEnemy/create#L15)

[^3]: Quirk 1 (docs/quirks.md)

[^4]: [`objects/oFly/collision_oEnemy.gml:16-26`](https://spelunky.ai/wiki/source/objects/oFly/collision_oEnemy#L16-L26)

[^5]: Replay `fidelity/replays/enemy-tomb-lord-fly-knockback.txt`

### Source code

- [`objects/oFly/collision_oEnemy.gml`](https://spelunky.ai/wiki/source/objects/oFly/collision_oEnemy)
- [`objects/oEnemy/create.gml`](https://spelunky.ai/wiki/source/objects/oEnemy/create)
