No shops after the Black Market
Verified against the spelunky.ai port v0.1.13 on .
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.
From level 2 on, each level rolls for a Shopkeeper's shop, with a chance of 2 in its level's number (Shops). The Black Market, found through a hidden door in the 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].
Why
#The shop roll is one line of the level generator, run for every level:
// shop
if (rand(1,global.currLevel) <= 2 and global.currLevel > 1 and not global.madeBlackMarket)
{scripts/scrLevelGen.gml:239-241, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).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) 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
#References
#- Clip quirks/no-shop-after-black-market
scripts/scrLevelGen.gml:44-69scripts/scrClearGlobals.gml:75- Quirk 1 (docs/quirks.md)
- Replay
fidelity/replays/jungle-seed-9-market-no-shop.txt - Replay
fidelity/replays/city-of-gold-seed-9.txt - Replay
fidelity/replays/jungle-seed-9-market-dark-roll.txt