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.

# Damage and stun

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

Damage in Spelunky Classic is what takes the player's hearts: a monster's touch, a trap, an explosion or a long drop, many of which also stun him.

Each thing that hurts the player takes its own number of [hearts](https://spelunky.ai/wiki/health), from 1 for most monsters to
99 for lava. Many also stun him for a time, during which he can't move, and a monster's touch knocks him
back and makes him invincible to monsters for a second. A fall hurts too, if it's long enough.

## How it works

### Monsters' touches

Most monsters' touch is the code they share, their parent object's (`oEnemy`'s). When the player
touches one without [Stomping](https://spelunky.ai/wiki/stomping) it, and isn't invincible, he's knocked away from it at
6 pixels per step, blinks, and is invincible for 30 steps; then, if
he has a heart left, he loses one[^1]. Monsters with
a touch of their own take their own amount, usually the same way ([Numbers](https://spelunky.ai/wiki/damage#numbers)). A few do something
else:

- A [Yeti](https://spelunky.ai/wiki/yeti), a [Hawkman](https://spelunky.ai/wiki/hawkman) or an angry [Shopkeeper](https://spelunky.ai/wiki/shopkeeper) grabs the player and throws
  him over its head, stunned, unless there's a block above it; the first wall or floor he hits takes a
  heart[^2][^3]. A long fall cancels that heart, as the landing costs
  one anyway[^4].
- A [Magma Man](https://spelunky.ai/wiki/magma-man) burns him: he's stunned and set alight as well[^5].
- A [Ghost](https://spelunky.ai/wiki/ghost) kills him outright, as does a [Mantrap](https://spelunky.ai/wiki/mantrap), which eats
  him[^6][^7].

### Invincibility

**Clip: Invincible after a bite.** The player walks into a snake and loses a heart, then blinks: while he blinks he walks through a second snake unharmed. Back among them, a snake bites him again, and the next bite comes exactly a second later, when the blinking stops. ([video](https://spelunky.ai/wiki/media/9298410b19d5e050/clips/damage/invincible/clip.mp4))

While the player is invincible he blinks for as long, the two counts going down one a step[^8]. Only monsters' touches check it. The checks in his own
step for arrows, thrown rocks, lasers, explosions, traps, spikes, lava and falls don't, and neither do a
bullet's or a Tomb Lord's fly's, so they hurt him while he
blinks[^9][^10][^11]. Nor do those checks space their hits
out: an explosion, a Spear Trap or a Smash Trap he stays in hits him on every step[^12]. Besides a monster's touch, the [Ankh](https://spelunky.ai/wiki/ankh)'s revival makes him invincible, for
60 steps, and so does going through a level's exit, for the rest of the level[^13][^14].

The clip shows it. A Snake bites the player, and while he blinks he walks through a second Snake without
losing a heart. Back among them, he's bitten again, and once more exactly 30 steps
later, as his blinking stops[^15].

### Stun

While the player is stunned, every key is ignored[^16]. He
lets go of what he holds, which is thrown up out of his hands and, if it's a Bow, fires[^17]; a whip swing stops and an open
[Parachute](https://spelunky.ai/wiki/parachute) tears away[^18]. In the air his speed
across isn't slowed, and he bounces off walls at half his speed and off ceilings at most of it[^19][^20].

Most stuns set a count of steps, which only goes down while he lies still, in the stunned pose: the stun ends
when it reaches 0[^21][^22]. So a stun that sends him flying lasts its steps
after he stops, and a throw by a Yeti, a Hawkman or a Shopkeeper, which sets no count, lasts until he comes
to rest[^23].

### Long drops

**Clip: Long drop.** The player walks off a ledge and falls about twenty blocks. He lands on his 35th step of falling, loses two of his four hearts and lies stunned for two seconds before he can move again. ([video](https://spelunky.ai/wiki/media/9298410b19d5e050/clips/damage/long-drop/clip.mp4))

The player's step counts the steps he's been falling, unless he's climbing[^24]. Landing after more than 16 is a long drop: he's stunned
for 60 steps more, bounces up, and loses 1 heart, 2 after more than 32 steps and
10 after more than 48[^25]. Landing on a
[Spring Trap](https://spelunky.ai/wiki/spring-trap) isn't one[^26], and an open
[Parachute](https://spelunky.ai/wiki/parachute) or [Cape](https://spelunky.ai/wiki/cape) keeps the count at 0[^27][^28], as does a [stomp](https://spelunky.ai/wiki/stomping), which ends the fall in a bounce[^29].

The clip shows a drop of about twenty blocks. The player lands on his 35th step of falling, loses two of his
four hearts and lies stunned for 2 seconds[^30].

## Numbers

What each thing does to the player, from the code most monsters share to the checks in his own step:

| Source                                                                                                                                                 | Hearts                              | Also                                  |            |
| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------- | ------------------------------------- | ---------- |
| Most monsters' touch, such as a [Snake](https://spelunky.ai/wiki/snake)'s                                                                              | 1                                   | Knocked back, invincible for 30 steps | [^1]       |
| A [Giant Spider](https://spelunky.ai/wiki/giant-spider)'s or a [Tomb Lord](https://spelunky.ai/wiki/tomb-lord)'s touch                                 | 2                                   | As above                              | [^31][^32] |
| The [Yeti King](https://spelunky.ai/wiki/yeti-king)'s touch                                                                                            | 2, on a real level only             | As above                              | [^33]      |
| A [Magma Man](https://spelunky.ai/wiki/magma-man)'s touch, or a blob of its magma                                                                      | 2                                   | Stunned for 20 steps, set alight      | [^5][^34]  |
| A Tomb Lord's fly                                                                                                                                      | 2                                   | Stunned for 20 steps                  | [^35]      |
| A [Yeti](https://spelunky.ai/wiki/yeti), [Hawkman](https://spelunky.ai/wiki/hawkman) or [Shopkeeper](https://spelunky.ai/wiki/shopkeeper) throwing him | 1, when he hits a wall or the floor | Stunned until he comes to rest        | [^3]       |
| A [Ghost](https://spelunky.ai/wiki/ghost) or a [Mantrap](https://spelunky.ai/wiki/mantrap)                                                             | All: he dies                        |                                       | [^36][^37] |
| A bullet, such as an angry Shopkeeper's from his [Shotgun](https://spelunky.ai/wiki/shotgun)                                                           | 4                                   | Stunned for 20 steps                  | [^38]      |
| An [Arrow](https://spelunky.ai/wiki/arrow) moving faster than 3 pixels per step across                                                                 | 2                                   | Stunned for 20 steps                  | [^39]      |
| A [Rock](https://spelunky.ai/wiki/rock) moving faster than 4 pixels per step across                                                                    | 2                                   | Stunned for 20 steps                  | [^40]      |
| A [UFO](https://spelunky.ai/wiki/ufo)'s laser                                                                                                          | 3                                   | Stunned for 20 steps                  | [^41]      |
| The [Alien Boss](https://spelunky.ai/wiki/alien-boss)'s psychic wave                                                                                   | 1                                   | Stunned for 40 steps                  | [^42]      |
| An explosion, such as a [Bomb](https://spelunky.ai/wiki/bomb)'s                                                                                        | 10, each step he's in it            | Stunned for 100 steps, set alight     | [^43]      |
| A [Spear Trap](https://spelunky.ai/wiki/spear-trap)'s spears                                                                                           | 4, each step they strike him        | Thrown up and away                    | [^44]      |
| A [Smash Trap](https://spelunky.ai/wiki/smash-trap)                                                                                                    | 10, each step he touches it         | Thrown                                | [^45]      |
| A [Ceiling Trap](https://spelunky.ai/wiki/ceiling-trap) coming down                                                                                    | 10, each step                       |                                       | [^46]      |
| Falling onto [Spikes](https://spelunky.ai/wiki/spikes)                                                                                                 | 99                                  |                                       | [^47]      |
| [Lava](https://spelunky.ai/wiki/lava)                                                                                                                  | 99, each step he's in it            |                                       | [^48]      |
| Being crushed (his middle inside a block)                                                                                                              | 99                                  |                                       | [^49]      |
| Falling out of the bottom of the level                                                                                                                 | 99                                  |                                       | [^50]      |
| Landing after more than 16, 32 or 48 steps of falling                                                                                                  | 1, 2 or 10                          | Stunned for 60 more steps             | [^25]      |

## Examples

- **A Snake's bite** takes 1 heart, and touching it again within the second after does nothing[^15].
- **A Bomb at the player's feet** takes all 4 of a new game's hearts, and hits him again on each step he's
  in the explosion[^51].
- **A long drop** of 35 steps takes 2 hearts and stuns him for 2 seconds[^30].

## Quirks

- **The deaths table counts some hits that don't kill.** The end-of-game statistics' explosion row counts
  every step of an explosion the player survives, and not the one that kills him; the Spear, Smash and
  Ceiling Trap rows count every hit[^12][^51].
- **Some monsters' kills aren't counted at all.** A [Bat](https://spelunky.ai/wiki/bat), a [Zombie](https://spelunky.ai/wiki/zombie) and a
  [Dead Fish](https://spelunky.ai/wiki/dead-fish) never set the name the touch tallies by, and the [Megamouth](https://spelunky.ai/wiki/megamouth)'s is
  spelled another way; a [Vampire](https://spelunky.ai/wiki/vampire)'s own touch has no tally, and nor does a blob of magma's, a copy
  of the Magma Man's[^12][^52].
- **The Yeti King's touch costs nothing in a custom level**, though it knocks the player back and its kill is
  tallied all the same[^12][^53].
- **A Smash Trap throws the player toward it**, and a lit one on a dark level never takes the 10 hearts: the
  player's check doesn't see it[^12].
- **The arrow check takes the nearest arrow**, touching him or not, so a spent arrow lying beside him can
  spare him a fast one[^12].

## FAQ

### How long are you invincible after getting hit in Spelunky Classic?

1 second (30 steps) after a monster's touch. It only protects against monsters' touches: arrows, explosions, traps and falls hurt the player while he blinks.

### How far can you fall without taking damage in Spelunky Classic?

For 16 steps, about half a second. Landing after a longer fall stuns the player and takes 1 heart, 2 after more than 32 steps and 10 after more than 48, unless he lands on a [Spring Trap](https://spelunky.ai/wiki/spring-trap).

### How long does a stun last in Spelunky Classic?

It depends on what stunned the player: 20 steps for an arrow or a thrown [Rock](https://spelunky.ai/wiki/rock), 60 steps for a long drop, 100 steps for an explosion. The count only starts once he's lying still, so a stun that sends him flying lasts longer.

### What does being stunned do in Spelunky Classic?

The player can't move or act: every key is ignored. He drops what he's holding, which flies up out of his hands, and bounces off the walls he's thrown into.

## See also

- **Related:** [Health](https://spelunky.ai/wiki/health), [Stomping](https://spelunky.ai/wiki/stomping), [Throwing](https://spelunky.ai/wiki/throwing)

## References

[^1]: `objects/oEnemy/collision_oCharacter.gml:14-25`

[^2]: `objects/oYeti/collision_oCharacter.gml:42-67`

[^3]: `objects/oPlayer1/step.gml:1815-1842`

[^4]: `objects/oPlayer1/step.gml:257`

[^5]: `objects/oMagmaMan/collision_oCharacter.gml:1-18`

[^6]: `objects/oGhost/collision_oCharacter.gml:1-16`

[^7]: `objects/oManTrap/collision_oCharacter.gml:20-47`

[^8]: `objects/oPlayer1/step.gml:1929-1937`

[^9]: `objects/oPlayer1/step.gml:1513-1710`

[^10]: `objects/oBullet/collision_oCharacter.gml:1-6`

[^11]: `objects/oFly/collision_oCharacter.gml:1-6`

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

[^13]: `objects/oPlayer1/step.gml:1885-1886`

[^14]: `objects/oPlayer1/step.gml:871-872`

[^15]: Clip damage/invincible

[^16]: `scripts/characterStepEvent.gml:71-88`

[^17]: `objects/oPlayer1/step.gml:1714-1736`

[^18]: `objects/oPlayer1/step.gml:1738-1753`

[^19]: `scripts/characterStepEvent.gml:266-276`

[^20]: `scripts/characterStepEvent.gml:731-736`

[^21]: `objects/oPlayer1/step.gml:243-250`

[^22]: `objects/oPlayer1/step.gml:1793-1797`

[^23]: `objects/oYeti/collision_oCharacter.gml:65-67`

[^24]: `objects/oPlayer1/step.gml:254-257`

[^25]: `objects/oPlayer1/step.gml:268-289`

[^26]: `objects/oPlayer1/step.gml:268`

[^27]: `objects/oPlayer1/step.gml:15-18`

[^28]: `objects/oPlayer1/step.gml:252`

[^29]: `objects/oEnemy/collision_oCharacter.gml:11`

[^30]: Clip damage/long-drop

[^31]: `objects/oGiantSpider/collision_oCharacter.gml:28-31`

[^32]: `objects/oTombLord/collision_oCharacter.gml:30-33`

[^33]: `objects/oYetiKing/collision_oCharacter.gml:27-30`

[^34]: `objects/oMagma/collision_oCharacter.gml:1-15`

[^35]: `objects/oFly/collision_oCharacter.gml:1-16`

[^36]: `objects/oGhost/collision_oCharacter.gml:16`

[^37]: `objects/oManTrap/collision_oCharacter.gml:44`

[^38]: `objects/oBullet/collision_oCharacter.gml:1-17`

[^39]: `objects/oPlayer1/step.gml:1513-1535`

[^40]: `objects/oPlayer1/step.gml:1538-1563`

[^41]: `objects/oPlayer1/step.gml:1567-1591`

[^42]: `objects/oPlayer1/step.gml:1594-1611`

[^43]: `objects/oPlayer1/step.gml:1614-1627`

[^44]: `objects/oPlayer1/step.gml:1629-1647`

[^45]: `objects/oPlayer1/step.gml:1649-1668`

[^46]: `objects/oPlayer1/step.gml:1670-1679`

[^47]: `objects/oPlayer1/step.gml:1693-1703`

[^48]: `objects/oPlayer1/step.gml:196-212`

[^49]: `objects/oPlayer1/step.gml:1493-1511`

[^50]: `objects/oPlayer1/step.gml:221-239`

[^51]: Replay `fidelity/replays/action-bomb-death-mines-seed-1.txt`

[^52]: Replay `fidelity/replays/enemy-vampire-seed-163-death.txt`

[^53]: Replay `fidelity/replays/enemy-yeti-king-custom-level-touch.txt`

### Source code

- `objects/oEnemy/collision_oCharacter.gml`
- `objects/oPlayer1/step.gml`
- `scripts/characterStepEvent.gml`
- `objects/oYeti/collision_oCharacter.gml`
- `objects/oBullet/collision_oCharacter.gml`
- `objects/oFly/collision_oCharacter.gml`
- `objects/oMagmaMan/collision_oCharacter.gml`
