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.

# The lit Smash Trap's harmless touch

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

The lit Smash Trap's harmless touch is a quirk of Spelunky Classic in which a dark level's Smash Trap's touch takes no hearts: it only crushes.

| Quirk     |                                                                                                                                                                                                                      |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle                                                                                                                                                                                                         |
| Where     | [`objects/oPlayer1/step.gml:1649-1668`](https://spelunky.ai/wiki/source/objects/oPlayer1/step#L1649-L1668)                                                                                                           |
| Pinned by | `fidelity/replays/trap-dark-smash.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 lit smash trap isn't a smash trap to the player.” |

A [Smash Trap](https://spelunky.ai/wiki/smash-trap) hits the player for 10 hearts on every step it touches him, throws him and makes him
drop what he holds. On a [dark level](https://spelunky.ai/wiki/dark-level) the [Temple](https://spelunky.ai/wiki/temple) makes the lit kind instead, which glows
and slides as the plain one does, but isn't a Smash Trap to the one check that hits the player, so its touch
does nothing. It kills only by sliding on into him until he's crushed.

## What happens

On a dark Temple level, the player jumps into the line of a lit Smash Trap. It slides at him, and its touch
neither takes hearts nor throws him: it slides on into him, and crushes him[^1].

**Clip: Lit smash trap.** On a dark Temple level, the player jumps into the line of a lit smash trap, which slides at him and crushes him. ([video](https://spelunky.ai/wiki/media/clips/smash-trap/lit/clip.mp4))

## Why

On a dark level, `scrEntityGen` makes `oSmashTrapLit` where it would make `oSmashTrap`[^2]. The lit kind has the plain one's code[^3], but not the plain one as its parent: both are children of
`oMovingSolid`, where the lit Arrow and Spear Traps are children of their plain kinds[^4]. The
player's step looks for a Smash Trap by name:

```gml objects/oPlayer1/step.gml:1649-1657
if (collision_rectangle(x-6, y-6, x+6, y+7, oSmashTrap, 0, 0))
{
    if (global.plife > 0 and isRealLevel()) global.miscDeaths[8] += 1;

    obj = instance_nearest(x, y, oSmashTrap);
    global.plife -= 10;
    if (obj.x+8 < x) xVel = -rand(4,6);
    else xVel = rand(4,6);
    yVel = -6;
```

[`objects/oPlayer1/step.gml:1649-1657`](https://spelunky.ai/wiki/source/objects/oPlayer1/step#L1649-L1657), 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)).

A check for `oSmashTrap` finds its children, and the lit kind isn't one, so none of it runs: no 10 hearts, no
throw, no dropping what he holds[^5], and no count in the deaths
table's `SMASH TRAP` row (`miscDeaths[8]`). The lit trap is still solid, so once it has slid into him until his
middle is inside it, the crush check any solid sets off takes 99 hearts, counted as `CRUSHED`
(`miscDeaths[2]`)[^6].

## Reproducing it

Reach a dark Temple level with a Smash Trap, which one block in sixty gets once the monsters' rolls fail, and
step into its line[^7]. The replay, with
seed 1, waits at level 13's exit until level 14 comes up dark, with six lit Smash Traps, and jumps the player
into one's line. It slides at him, and his 4 hearts go all at once, on the step it crushes him, with the
crush's `yVel` of -3; no step before has the hit's -6. The kill is counted as crushed, never as the smash trap[^8]. A plain Smash Trap's touch, on a lit level, takes 10 hearts
a step before it crushes him[^9].

## 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[^4], and the oracle's fingerprint of the replay pins the hearts, the player's `yVel` and the
deaths table. No option turns it off.

## FAQ

### Does a Smash Trap hurt the player on a dark level?

Not by touching him. A dark level's [Smash Trap](https://spelunky.ai/wiki/smash-trap) is the lit kind, which the player's code doesn't count as a Smash Trap, so its touch takes none of the 10 hearts a plain one's does. It still kills him by sliding on into him until he's crushed.

### Does the lit Smash Trap knock the player back or make him drop what he holds?

No. Both are part of the plain Smash Trap's hit, which the lit kind never sets off.

### What does a lit Smash Trap's kill count as in the statistics?

Crushed, as anything solid's crush is, not the smash trap row.

## See also

- **Related:** [Smash Trap](https://spelunky.ai/wiki/smash-trap), [Dark level](https://spelunky.ai/wiki/dark-level), [The Temple](https://spelunky.ai/wiki/temple)

## References

[^1]: Clip smash-trap/lit

[^2]: [`scripts/scrEntityGen.gml:469-470`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L469-L470)

[^3]: [`objects/oSmashTrapLit/step.gml:1-137`](https://spelunky.ai/wiki/source/objects/oSmashTrapLit/step#L1-L137)

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

[^5]: [`objects/oPlayer1/step.gml:1658-1668`](https://spelunky.ai/wiki/source/objects/oPlayer1/step#L1658-L1668)

[^6]: [`objects/oPlayer1/step.gml:1492-1511`](https://spelunky.ai/wiki/source/objects/oPlayer1/step#L1492-L1511)

[^7]: [`scripts/scrEntityGen.gml:466-471`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L466-L471)

[^8]: Replay `fidelity/replays/trap-dark-smash.txt`

[^9]: Replay `fidelity/replays/trap-smash-crush.txt`

### Source code

- [`objects/oPlayer1/step.gml`](https://spelunky.ai/wiki/source/objects/oPlayer1/step)
- [`objects/oSmashTrapLit/step.gml`](https://spelunky.ai/wiki/source/objects/oSmashTrapLit/step)
- [`scripts/scrEntityGen.gml`](https://spelunky.ai/wiki/source/scripts/scrEntityGen)
