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.

# No shops after the Black Market

From the spelunky.ai wiki: <https://spelunky.ai/wiki/no-shops-after-black-market>. Verified against the spelunky.ai port [v0.1.13](https://github.com/851-labs/spelunky/releases/tag/v0.1.13) on 29 October 2026.

No shops after the Black Market is a quirk of Spelunky Classic in which, once the Black Market has been made, no later level has a shop.

| Quirk     |                                                                                                                                                                                                                                   |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle                                                                                                                                                                                                                      |
| Where     | [`scripts/scrLevelGen.gml:239-241`](https://spelunky.ai/wiki/source/scripts/scrLevelGen#L239-L241)                                                                                                                                |
| Pinned by | `fidelity/replays/jungle-seed-9-market-no-shop.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): “No shop for the rest of the game once the Black Market is made.” |

From level 2 on, each level rolls for a [Shopkeeper](https://spelunky.ai/wiki/shopkeeper)'s shop, with a chance of 2 in its level's
number ([Shops](https://spelunky.ai/wiki/level-generation#shops)). The [Black Market](https://spelunky.ai/wiki/black-market), found through a hidden door in the
[Jungle](https://spelunky.ai/wiki/jungle), is a level of shops. But once it has been made, the roll never succeeds again: every level
after it, to the end of the game, has no shop.

## What happens

On seed 9, the player finds the Black Market on level 6. On level 8, two levels on, the shop roll passes and the
level's top-left room is beside the path, where a shop could stand. The player walks left along the top row until
that room fills the left of the view: it's an ordinary Jungle room, and the level has no
Shopkeeper[^1].

**Clip: No shop after the Black Market.** Seed 9's level 8, two levels after the Black Market. The player walks left along the top row until the room beside the path, where a shop could stand, fills the left of the view: it's an ordinary Jungle room, and the level has no shop, though its shop roll passed. ([video](https://spelunky.ai/wiki/media/clips/quirks/no-shop-after-black-market/clip.mp4))

## Why

The shop roll is one line of the level generator, run for every level:

```gml scripts/scrLevelGen.gml:239-241
// shop
if (rand(1,global.currLevel) <= 2 and global.currLevel > 1 and not global.madeBlackMarket)
{
```

[`scripts/scrLevelGen.gml:239-241`](https://spelunky.ai/wiki/source/scripts/scrLevelGen#L239-L241), 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)).

`madeBlackMarket` is set by the Black Market's own level, which then returns before it gets to this line[^2]. Only a new game clears it[^3].
So the check never applies to the market's level. Its only effect is on the levels after it, the rest of
the Jungle, the Ice Caves and the Temple: their rolls are still drawn, but they never make a shop[^4]. It may be by design, a market that's the game's last shop, but nothing in the code says so.

## Reproducing it

Find the Black Market (the hidden door on level 5, 6 or 7: [Black Market](https://spelunky.ai/wiki/black-market)) and play on: no later level has a
shop. It happens in every game that finds the market. The clip's replay goes through seed 9's market on level 6
and into level 8, whose shop roll passes, and walks the top row to the room beside the path. No Shopkeeper is
made on the level[^5]. Two longer runs show the
same on other levels: level 7 of seed 9's City of Gold run, whose roll is 1 and whose top-left room is beside the
path[^6], and level 8 of the run the clip's replay starts
from[^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[^4], and the oracle's fingerprint of the clip's replay pins its run, whose story checks that
level 8 makes no Shopkeeper. No option turns it off.

## FAQ

### Are there shops after the Black Market in Spelunky Classic?

No. Once the Black Market has been made, no later level has a shop, in the Jungle, the Ice Caves or the Temple, until a new game.

### Why are there no more shops after the Black Market?

The roll for a level's shop also checks that the game hasn't made the Black Market yet, and that mark is only cleared when a new game starts. It may be meant that way, but the check can't be for the market's own level, which skips the shop code anyway.

### Should you buy everything you need in the Black Market?

Yes, whatever the rest of the run needs. The market is the game's last shop: an item it doesn't sell has to be found.

### Do the levels after the Black Market still roll for a shop?

Yes. Each level still draws the roll's random number, but the check beside it fails, so the roll never makes a shop.

## See also

- **Related:** [Black Market](https://spelunky.ai/wiki/black-market), [Shopkeeper](https://spelunky.ai/wiki/shopkeeper), [Level generation](https://spelunky.ai/wiki/level-generation), [The Jungle](https://spelunky.ai/wiki/jungle)

## References

[^1]: Clip quirks/no-shop-after-black-market

[^2]: [`scripts/scrLevelGen.gml:44-69`](https://spelunky.ai/wiki/source/scripts/scrLevelGen#L44-L69)

[^3]: [`scripts/scrClearGlobals.gml:75`](https://spelunky.ai/wiki/source/scripts/scrClearGlobals#L75)

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

[^5]: Replay `fidelity/replays/jungle-seed-9-market-no-shop.txt`

[^6]: Replay `fidelity/replays/city-of-gold-seed-9.txt`

[^7]: Replay `fidelity/replays/jungle-seed-9-market-dark-roll.txt`

### Source code

- [`scripts/scrLevelGen.gml`](https://spelunky.ai/wiki/source/scripts/scrLevelGen)
- [`scripts/scrClearGlobals.gml`](https://spelunky.ai/wiki/source/scripts/scrClearGlobals)
