Black Market
Verified against the spelunky.ai port v0.1.10 on .
The Black Market is a special level of Spelunky Classic, once a game in the Jungle behind a hidden door: seven shops, with the only one that sells the Ankh.
The Black Market is a level of the Jungle given over to shops: five that sell items, a Dice House and the Ankh shop, each with its Shopkeeper, laid out the same way every time. The way in is a door hidden inside a block, which the Udjat Eye helps to find. Making the market has lasting effects: no level has a shop after it, and no Jungle level after it is flooded.
Generation
#The hidden door
#Once a game, one of the Jungle's levels 5 to 7 hides the market's door: level 5 one time in 3, level 6 one time in 2, and otherwise level 7 [2]. Generation puts it inside the first block, outside the shops, that has a block under it (that one made indestructible) and wins a roll of 1 in a number that starts each game at 160 and falls by one with each block that loses. The block it's in can't be a tree or one that can't be destroyed, and the block under it can't be an altar [4] [5]. The door is inside the rock, so it has to be dug or bombed out. On its level, the Udjat Eye blinks and beeps faster the nearer the player is to it.
Walking into the door, as into an exit, makes the next level, 6, 7 or 8, the Black Market [6] [7]. In the first clip, a bomb blows open the rock hiding the door on level 5; the player walks into it, and level 6, the Black Market, loads with the message "WELCOME TO THE BLACK MARKET!" [8] [9].
The layout
#The market has no path of its own to find: its rooms are set, a grid of four by four with the entrance in the top left and the exit in the bottom right [1]. Columns are from the left, rows from the top:
| Rooms | What | |
|---|---|---|
| The left column | The entrance's room, then rooms that drop down to the bottom row | [10] [11] [12] |
| The middle two columns, top three rows | Five item shops and the Dice House (the third column's third room), open on both sides, so the rows of shops are walked through | [13] [14] |
| The right column | Two rooms that drop to the Ankh shop in the third row, which opens only at its top | [15] [16] [17] |
| The bottom row | A walk from the left column to the exit, in the bottom right | [18] [19] |
The rooms around the shops are the Jungle's earth, with water, vines, Spikes and trees in some of the layouts [20] [21]. In the second clip, the player leaves Wang's Clothing Shop, climbs down to the bottom row, and walks along it under the Dice House to the exit [22].
Special levels
#The market is never a dark level, though a dark roll that comes up on it uses up the Jungle's dark level all the same [23] [17] [24]. It's never a flooded level: taking its door stops the roll for one, for the market's level and every Jungle level after it [25] [17]. The roll for a graveyard level, 1 in 10, is made for it, as for every Jungle level [26]. A graveyard market's monsters are the graveyard's, but its message is still only the market's [27] [28].
Inhabitants
#Each of the seven shops has its Shopkeeper [29]. Outside the shops, level generation makes the Jungle's monsters, as on any Jungle level [30]:
| Monster | Where | Chance | |
|---|---|---|---|
| Bat | Hanging under a block | 1 in 80 | [31] |
| Mantrap | On a block, with no water above, but never a block of a room's bottom row | 1 in 60 | [32] |
| Caveman | On a block, with no water above | 1 in 60, once the Mantrap's fails | [33] |
| Fire Frog | On a block | 1 in 120, once those fail | [34] [35] |
| Frog | On a block | 1 in 30, once those fail | [36] [37] |
| Monkey | On a vine | 1 in 15 for each vine tile | [38] |
| Piranha | In the water | 1 in 30 for each water tile | [39] |
The Mantrap's rule is the market's own, and the code's comment gives its reason: "to prevent mantraps from spawning near shopkeepers in black market" [40]. On a graveyard market, Zombies and Vampires take the ground's place and Dead Fish the Piranhas' [41] [42]. As it's never dark, it has no Scarabs. The Ghost comes to a player who stays too long, as on every level [43].
Hazards
#- The Shopkeepers. Seven, close together: a lit bomb in one shop angers every one of them, and those off screen again on every step it burns [17] [44]. The General Store has what else angers them.
- Spear Traps, made outside the shops as in the Jungle [45].
- Spikes, along the floor of one of the bottom row's layouts [46] [47].
- Water, where Piranhas swim.
Items and shops
#Shops
#| Shop | Where | |
|---|---|---|
| General Store, Bomb Shop, Weapon Shop, Rare Shop, Clothing Shop | The five item shops: each picks a kind the market hasn't got yet, starting from one at random | [48] |
| Dice House | The third column's third room | [49] |
| Ankh shop | The right column's third room: one Ankh, for $50,000 | [16] [50] |
So a market has one shop of each kind, as a rule. One market in five, the fifth item shop finds the last kind left and is made a General Store all the same, so the market has two General Stores and none of the kind left (unless that's the General Store) [17] [51]. The wares are the shops' usual ones, priced by the level the market is on, as in any shop [52] (the General Store's prices); the Ankh, never marked for sale, can be thrown out of its shop and picked up outside at its price [17] [53].
Once the Black Market has been made, no level has a shop for the rest of the game: the roll for one, on every later level, requires that it hasn't [54] [17].
Treasure
#Treasure is scattered over the blocks outside the shops as in the Mines [55], and the earth hides gems and items as the Jungle's does [56].
Secrets
#Trivia
#- The market's level code sets its rooms and returns before the rest of the level code runs, the shop roll among it, which is why that roll's check for the market does nothing on the market's own level [1] [54].
- The door's object is a kind of exit, named "Market Exit" [57].
- The market's room script has code for an idol, trap blocks and a cemetery's bones, copied from the Jungle's, but none of its rooms has those tiles [58] [59] [17].
FAQ
#- How do you find the Black Market in Spelunky Classic?
Through a door hidden inside a block on one of the Jungle's levels 5 to 7: level 5 one time in 3, level 6 one time in 2, and otherwise level 7. Dug or bombed out and walked into, the door makes the next level the Black Market. The Udjat Eye beeps faster as the player nears it.
- What does the Black Market sell in Spelunky Classic?
As a rule, one of each of the five item shops (General Store, Bomb Shop, Weapon Shop, Rare Shop and Clothing Shop), a Dice House, and the Ankh shop, the only place that sells the Ankh, for $50,000.
- Are there shops after the Black Market in Spelunky Classic?
No. Once the Black Market has been made, no level has a shop for the rest of the game, and none of the Jungle's levels after it is flooded.
- What level is the Black Market in Spelunky Classic?
Level 6, 7 or 8: the level after the one whose hidden door the player takes, which is level 5, 6 or 7.
See also
#References
#scripts/scrLevelGen.gml:44-69scripts/scrInitLevel.gml:186-192scripts/scrInitLevel.gml:150-157scripts/scrEntityGen.gml:212-225scripts/scrClearGlobals.gml:73objects/oPlayer1/step.gml:879scripts/scrLevelGen.gml:44-46objects/oPlayer1/alarm_0.gml:14-20- Clip black-market/entrance
scripts/scrLevelGen.gml:51-54scripts/scrRoomGenMarket.gml:52-64scripts/scrRoomGenMarket.gml:147-161scripts/scrLevelGen.gml:55-62scripts/scrRoomGenMarket.gml:117-146scripts/scrLevelGen.gml:63-65scripts/scrRoomGenMarket.gml:112-116- Quirk 1 (docs/quirks.md)
scripts/scrLevelGen.gml:54-66scripts/scrRoomGenMarket.gml:65-111scripts/scrRoomGenMarket.gml:77-111scripts/scrRoomGenMarket.gml:238-426- Clip black-market/walk
scripts/scrInitLevel.gml:167-176- Replay
fidelity/replays/jungle-seed-9-market-dark-roll.txt objects/oTransition/step.gml:20-24scripts/scrInitLevel.gml:145-157objects/oPlayer1/alarm_0.gml:14-33objects/oPlayer1/alarm_1.gml:11-17scripts/scrRoomGenMarket.gml:342-346scripts/scrEntityGen.gml:207-337scripts/scrEntityGen.gml:268-272scripts/scrEntityGen.gml:285-289scripts/scrEntityGen.gml:290scripts/scrEntityGen.gml:291scripts/scrEntityGen.gml:294scripts/scrEntityGen.gml:292scripts/scrEntityGen.gml:295scripts/scrEntityGen.gml:321-324scripts/scrEntityGen.gml:326-336scripts/scrEntityGen.gml:287scripts/scrEntityGen.gml:280-284scripts/scrEntityGen.gml:332objects/oGame/step.gml:23-47- Replay
fidelity/replays/shop-seed-9-market-bomb.txt scripts/scrEntityGen.gml:226-253scripts/scrRoomGenMarket.gml:87scripts/scrRoomGenMarket.gml:267scripts/scrRoomGenMarket.gml:117-141scripts/scrRoomGenMarket.gml:142-146scripts/scrRoomGenMarket.gml:361-364- Replay
fidelity/replays/shop-seed-9-market-two-general-stores.txt scripts/scrRoomGenMarket.gml:357-360- Replay
fidelity/replays/item-seed-9-ankh-thrown-out.txt scripts/scrLevelGen.gml:240scripts/scrEntityGen.gml:255-259objects/oLush/create.gml:5-15objects/oXMarket/create.gml:1-3scripts/scrRoomGenMarket.gml:295-298scripts/scrRoomGenMarket.gml:369-377scripts/scrRoomGenMarket.gml:117-140
Source code
scripts/scrInitLevel.gmlscripts/scrEntityGen.gmlscripts/scrLevelGen.gmlscripts/scrRoomGenMarket.gmlobjects/oXMarket/create.gml