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.

# Whip

From the spelunky.ai wiki: <https://spelunky.ai/wiki/whip>. Verified against the spelunky.ai port [v0.1.10](https://github.com/851-labs/spelunky/releases/tag/v0.1.10) on 27 October 2026.

The Whip is the weapon the player always has in Spelunky Classic: a crack in front of him that takes 1 hit point from a monster on each step it touches it.

![A brown leather whip lashing out to the right](https://spelunky.ai/wiki/media/66c8732d531340f4/sprites/sWhipRight/frames/0%404x.png)

| Whip   |                                              |
| ------ | -------------------------------------------- |
| Kind   | Weapon                                       |
| Effect | Hits in front, and behind as it winds up[^1] |
| Damage | 1 hit point[^2]                              |
| Object | `oWhip`                                      |

The player has it from the start of every game and never loses it: it's what the attack key does when his
hands are empty. A swing hurts what's behind him as well as what's in front, and most monsters have a single
hit point, so it kills them outright; bigger ones take it a hit point a step. A few monsters' own code
changes what it does to them (Damage, below). The [Machete](https://spelunky.ai/wiki/machete) and the [Mattock](https://spelunky.ai/wiki/mattock) swing the
same way, harder.

## Usage

**Clip: Whip crack and wind-up.** Two snakes close in on the player from both sides. One swing of the whip kills both: the wind-up behind him takes the snake at his back, then the crack in front takes the other. ([video](https://spelunky.ai/wiki/media/66c8732d531340f4/clips/whip/crack/clip.mp4))

Pressing the attack key with empty hands, standing, walking, jumping or falling but not ducking, starts a
swing[^3]; with anything in his hands, the key uses or throws
that instead[^4]. A swing has two parts:

- **The wind-up**, 16 pixels behind the player, made on the swing's first steps; it lasts 3
  steps[^5][^6].
- **The crack**, 16 pixels in front of him, made once the swing's animation is past its fifth frame and kept
  until the swing ends[^7][^8].

Both follow the player if he moves[^9][^10]. In play, the wind-up comes on
the step after the key is pressed and the crack 4 steps after that, for 7 steps. A new swing can't start
until the last one's animation has ended[^11][^12]. The
clip shows both parts: two [Snakes](https://spelunky.ai/wiki/snake) close in from either side, and one swing kills both, the one
behind him first[^13].

## Damage

Most monsters run the code their parent object shares, which takes the
whip's 1 hit point on every step the crack or the wind-up touches them, with no pause between
hits[^14][^15].
A crack that stays on a [Megamouth](https://spelunky.ai/wiki/megamouth) for all 7 of its steps takes 7 hit
points[^16]. Monsters with code of their own:

| Monster                                                                                                                               | Crack                                                                 | Wind-up                    |                 |
| ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -------------------------- | --------------- |
| [Caveman](https://spelunky.ai/wiki/caveman), [Hawkman](https://spelunky.ai/wiki/hawkman), [Vampire](https://spelunky.ai/wiki/vampire) | 1, and stuns it; nothing while it's stunned                           | The same                   | [^17][^18]      |
| [Mantrap](https://spelunky.ai/wiki/mantrap)                                                                                           | 1, and stuns it; nothing while it's stunned                           | The same                   | [^19]           |
| [Giant Spider](https://spelunky.ai/wiki/giant-spider)                                                                                 | 1, at most once every 10 steps                                        | 1 a step, with no wait     | [^20][^21][^16] |
| [Tomb Lord](https://spelunky.ai/wiki/tomb-lord)                                                                                       | 1, at most once every 10 steps, and only level with its top 12 pixels | 1 a step, from any height  | [^22][^16]      |
| [Yeti](https://spelunky.ai/wiki/yeti)                                                                                                 | Nothing: it knocks the Yeti back                                      | Nothing: it knocks it back | [^23][^24]      |
| [Yeti King](https://spelunky.ai/wiki/yeti-king)                                                                                       | Nothing                                                               | 1 a step                   | [^25][^16]      |
| [Magma Man](https://spelunky.ai/wiki/magma-man)                                                                                       | Nothing                                                               | 1 a step, off its life     | [^26][^16]      |
| [Ghost](https://spelunky.ai/wiki/ghost)                                                                                               | Nothing                                                               | Nothing                    | [^27]           |

The wind-up hurts the Giant Spider, the Tomb Lord, the Yeti King and the Magma Man because none of them has
code of its own for it, so they take the shared code's, which has no wait: with his back to a Giant Spider, a
swing takes 3 of its 10 hit points in 3 steps[^28][^16].

## Interactions

- **Shopkeepers.** The crack or the wind-up doesn't hurt one, but knocks him back and makes
  him attack[^29][^30].
- **[Jars](https://spelunky.ai/wiki/jar).** A crack breaks one, which may let out gold, a gem, a [Spider](https://spelunky.ai/wiki/spider) or a
  Snake[^31].
- **Damsels.** The crack or the wind-up makes a Damsel jump without hurting her, and angers the
  Shopkeeper if she's for sale[^32][^33].

## Tips

- With his back to a monster, the player still hits it: the wind-up is the only part of the Whip that
  hurts the Yeti King or the Magma Man.
- A Caveman, a Hawkman or a Vampire takes 1 a swing and is stunned by it, so a stunned one is better finished
  some other way.

## Trivia

- As the Tunnel Man, the swing makes a [Mattock](https://spelunky.ai/wiki/mattock)'s hit instead
  of the crack[^34].
- The wind-up and the crack are both of type "Whip", and only the Machete's are "Machete": the code that
  treats the Machete differently tests that name[^35][^36].

## FAQ

### How much damage does the Whip do in Spelunky Classic?

1 hit point for each step it touches a monster, with no pause between steps. Most monsters have 1 hit point and die to the first; a crack that stays on a bigger one, such as a [Megamouth](https://spelunky.ai/wiki/megamouth), can take up to 7.

### Can the Whip hit monsters behind the player in Spelunky Classic?

Yes. Each swing starts with a wind-up 16 pixels behind the player, which hurts a monster there for 1 hit point on each of its 3 steps, as the crack does in front.

### Why doesn't the Whip hurt a Yeti in Spelunky Classic?

A [Yeti](https://spelunky.ai/wiki/yeti)'s own code only takes damage from a hit that punctures, which the Whip's doesn't: the crack knocks it back instead. A [Machete](https://spelunky.ai/wiki/machete) or a [Mattock](https://spelunky.ai/wiki/mattock) punctures.

### Can you use the Whip while holding an item in Spelunky Classic?

No. With something in the player's hands, the attack key throws or uses it instead; the Whip only comes out when his hands are empty.

## Gallery

**Clip: A whip swing hurts a monster on every step it touches it.** The player whips a megamouth three times as it charges. A swing has no pause between hits: the second one stays on the fish for seven steps and takes a hit point on each, seven in all. ([video](https://spelunky.ai/wiki/media/66c8732d531340f4/clips/quirks/whip-hits-every-step/clip.mp4))

**Clip: Giant spider and the whip's wind-up.** With his back to a giant spider, the player swings the whip: the wind-up behind him takes 3 of its 10 hit points, 1 on each of three steps in a row, though its own code waits 10 steps between whip hits. The spider leaps on him. ([video](https://spelunky.ai/wiki/media/66c8732d531340f4/clips/giant-spider/wind-up/clip.mp4))

## See also

- **Related:** [Machete](https://spelunky.ai/wiki/machete), [Mattock](https://spelunky.ai/wiki/mattock)
- **Damages:** [Alien](https://spelunky.ai/wiki/alien), [Alien Boss](https://spelunky.ai/wiki/alien-boss), [Bat](https://spelunky.ai/wiki/bat), [Caveman](https://spelunky.ai/wiki/caveman), [Dead Fish](https://spelunky.ai/wiki/dead-fish), [Fire Frog](https://spelunky.ai/wiki/fire-frog), [Frog](https://spelunky.ai/wiki/frog), [Giant Spider](https://spelunky.ai/wiki/giant-spider), [Hawkman](https://spelunky.ai/wiki/hawkman), [Magma Man](https://spelunky.ai/wiki/magma-man) (only its wind-up)[^21], [Mantrap](https://spelunky.ai/wiki/mantrap), [Megamouth](https://spelunky.ai/wiki/megamouth), [Monkey](https://spelunky.ai/wiki/monkey), [Piranha](https://spelunky.ai/wiki/piranha), [Scarab](https://spelunky.ai/wiki/scarab), [Skeleton](https://spelunky.ai/wiki/skeleton), [Snake](https://spelunky.ai/wiki/snake), [Spider](https://spelunky.ai/wiki/spider), [Tomb Lord](https://spelunky.ai/wiki/tomb-lord), [UFO](https://spelunky.ai/wiki/ufo), [Vampire](https://spelunky.ai/wiki/vampire), [Yeti King](https://spelunky.ai/wiki/yeti-king) (Its wind-up only)[^15], [Zombie](https://spelunky.ai/wiki/zombie)

## References

[^1]: `objects/oPlayer1/step.gml:415-533`

[^2]: `objects/oWhip/create.gml:4`

[^3]: `objects/oPlayer1/step.gml:1175-1202`

[^4]: `objects/oPlayer1/step.gml:1313-1319`

[^5]: `objects/oPlayer1/step.gml:524-533`

[^6]: `objects/oWhipPre/create.gml:3-5`

[^7]: `objects/oPlayer1/step.gml:415-480`

[^8]: `objects/oPlayer1/step.gml:535-539`

[^9]: `objects/oWhip/step.gml:1-14`

[^10]: `objects/oWhipPre/step.gml:1-14`

[^11]: `objects/oPlayer1/step.gml:1177`

[^12]: `objects/oPlayer1/other_animation_end.gml:1-5`

[^13]: Clip whip/crack

[^14]: `objects/oEnemy/collision_oWhip.gml:1-8`

[^15]: `objects/oEnemy/collision_oWhipPre.gml:1-8`

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

[^17]: `objects/oCaveman/collision_oWhip.gml:1-17`

[^18]: `objects/oVampire/collision_oWhipPre.gml:1-13`

[^19]: `objects/oManTrap/collision_oWhip.gml:1-20`

[^20]: `objects/oGiantSpider/collision_oWhip.gml:1-7`

[^21]: `objects/oEnemy/collision_oWhipPre.gml:1`

[^22]: `objects/oTombLord/collision_oWhip.gml:1-8`

[^23]: `objects/oYeti/collision_oWhip.gml:22-30`

[^24]: `objects/oYeti/collision_oWhipPre.gml:22-30`

[^25]: `objects/oYetiKing/collision_oWhip.gml:1-16`

[^26]: `objects/oMagmaMan/collision_oWhip.gml:1-6`

[^27]: `objects/oGhost/collision_oWhip.gml:1`

[^28]: Clip giant-spider/wind-up

[^29]: `objects/oShopkeeper/collision_oWhip.gml:1-19`

[^30]: Replay `fidelity/replays/shop-seed-11-whip.txt`

[^31]: `objects/oJar/collision_oWhip.gml:1-21`

[^32]: `objects/oDamsel/collision_oWhip.gml:13-23`

[^33]: `objects/oDamsel/collision_oWhipPre.gml:13-23`

[^34]: `objects/oPlayer1/step.gml:432-446`

[^35]: `objects/oWhipPre/create.gml:3`

[^36]: `objects/oCaveman/collision_oWhip.gml:1`

### Source code

- `objects/oWhip/create.gml`
- `objects/oWhip/step.gml`
- `objects/oWhipPre/create.gml`
- `objects/oWhipPre/step.gml`
- `objects/oPlayer1/step.gml`
- `objects/oPlayer1/other_animation_end.gml`
- `objects/oEnemy/collision_oWhip.gml`
- `objects/oEnemy/collision_oWhipPre.gml`
