SpelunkyFan wiki

General Store

Verified against the spelunky.ai port v0.1.10 on .

The General Store is a shop in Spelunky Classic that sells bombs, ropes and parachutes, and more rarely a Mattock, Climbing Gloves or a Compass.

Its Shopkeeper welcomes the player with "WELCOME TO SLASH'S SUPPLY SHOP!", his name one of 32 drawn at random [6] [7]. It sells the supplies the player uses up: Bomb Bags, Rope Piles and Parachutes, with now and then a Mattock, Climbing Gloves or a Compass. Like every shop it's a side room off the way through a level, with four wares on its floor and the Shopkeeper beside them, and he turns on a player who steals from it.

Stock

#
Buying in a General Store. In a General Store on level 2, the player picks up a parachute, and the shopkeeper names its price. He pays, and it goes on. He picks up the compass next, but hasn't the money for it, and paying drops it.

The shop has four wares, and each is rolled on its own [8] [9]. The rolls go down the table until one hits; a hit on a Mattock, Gloves or Compass when the level already has one rolls again from the top [10]:

WareRoll
Mattock1 in 20, if the level has none[11]
Climbing Gloves1 in 10, if the level has none[12]
Compass1 in 10, if the level has none[13]
Bomb BagOtherwise 1 in 3[14]
Rope PileOtherwise 1 in 3[15]
ParachuteOtherwise 1 in 3[16]

So a store can sell two or more of the bags, piles and parachutes, but one Mattock, pair of Gloves and Compass at most, and none when the level already has one: a Black Market's other shops' count too. The check is for the object on the level, not the player's equipment, so a store sells a Compass or Gloves the player already wears, and buying it changes nothing [17] [18]. In the clip, the player picks up a Parachute, which the Shopkeeper prices at $2,000, and pays for it; then he picks up the Compass but hasn't the $3,000, and paying drops it [19].

Prices

#

A ware costs its base price on level 2, and 10% of that more for each level after it [20]. Each ware's own page has its price on every level:

WareLevel 2Level 5Level 9Level 13Level 15
Bomb Bag$2,500$3,250$4,250$5,250$5,750
Rope Pile$2,500$3,250$4,250$5,250$5,750
Parachute$2,000$2,600$3,400$4,200$4,600
Compass$3,000$3,900$5,100$6,300$6,900
Mattock$8,000$10,400$13,600$16,800$18,400
Climbing Gloves$8,000$10,400$13,600$16,800$18,400

A Black Market's stores price their wares the same way, by the level the market is on [21].

Shopkeeper

#

The Shopkeeper stands beside the wares. When the player first comes into the shop's room, he welcomes him, and while the player holds a ware he shows its name and price and the key that pays ("PRESS P TO PURCHASE.") and follows him about the shop [22] [23]. The pay key, in the shop's room, buys the held ware: its price comes out of the player's money, and a bag or a pile adds its bombs or ropes, equipment goes on, and a weapon stays in his hands, his own [24] [25]. A player without the money is told "YOU HAVEN'T GOT ENOUGH MONEY!" and drops the ware [26].

These anger him, each with its own shout [27]:

WhatShout
A ware leaves the shop's room unpaid, in the player's hands or thrown"COME BACK HERE, THIEF!"[28] [29]
An armed bomb in the shop within 96 pixels of a Shopkeeper: the player's, or one in ten of those a Monkey throws out"TERRORIST!"[30] [31]
A bomb arrow readied on the Bow inside the shop"TERRORIST!"[32]
A block of the shop's walls or floor destroyed"DIE, YOU VANDAL!"[33] [34]
The Whip, or a thrown item hitting himNone[35] [36] [17]

Once any Shopkeeper has died, the shout is "YOU'LL PAY FOR YOUR CRIMES!" instead. A bomb lit by a Chest's trap or another explosion isn't armed, and doesn't anger him [17].

Angered, he gives the wares away, their prices set to nothing, and goes for the player: he runs at 3 pixels a step, jumps after him, and fires his Shotgun, six pellets at a time and at most once every 30 steps, at a player ahead of him within 96 pixels and 32 above or below [37] [38]. Each pellet that hits takes 4 hearts and stuns the player [39]. Except while he stands by his wares or follows the player about the shop, his touch throws the player, who drops what he holds [40]. The Shopkeeper's page has the rest: his health, and what he leaves when he dies.

Stealing

#
Shoplifting from a General Store. The player picks the unpaid compass up again and jumps out of the shop with it, which puts it on. The shopkeeper shouts "Come back here, thief!", fires after him and misses, then leaps on him and shoots him dead.

A ware carried or thrown out of the shop's room without being paid for is stolen: the Shopkeeper is angered, and the ware is free. Carried out, it goes to the player as if bought; whether at once depends on whether he or the ware leaves the room first, as the ware, held in front of him, often does [29] [28] [17]. In the clip, the player jumps out of the shop with the Compass, which goes on; the Shopkeeper fires after him and misses, then leaps at him and shoots him dead [41].

Theft marks the player a thief. Each angering adds 2 to a count, or 3 if it's already above 0, and each exit he takes takes 1 off, so one theft lasts into the next level [42] [43]. While it's above 0, and for the rest of the game once a Shopkeeper has died, whatever killed him [44] [45] [17]:

  • A Shopkeeper waits by each level's exit [46].
  • A shop's Shopkeeper doesn't greet him. He walks about and attacks when the player comes within 64 pixels of him and no more than 16 below, or passes straight above or below him at any distance [47] [48].
  • Every ware is free [49], and the shop's wall has a Wanted poster of the player [50].
A shopkeeper waiting by the exit. On the level after a theft, a shopkeeper with a shotgun stands guard by the exit. As the player comes down to it, the shopkeeper leaps at him, and the player takes the exit unhurt.

In the clip, on the level after a theft, the Shopkeeper waiting by the exit leaps at the player as he comes down to it, and he takes the exit unhurt [51] [52]. The Whip, thrown items and shots only make the Shopkeeper attack: they don't add to the count, but his anger frees the wares all the same, so they can then be carried out without marking the player a thief [35] [53] [17] [54]. With no Shopkeeper left on the level, every ware is free too [49].

A lit bomb in a shop angers every Shopkeeper near the screen, not only the shop's, and each one not yet angry adds to the count. One is marked angry only by his own step, which runs only while he's on screen, so in a Black Market, with seven Shopkeepers, each one that's off screen but near enough to be active adds 3 again on every step the bomb burns: one bomb there takes the count past 400 in under two seconds, more levels than the game has [30] [55] [17] [56].

Locations

#

From level 2 to level 15, a level rolls for a shop: always on level 2, then less often with each level, 2 in the level's number. The shop goes in a side room beside the way through the level, if one qualifies [57] (the Mines has the details). It's a General Store one time in seven, in every area and on a Yeti lair level too [1] [2] [3] [58], and one time in six on a Temple sacrifice pit level, which has a Damsel of its own and never a Kissing Parlor [59] [4]. No level has a shop once the Black Market has been made [17], and Olmec's Lair has none.

A Black Market has five shops that sell items, and each picks a kind the market hasn't got yet, so as a rule it has one of each of the five; one market in five, the last shop made is a General Store whatever it found (trivia) [5] [17].

Trivia

#
  • The source calls it the "General" shop, and its Shopkeeper calls it a "SUPPLY SHOP" [60] [61]. Its sign shows a sack.
  • A Black Market can have two General Stores and lack another kind. Each of its shops tries its first pick and then each kind after it in turn, and gives up with a General Store when it comes back round to the first. But it checks for that after every try, one that found a kind too, so a fifth shop whose first pick is the kind just after the last one left finds that kind on its last try and is made a General Store all the same: one market in five, and unless the kind left was General, the market has two General Stores and lacks that kind [62] [17] [63]. In the clip, in a Black Market without a Rare Shop, the player walks into Duke's Supply Shop, then down into Lemmy's [64].
  • The end-of-game statistics count stolen items as wares are freed, not as they're taken. While the player is marked a thief, each ware counts as it comes on screen and is freed, so on a thief's next level every ware of a shop he passes counts, though he takes none [49] [52]. On the theft's own step, only the wares that step after the theft is seen and before the Shopkeeper count: his anger frees the rest uncounted. A ware the player carries out counts only if it leaves the shop's room before he does [65] [29] [17] [66].

FAQ

#
What does the General Store sell in Spelunky Classic?

Four wares, each a Bomb Bag, a Rope Pile or a Parachute, or more rarely a Mattock, Climbing Gloves or a Compass, at most one of each of those three a level.

How do you buy something in a shop in Spelunky Classic?

Pick the ware up and press the pay key while still in the shop. The Shopkeeper names the price and the key when the ware is picked up. Without the money, paying drops the ware instead.

What happens if you steal from a shop in Spelunky Classic?

The Shopkeeper shouts "COME BACK HERE, THIEF!" and attacks with his Shotgun, and every ware becomes free. On the next level, a second Shopkeeper waits by the exit, and any shop's Shopkeeper attacks on sight.

How do you find a General Store in Spelunky Classic?

Shops are built from level 2, in a side room beside the way through the level when one qualifies: level 2 always rolls for one, deeper levels less often. Each is a General Store one time in seven, and every Black Market has one.

#
A Black Market with two General Stores. The Black Market's fifth item shop, with only the Rare Shop's kind left, finds it and is made a General Store all the same, so the market has two and no Rare Shop. The player walks into Duke's Supply Shop, then down into Lemmy's.

See also

#

References

#
  1. scripts/scrRoomGen.gml:173-204
  2. scripts/scrRoomGen2.gml:160-189
  3. scripts/scrRoomGen3.gml:122-152
  4. scripts/scrRoomGen4.gml:155-188
  5. scripts/scrRoomGenMarket.gml:117-140
  6. objects/oShopkeeper/step.gml:125-148
  7. scripts/scrGetName.gml:24-60
  8. scripts/scrRoomGen.gml:173-191
  9. scripts/scrRoomGen.gml:448-451
  10. scripts/scrShopItemsGen.gml:156-177
  11. scripts/scrShopItemsGen.gml:161-164
  12. scripts/scrShopItemsGen.gml:165-168
  13. scripts/scrShopItemsGen.gml:169-172
  14. scripts/scrShopItemsGen.gml:173
  15. scripts/scrShopItemsGen.gml:174
  16. scripts/scrShopItemsGen.gml:175
  17. Quirk 1 (docs/quirks.md)
  18. Replay fidelity/replays/shop-seed-11-compass-restocked.txt
  19. Clip general-store/buy
  20. scripts/scrShopItemsGen.gml:179-191
  21. scripts/scrRoomGenMarket.gml:357-360
  22. objects/oShopkeeper/step.gml:72-85
  23. objects/oShopkeeper/step.gml:225-282
  24. objects/oPlayer1/step.gml:1359-1389
  25. scripts/scrStealItem.gml:68-313
  26. objects/oPlayer1/step.gml:1370-1379
  27. scripts/scrShopkeeperAnger.gml:7-23
  28. objects/oItem/step.gml:17-34
  29. objects/oPlayer1/step.gml:541-557
  30. objects/oBomb/step.gml:6-17
  31. objects/oMonkey/step.gml:258-267
  32. objects/oPlayer1/step.gml:29-46
  33. objects/oSolid/destroy.gml:1-7
  34. scripts/scrRoomGen.gml:413-426
  35. objects/oShopkeeper/collision_oWhip.gml:1-19
  36. objects/oItem/step.gml:258-299
  37. objects/oShopkeeper/step.gml:337-444
  38. objects/oShopkeeper/create.gml:47-49
  39. objects/oBullet/collision_oCharacter.gml:1-17
  40. objects/oShopkeeper/collision_oCharacter.gml:41-76
  41. Clip general-store/theft
  42. scripts/scrShopkeeperAnger.gml:21-22
  43. objects/oPlayer1/step.gml:874
  44. objects/oShopkeeper/step.gml:24-63
  45. objects/oShopkeeper/step.gml:486-499
  46. scripts/scrInitLevel.gml:245-257
  47. objects/oShopkeeper/step.gml:87-97
  48. objects/oShopkeeper/step.gml:121-124
  49. objects/oItem/step.gml:8-15
  50. scripts/scrRoomGen.gml:404-411
  51. Clip general-store/waiting-shopkeeper
  52. Replay fidelity/replays/shop-seed-3-thief-next-level.txt
  53. objects/oShopkeeper/step.gml:341-349
  54. Replay fidelity/replays/shop-seed-11-whip.txt
  55. scripts/scrShopkeeperAnger.gml:10-22
  56. Replay fidelity/replays/shop-seed-9-market-bomb.txt
  57. scripts/scrLevelGen.gml:239-297
  58. scripts/scrRoomGenYeti.gml:149-181
  59. scripts/scrLevelGen.gml:84-86
  60. scripts/scrRoomGen.gml:180
  61. objects/oShopkeeper/step.gml:134
  62. scripts/scrRoomGenMarket.gml:123-140
  63. Replay fidelity/replays/shop-seed-9-market-two-general-stores.txt
  64. Clip quirks/market-two-general-stores
  65. objects/oItem/step.gml:17-26
  66. Replay fidelity/replays/item-seed-26-parachute.txt

Source code

  • scripts/scrShopItemsGen.gml
  • scripts/scrRoomGen.gml
  • scripts/scrRoomGenMarket.gml
  • scripts/scrLevelGen.gml
  • objects/oShopkeeper/step.gml
  • scripts/scrShopkeeperAnger.gml
  • scripts/scrStealItem.gml
  • objects/oItem/step.gml
#