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.

# Throwing the Ankh out

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

Throwing the Ankh out is a quirk of Spelunky Classic in which the Black Market's Ankh, thrown out of its shop, angers no one until the player picks it up.

| Quirk     |                                                                                                                                                                                                      |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle                                                                                                                                                                                         |
| Where     | `scripts/scrRoomGenMarket.gml:361-364`                                                                                                                                                               |
| Pinned by | `fidelity/replays/item-seed-9-ankh-thrown-out.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 Ankh is never marked for sale.” |

A ware that leaves its shop by itself, thrown or knocked out, is stolen at once: the
[Shopkeeper](https://spelunky.ai/wiki/shopkeeper) is angered and the ware is free. The [Ankh](https://spelunky.ai/wiki/ankh) skips that check, so thrown out of
its shop it lies outside at its price, harmless, until the player touches it.

## What happens

In the [Black Market](https://spelunky.ai/wiki/black-market), the player throws the Ankh up through the hole in its shop's ceiling.
It lies outside with its price, and the Shopkeeper stays calm until the player climbs out and picks it up:
then it's his, and the Shopkeeper opens fire[^1].

**Clip: The ankh, thrown out of its shop, angers no one.** In the Black Market, the player throws the $50,000 ankh up through the hole in its shop's ceiling. It lies outside with its price, and the shopkeeper stays calm until the player climbs out and picks it up: then it's his, and the shopkeeper opens fire. ([video](https://spelunky.ai/wiki/media/39b784c6a7dfc9d3/clips/quirks/ankh-thrown-out-of-shop/clip.mp4))

## Why

The shops' stock is made by one script, which marks each ware `forSale`[^2]. The Black Market makes the Ankh shop's Ankh itself, with
the price its create event gives it, and never marks it[^3]:

```gml scripts/scrRoomGenMarket.gml:361-364
else if (tile == "A")
{
    obj = instance_create(xpos+8, ypos+8, oAnkh);
}
```

`scripts/scrRoomGenMarket.gml:361-364`, 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)).

The shared item code steals a ware outside its shop only if it's for sale[^4]:

```gml objects/oItem/step.gml:20-25
    if (cost > 0 and forSale and not isInShop(x, y))
    {
        global.itemsStolen += 1;
        scrShopkeeperAnger(0);
        cost = 0;
    }
```

`objects/oItem/step.gml:20-25`, 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)).

So the Ankh outside keeps its price, and nobody notices. The player's own step has the other check: a held
ware with a price, once he's outside the shop, is put on and angers the Shopkeeper. Picking the Ankh up
outside runs it at once[^5][^6].

## Reproducing it

In the Black Market, pick up the Ankh and throw it up through the hole in its shop's ceiling, the shop's only
way out, then climb out after it. The replay pins it: the Ankh lies outside at $50,000 with the Shopkeeper
calm, and picked up outside it's put on and he shouts "COME BACK HERE, THIEF!"[^7]. Carried out instead, it's put on as the
player leaves the shop[^8].

## 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[^6], and the oracle's fingerprint of the replay pins the Ankh's price and the Shopkeeper. No
option turns it off.

## FAQ

### Can you steal the Ankh in Spelunky Classic?

Yes, but not for free. Thrown out of its shop, the [Ankh](https://spelunky.ai/wiki/ankh) lies outside at its price and the [Shopkeeper](https://spelunky.ai/wiki/shopkeeper) stays calm; picking it up there puts it on and angers him, as carrying it out does.

### Why doesn't throwing the Ankh out of its shop anger the Shopkeeper?

The Black Market makes the Ankh without marking it for sale, and the check that angers a Shopkeeper when a ware leaves its shop only acts on wares marked for sale.

### How much is the Ankh in Spelunky Classic?

$50,000, in the Black Market's Ankh shop.

## See also

- **Related:** [Ankh](https://spelunky.ai/wiki/ankh), [Black Market](https://spelunky.ai/wiki/black-market), The Black Market's Ankh, [Shopkeeper](https://spelunky.ai/wiki/shopkeeper), [General Store](https://spelunky.ai/wiki/general-store)

## References

[^1]: Clip quirks/ankh-thrown-out-of-shop

[^2]: `scripts/scrShopItemsGen.gml:179-181`

[^3]: `scripts/scrRoomGenMarket.gml:361-364`

[^4]: `objects/oItem/step.gml:18-34`

[^5]: `objects/oPlayer1/step.gml:541-557`

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

[^7]: Replay `fidelity/replays/item-seed-9-ankh-thrown-out.txt`

[^8]: Replay `fidelity/replays/item-seed-9-ankh.txt`

### Source code

- `scripts/scrRoomGenMarket.gml`
- `scripts/scrShopItemsGen.gml`
- `objects/oItem/step.gml`
- `objects/oPlayer1/step.gml`
