SpelunkyFan wiki

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 Black Market's hidden door. On level 5, a bomb blows open the rock hiding a door. The player walks into it, and the next level loads: the Black Market, with the message "WELCOME TO THE BLACK MARKET!"

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:

RoomsWhat
The left columnThe entrance's room, then rooms that drop down to the bottom row[10] [11] [12]
The middle two columns, top three rowsFive 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 columnTwo rooms that drop to the Ankh shop in the third row, which opens only at its top[15] [16] [17]
The bottom rowA 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].

Through the Black Market. The player leaves Wang's Clothing Shop, climbs down to the Black Market's bottom row and walks along it, under the Dice House, to the exit at the bottom right.

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]:

MonsterWhereChance
BatHanging under a block1 in 80[31]
MantrapOn a block, with no water above, but never a block of a room's bottom row1 in 60[32]
CavemanOn a block, with no water above1 in 60, once the Mantrap's fails[33]
Fire FrogOn a block1 in 120, once those fail[34] [35]
FrogOn a block1 in 30, once those fail[36] [37]
MonkeyOn a vine1 in 15 for each vine tile[38]
PiranhaIn the water1 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

#
ShopWhere
General Store, Bomb Shop, Weapon Shop, Rare Shop, Clothing ShopThe five item shops: each picks a kind the market hasn't got yet, starting from one at random[48]
Dice HouseThe third column's third room[49]
Ankh shopThe 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

#
  • The Ankh, which no other shop sells.
  • The door itself, which the Udjat Eye finds.

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

#
  1. scripts/scrLevelGen.gml:44-69
  2. scripts/scrInitLevel.gml:186-192
  3. scripts/scrInitLevel.gml:150-157
  4. scripts/scrEntityGen.gml:212-225
  5. scripts/scrClearGlobals.gml:73
  6. objects/oPlayer1/step.gml:879
  7. scripts/scrLevelGen.gml:44-46
  8. objects/oPlayer1/alarm_0.gml:14-20
  9. Clip black-market/entrance
  10. scripts/scrLevelGen.gml:51-54
  11. scripts/scrRoomGenMarket.gml:52-64
  12. scripts/scrRoomGenMarket.gml:147-161
  13. scripts/scrLevelGen.gml:55-62
  14. scripts/scrRoomGenMarket.gml:117-146
  15. scripts/scrLevelGen.gml:63-65
  16. scripts/scrRoomGenMarket.gml:112-116
  17. Quirk 1 (docs/quirks.md)
  18. scripts/scrLevelGen.gml:54-66
  19. scripts/scrRoomGenMarket.gml:65-111
  20. scripts/scrRoomGenMarket.gml:77-111
  21. scripts/scrRoomGenMarket.gml:238-426
  22. Clip black-market/walk
  23. scripts/scrInitLevel.gml:167-176
  24. Replay fidelity/replays/jungle-seed-9-market-dark-roll.txt
  25. objects/oTransition/step.gml:20-24
  26. scripts/scrInitLevel.gml:145-157
  27. objects/oPlayer1/alarm_0.gml:14-33
  28. objects/oPlayer1/alarm_1.gml:11-17
  29. scripts/scrRoomGenMarket.gml:342-346
  30. scripts/scrEntityGen.gml:207-337
  31. scripts/scrEntityGen.gml:268-272
  32. scripts/scrEntityGen.gml:285-289
  33. scripts/scrEntityGen.gml:290
  34. scripts/scrEntityGen.gml:291
  35. scripts/scrEntityGen.gml:294
  36. scripts/scrEntityGen.gml:292
  37. scripts/scrEntityGen.gml:295
  38. scripts/scrEntityGen.gml:321-324
  39. scripts/scrEntityGen.gml:326-336
  40. scripts/scrEntityGen.gml:287
  41. scripts/scrEntityGen.gml:280-284
  42. scripts/scrEntityGen.gml:332
  43. objects/oGame/step.gml:23-47
  44. Replay fidelity/replays/shop-seed-9-market-bomb.txt
  45. scripts/scrEntityGen.gml:226-253
  46. scripts/scrRoomGenMarket.gml:87
  47. scripts/scrRoomGenMarket.gml:267
  48. scripts/scrRoomGenMarket.gml:117-141
  49. scripts/scrRoomGenMarket.gml:142-146
  50. scripts/scrRoomGenMarket.gml:361-364
  51. Replay fidelity/replays/shop-seed-9-market-two-general-stores.txt
  52. scripts/scrRoomGenMarket.gml:357-360
  53. Replay fidelity/replays/item-seed-9-ankh-thrown-out.txt
  54. scripts/scrLevelGen.gml:240
  55. scripts/scrEntityGen.gml:255-259
  56. objects/oLush/create.gml:5-15
  57. objects/oXMarket/create.gml:1-3
  58. scripts/scrRoomGenMarket.gml:295-298
  59. scripts/scrRoomGenMarket.gml:369-377
  60. scripts/scrRoomGenMarket.gml:117-140

Source code

  • scripts/scrInitLevel.gml
  • scripts/scrEntityGen.gml
  • scripts/scrLevelGen.gml
  • scripts/scrRoomGenMarket.gml
  • objects/oXMarket/create.gml
#