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 Yeti King's harmless touch in custom levels

From the spelunky.ai wiki: <https://spelunky.ai/wiki/yeti-king-touch-custom-level>. Verified against the spelunky.ai port [v0.1.11](https://github.com/851-labs/spelunky/releases/tag/v0.1.11) on 28 October 2026.

The Yeti King's harmless touch in custom levels is a quirk of Spelunky Classic in which the Yeti King's touch takes no hearts in a custom level.

| Quirk     |                                                                                                                                                                                                                                                                      |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle                                                                                                                                                                                                                                                         |
| Where     | [`objects/oYetiKing/collision_oCharacter.gml:16-31`](https://spelunky.ai/wiki/source/objects/oYetiKing/collision_oCharacter#L16-L31)                                                                                                                                 |
| Pinned by | `fidelity/replays/enemy-yeti-king-custom-level-touch.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): “The Yeti King's touch costs nothing in a custom level, and its kill is tallied there all the same.” |

The game keeps custom levels out of its statistics with a check, "is this one of the game's own levels?", put
around each tally. Around the [Yeti King](https://spelunky.ai/wiki/yeti-king)'s touch, it went around the damage too, so in a custom
level the touch takes nothing. Around its kill, it was left out, so that kill is tallied even there.

## What happens

In a custom level the player walks into the Yeti King twice: it knocks him back and he blinks, but he keeps all
four hearts. A bomb then kills it, and the kill still goes into the lifetime tally[^1].

**Clip: The Yeti King's touch costs nothing in a custom level.** In a custom level the player walks into the Yeti King twice: it knocks him back and he blinks, but he keeps all four hearts. A bomb then kills it, and the kill still goes into the lifetime tally. ([video](https://spelunky.ai/wiki/media/clips/quirks/yeti-king-touch-custom-level/clip.mp4))

## Why

The Yeti King's touch knocks the player back and makes him invincible for 30 steps, then takes its 2 hearts
only on one of the game's own levels:

```gml objects/oYetiKing/collision_oCharacter.gml:16-31
else if (other.invincible == 0)
{
    other.blink = 30
    other.invincible = 30
    if (other.y < y)
        other.yVel = -6
    if (other.x < x)
        other.xVel = -6
    else
        other.xVel = 6
    
    if (global.plife > 0 and isRealLevel())
    {
        global.plife -= 2;
        if (global.plife <= 0) global.enemyDeaths[14] += 1;
    }
```

[`objects/oYetiKing/collision_oCharacter.gml:16-31`](https://spelunky.ai/wiki/source/objects/oYetiKing/collision_oCharacter#L16-L31), 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)).

`isRealLevel` is, as its own comment has it, "Only used for stat-checking atm.": it's true in the game's level
rooms and Olmec's[^2]. Every other monster's touch takes its hearts first
and checks it only for the tally, as a Yeti's does[^3]. The
Yeti King's kill is the other way round: its step adds it to `enemyKills[14]`, the lifetime tally of the
statistics' YETI KING row, without `isRealLevel()`[^4]. Every other
monster's kill but Olmec's, which only his lair has, skips that tally outside the game's own levels[^5].

## Reproducing it

Make a custom level with the level editor's `Y`, and walk into it: it knocks the player back, and he keeps his
hearts. The level editor's test does the same. The replay of the clip's staged scene, on a custom level, walks
into the Yeti King twice, and the player keeps his 4 hearts; a bomb kills it, and `enemyKills[14]` becomes 1[^6]. On a real level, in a Yeti lair, the
same touch takes him from 4 hearts to 2[^7].

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

## FAQ

### Why doesn't the Yeti King hurt the player in a custom level?

The check that keeps custom levels out of the death tally also guards the [Yeti King](https://spelunky.ai/wiki/yeti-king)'s damage. In a [custom level](https://spelunky.ai/wiki/level-editor), its touch knocks the player back and makes him blink, but takes none of his hearts.

### Does killing the Yeti King in a custom level count?

Yes. Its kill goes into the lifetime tally the end-of-game statistics keep, which no other monster's kill in a custom level does.

### Do other monsters hurt the player in a custom level?

Yes. Every other monster's touch takes its hearts in a custom level too, and only leaves the death out of the statistics.

## See also

- **Related:** [Yeti King](https://spelunky.ai/wiki/yeti-king), [Level editor](https://spelunky.ai/wiki/level-editor)

## References

[^1]: Clip quirks/yeti-king-touch-custom-level

[^2]: [`scripts/isRealLevel.gml:4-8`](https://spelunky.ai/wiki/source/scripts/isRealLevel#L4-L8)

[^3]: [`objects/oYeti/collision_oCharacter.gml:35-39`](https://spelunky.ai/wiki/source/objects/oYeti/collision_oCharacter#L35-L39)

[^4]: [`objects/oYetiKing/step.gml:41-46`](https://spelunky.ai/wiki/source/objects/oYetiKing/step#L41-L46)

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

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

[^7]: Replay `fidelity/replays/enemy-yeti-king-swat-seed-47.txt`

### Source code

- [`objects/oYetiKing/collision_oCharacter.gml`](https://spelunky.ai/wiki/source/objects/oYetiKing/collision_oCharacter)
- [`objects/oYetiKing/step.gml`](https://spelunky.ai/wiki/source/objects/oYetiKing/step)
- [`scripts/isRealLevel.gml`](https://spelunky.ai/wiki/source/scripts/isRealLevel)
- [`objects/oYeti/collision_oCharacter.gml`](https://spelunky.ai/wiki/source/objects/oYeti/collision_oCharacter)
