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.

# Double Jar roll

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

The double Jar roll is a quirk of Spelunky Classic in which a Jar broken by the Whip rolls for its contents twice, so it can let out two things.

| Quirk     |                                                                                                                                                                                                           |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle                                                                                                                                                                                              |
| Where     | `objects/oJar/collision_oWhip.gml:1-21`                                                                                                                                                                   |
| Pinned by | `fidelity/replays/item-jar-whip-rolls-twice.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 whipped Jar rolls its contents twice.” |

Every other way of breaking a [Jar](https://spelunky.ai/wiki/jar) (throwing it, shooting it, blowing it up) rolls once. Whipping one
gives it two chances at gold or gems, and two at a Spider or a Snake, with twice the smoke, the pieces and the
sound.

## What happens

The player cracks the [Whip](https://spelunky.ai/wiki/whip) at a Jar. It shatters twice over in the same step: two puffs of smoke,
six pieces of pot where a Jar makes three, and two treasures, a gold chunk and a big emerald[^1].

**Clip: A whipped jar pays out twice.** The player cracks the whip at a jar. It shatters twice over in the same instant, two puffs of smoke and six pieces, and lets out two treasures, a gold chunk and a big emerald, where a jar broken any other way gives one. ([video](https://spelunky.ai/wiki/media/015c74cb8645abba/clips/quirks/jar-whip-rolls-twice/clip.mp4))

## Why

The Jar's collision with the whip breaks it itself: the sound, a puff of smoke, three pieces, and a roll down
the chain of contents, a gold chunk 1 time in 3, then a nugget, the big gems, a Spider and a Snake. Then it
destroys the Jar[^2]:

```gml objects/oJar/collision_oWhip.gml:9-21
if (rand(1,3) == 1) instance_create(x, y, oGoldChunk);
else if (rand(1,6) == 1) instance_create(x, y, oGoldNugget);
else if (rand(1,12) == 1) instance_create(x, y, oEmeraldBig);
else if (rand(1,12) == 1) instance_create(x, y, oSapphireBig);
else if (rand(1,12) == 1) instance_create(x, y, oRubyBig);
else if (rand(1,6) == 1) instance_create(x-8, y-8, oSpider);
else if (rand(1,12) == 1) instance_create(x-8, y-8, oSnake);
if (held)
{
    oPlayer1.holdItem = 0;
    oPlayer1.pickupItemType = "";
}
instance_destroy();
```

`objects/oJar/collision_oWhip.gml:9-21`, 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)).

`instance_destroy()` runs the Jar's destroy event, which is how every other break works: if `breakPieces`
is set, it plays the sound, makes the smoke and the pieces and rolls the same chain. Nothing in the whip code
clears `breakPieces`, which the Jar's create event sets, so the destroy event does it all
again[^3]. A thrown, shot or bombed Jar only runs the destroy event,
and rolls once.

The [Machete](https://spelunky.ai/wiki/machete)'s slash and the [Mattock](https://spelunky.ai/wiki/mattock)'s hit are kinds of whip in the code (children of
`oWhip`), so they break a Jar the same way[^4].

## Reproducing it

Whip any Jar: every Jar the Whip, the Machete or the Mattock breaks rolls twice. Whether the second roll
shows depends on what it rolls, as both rolls can come up empty. The replay of the clip's scene, on a custom
level, breaks a Jar that lets out a gold chunk and a big emerald[^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[^4], and the oracle's fingerprint of the replay pins the two rolls. No option turns it off.

## FAQ

### Does whipping a Jar give more treasure in Spelunky Classic?

Yes, on average. A Jar the [Whip](https://spelunky.ai/wiki/whip) breaks rolls for its contents twice, so it can let out two treasures, or a treasure and a Spider, where a Jar thrown, shot or blown up rolls once.

### Is the double Jar roll a bug?

It's a slip in the Jar's code: its whip code breaks the Jar and rolls, then destroys it, and destroying it runs its breaking code again. The game has always done it, and the spelunky.ai port keeps it.

### Do the Machete and the Mattock roll a Jar twice too?

Yes. The game counts the [Machete](https://spelunky.ai/wiki/machete)'s slash and the [Mattock](https://spelunky.ai/wiki/mattock)'s hit as kinds of whip, so a Jar either breaks rolls twice as well.

## See also

- **Related:** [Jar](https://spelunky.ai/wiki/jar), [Whip](https://spelunky.ai/wiki/whip), [Machete](https://spelunky.ai/wiki/machete), [Mattock](https://spelunky.ai/wiki/mattock)

## References

[^1]: Clip quirks/jar-whip-rolls-twice

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

[^3]: `objects/oJar/destroy.gml:3-28`

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

[^5]: Replay `fidelity/replays/item-jar-whip-rolls-twice.txt`

### Source code

- `objects/oJar/collision_oWhip.gml`
- `objects/oJar/destroy.gml`
