SpelunkyFan wiki

Shopkeeper

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

The Shopkeeper is a character in Spelunky Classic who runs the shops, and turns on a thief with a shotgun that takes 4 hearts a pellet.

Every shop has one, standing by his wares; the shops' pages (General Store, Kissing Parlor, Dice House and the rest) say what each sells. He's calm until the player steals or does damage; then he runs at the player, jumps after him, and fires a shotgun whose pellets take 4 hearts each. A theft is remembered: for a level or more afterwards a Shopkeeper waits at each level's exit, and once one has been killed, at every exit for the rest of the game.

Behaviour

#

Calm

#

Standing in his shop, the Shopkeeper turns to face the player. The first time the player is in his shop's room, he welcomes him to the shop under a name drawn from 32 ("WELCOME TO TERRY'S SUPPLY SHOP!") [2] [3]. While the player holds an unpaid ware in his room, he follows the player, faster the farther away the player is, up to 3 pixels a step, and stops beside him; he goes back to standing once the ware is paid for or put down [4]. A ware held near him shows its price and the key to buy it [5].

Angry

#
Shopkeeper and a thief. The player buys a parachute from a shopkeeper, picks up a compass he can't afford and jumps out of the shop with it. The shopkeeper shouts "COME BACK HERE, THIEF!", chases him and shoots him dead.

Angry, he runs at 3 pixels per step (90 per second), turning toward the player when they're on the same level, at most every 20 steps, and turning back at walls; he jumps at a wall in front of him, and at a gap when the player isn't below him [6]. His first angry step makes every item on the level free [7].

He fires his shotgun at a player in front of him, nearer than 96 pixels and less than 32 pixels above or below his middle, every 30 steps (1 second) at most: 6 pellets, spreading a little up and down, and the kick pushes him back [8]. Each pellet that hits the player takes 4 hearts and knocks him down, with no pause between hits, so one pellet takes all four of the hearts the player starts with [9]. His pellets don't hurt monsters, or him [10].

Touching the player when he isn't calm, he grabs him and throws him over his head, stunned; the throw costs a heart when the player hits a wall or lands. Under a block, with no room to throw, he hits the player for 1 heart and knocks him back instead [11] [12].

The first clip shows a theft: the player buys a parachute, then jumps out of the shop with a compass he can't afford. The Shopkeeper shouts "COME BACK HERE, THIEF!", chases him, and shoots him dead.

On patrol

#
Shopkeeper on patrol. A shopkeeper waits on patrol with his shotgun, shuffling a few pixels one way or the other and stopping again. When the player walks up to within four blocks of him, he turns on him and fires: the blast takes all four of the player's hearts.

A Shopkeeper waiting for a thief (below) is on patrol: he stands for 20 to 50 steps, then walks a step one way or the other, at 1.5 pixels per step, and stands again [13]. His walk checks for a wall at his head's height in front of him, not for a floor, so in open ground it stops after one step and he coasts to a halt: he shuffles rather than walks [14] [15] [16] [17] [18]. He turns on the player who comes nearer than 64 pixels (and isn't more than 16 pixels below his middle), or who is right above or below him [19]. In the clip, a patrolling Shopkeeper shuffles to and fro; when the player walks up to him, he fires, and the blast takes the player's four hearts.

Stunned and killed

#

A stunned Shopkeeper drops his shotgun, and gets up angry once he's lain on the ground (or been held) for 5 steps after a stomp or a Spear Trap, or 20 after a bullet [20] [21] [22]. Without it he can't shoot, but he still grabs and throws; running into a loose shotgun, he picks it up again [23].

Shopkeeper's throw. The shopkeeper follows the player while he holds an unpaid pistol, and stands still once he pays. Shot with it, the shopkeeper falls stunned and drops his shotgun; he gets up angry, grabs the player and throws him against the floor, which costs a heart.

In the clip, the Shopkeeper follows the player while he holds an unpaid pistol, and stops once he pays. The player shoots him with it; he falls stunned, dropping his shotgun, gets up angry, and throws the player, who loses a heart.

Killed, he drops his shotgun and 1 to 4 Gold Nuggets, and counts in the end-of-game statistics' Shopkeeper row [24]. Crushed in a block, he dies at once [25].

Interactions

#

Buying

#

A ware is bought by holding it in the shop and pressing the pay key with its price in hand; without it, the player drops the ware ("YOU HAVEN'T GOT ENOUGH MONEY!") [26]. A Golden Idol set down on a shop's floor within 80 pixels of a calm Shopkeeper is sold for its value ("PLEASURE DOING BUSINESS!") [27]. A Crystal Skull sells the same way, and counts as an idol between levels [16].

Angering him

#

Each of these angers the nearest Shopkeeper, with its own shout, except that a broken wall and a lit bomb anger every Shopkeeper near the screen [28] [16]:

CauseShout
A ware taken out of the shop unpaid, by the player or thrown"COME BACK HERE, THIEF!"[29] [30]
A die carried out of a Dice House, or rolled again before the bet is settled"COME BACK HERE, THIEF!"[31] [32]
A block of the shop's walls destroyed"DIE, YOU VANDAL!"[33]
A lit bomb in the shop, near him"TERRORIST!"[34]
The Damsel he sells hurt or killed"HEY, ONLY I CAN DO THAT!"[35]
Any of these, once a Shopkeeper has been killed"YOU'LL PAY FOR YOUR CRIMES!"[36]

Stealing equips some wares at once and not others, by which leaves the shop first [16]. Hitting the Shopkeeper also angers him, with no shout: a crack of the Whip, which doesn't hurt him, a thrown item, a bullet, a Piranha's bite [37] [38] [16].

The thief's Shopkeeper

#

The shouts above also mark the player a thief: they add 2 to a count the game keeps, or 3 if it's already above 0 [39]. Each level's exit takes 1 off it [40], and each new level that starts with it above 0, or after the player has ever killed a Shopkeeper, puts an angry Shopkeeper on patrol at its exit [41]. The shops on that level have "WANTED" posters of the player, their Shopkeepers patrol rather than stand, every ware is free, and the Kissing Parlor and the Dice House turn him away [42] [43] [44] [45]. So one theft puts a Shopkeeper at the next level's exit; a killing, at every exit to the end of the game. Each shop's page covers stealing from it, as the General Store's does.

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 the player takes the exit unhurt [46].

Hitting a Shopkeeper doesn't make the player a thief: in the pistol clip, the angry Shopkeeper's wares are free, but the player isn't marked [16] [47].

Fighting him

#

The Shopkeeper has 20 hit points [1].

WayDamage
Stomping1 for every 16 steps the player has been falling, rounded up (three times that with Spike Shoes); stuns him[48]
WhipNone; angers him[49]
Machete2 hit points, at most once every 10 steps[50]
A thrown item faster than 2 pixels a step1[38]
A bullet (Shotgun, Pistol)4; stuns him[51]
A Bomb's explosion30: kills him[52]
A Piranha, while he swims1, at most once every 10 steps; angers him[53]
A Spear Trap2; stuns him[54]
Spikes, falling onto themKills him[55]
A block, inside oneKills him[25]

A stomp while the player is still rising takes nothing, though it stuns him [16]. Killing a Shopkeeper makes the player a murderer for the rest of the game, and so does his death by anything else, Spikes included, which counts as the player's kill [56] [16] [57]. In the clip, the Shopkeeper chasing a thief walks off a block into a hole with Spikes in it [58]. On one of Kali's altars his body is worth half of 12 favor dead, and all of it stunned, if it lies still there for 20 steps before he wakes [59]. A Mantrap can swallow him; he comes back out, angry and without his shotgun, when it dies or wakes [60] [61].

Locations

#
Where
Every shop: the Mines, Jungle, Ice Caves, Temple and Yeti lair's shops, and each of the Black Market'sOne, by the door[62] [63] [64] [65] [66] [67]
Any level's exit, Olmec's Lair's tooOn patrol, while the player is a thief or a murderer[41]
The Stars challenge roomDropping in from the ceiling, angry and unarmed, more often the more the player kills[68]
The level editorTile !, on patrol[69]

Trivia

#
  • The anger script's comment: "Make the nearest shopkeeper angry. RAWR!" [70].
  • The Stars room's Shopkeepers are a kind of their own, which bleed and vanish 200 steps after they die [71] [72].
  • A commented-out branch would have slowed him to a walk at a wall he couldn't jump [73].

FAQ

#
How do you make the Shopkeeper angry in Spelunky Classic?

By stealing from his shop, damaging its walls, setting off a bomb in it, hurting the Damsel he sells, or attacking him. An angry Shopkeeper chases the player and fires his shotgun at him, and his wares are free.

How much damage does the Shopkeeper's shotgun do in Spelunky Classic?

4 hearts for each pellet that hits, and a blast is 6 pellets. A single pellet takes all four of the hearts the player starts with.

Why is there a Shopkeeper at the exit in Spelunky Classic?

Because the player stole from a shop or angered a Shopkeeper. For a level or more after it, one waits at each level's exit and attacks the player on sight. After a Shopkeeper is killed, one waits at every exit for the rest of the game.

How do you kill the Shopkeeper in Spelunky Classic?

He has 20 hit points: a bomb's explosion, a shotgun blast that hits him squarely, a fall onto spikes or being crushed kills him at once; stomps, thrown items and the Machete wear him down. He drops his shotgun and 1 to 4 Gold Nuggets.

Can you sell things to the Shopkeeper in Spelunky Classic?

Only a Golden Idol (or a Crystal Skull). Set down on the shop's floor near a calm Shopkeeper, it's sold for its value: "PLEASURE DOING BUSINESS!"

#
A patrolling Shopkeeper's walk lasts one step. A Shopkeeper on patrol in open ground sets off walking, but his walk's check for a wall ahead sends him back to patrolling on the very next step. He coasts a few pixels to a stop, waits, and shuffles again, every second or so.
Clip not rendered yet
A Shopkeeper the Spikes kill counts as the player's kill. A thief who stole a cape waits on a floor past a hole with spikes in it. The angry shopkeeper chasing him jumps onto a block and walks off it into the hole. The spikes kill him, yet the game counts him as the player's kill and marks the player a murderer.

See also

#

References

#
  1. objects/oShopkeeper/create.gml:12
  2. objects/oShopkeeper/step.gml:99-148
  3. scripts/scrGetName.gml:24-58
  4. objects/oShopkeeper/step.gml:225-282
  5. objects/oShopkeeper/step.gml:72-85
  6. objects/oShopkeeper/step.gml:337-438
  7. objects/oShopkeeper/step.gml:341-349
  8. objects/oShopkeeper/step.gml:368-408
  9. objects/oBullet/collision_oCharacter.gml:1-21
  10. objects/oBullet/collision_oEnemy.gml:1
  11. objects/oShopkeeper/collision_oCharacter.gml:22-77
  12. objects/oPlayer1/step.gml:1815-1842
  13. objects/oShopkeeper/step.gml:283-336
  14. objects/oShopkeeper/step.gml:309-328
  15. Clip shopkeeper/patrol
  16. Quirk 1 (docs/quirks.md)
  17. Replay fidelity/replays/enemy-shopkeeper-patrol-one-step.txt
  18. Clip quirks/shopkeeper-patrol-one-step
  19. objects/oShopkeeper/step.gml:87-97
  20. objects/oShopkeeper/step.gml:445-478
  21. objects/oShopkeeper/step.gml:511-522
  22. objects/oBullet/collision_oEnemy.gml:17-25
  23. objects/oShopkeeper/collision_oShotgun.gml:1-14
  24. objects/oShopkeeper/step.gml:479-509
  25. objects/oShopkeeper/step.gml:24-63
  26. objects/oPlayer1/step.gml:1359-1390
  27. objects/oGoldIdol/step.gml:6-27
  28. scripts/scrShopkeeperAnger.gml:7-23
  29. objects/oItem/step.gml:17-35
  30. objects/oPlayer1/step.gml:541-553
  31. objects/oDice/step.gml:10-17
  32. objects/oDice/step.gml:219-224
  33. objects/oSolid/destroy.gml:1-7
  34. objects/oBomb/step.gml:6-17
  35. objects/oDamsel/collision_oWhip.gml:19-22
  36. scripts/scrShopkeeperAnger.gml:13
  37. objects/oShopkeeper/collision_oWhip.gml:12-18
  38. objects/oItem/step.gml:289-298
  39. scripts/scrShopkeeperAnger.gml:21-22
  40. objects/oPlayer1/step.gml:874
  41. scripts/scrInitLevel.gml:245-257
  42. scripts/scrRoomGen.gml:404-412
  43. objects/oShopkeeper/step.gml:121-124
  44. objects/oItem/step.gml:8-15
  45. objects/oPlayer1/step.gml:1392-1397
  46. Replay fidelity/replays/shop-seed-3-thief-next-level.txt
  47. Replay fidelity/replays/weapon-seed-39-pistol.txt
  48. objects/oShopkeeper/collision_oCharacter.gml:5-21
  49. objects/oShopkeeper/collision_oWhip.gml:1-19
  50. objects/oShopkeeper/collision_oWhip.gml:3-11
  51. objects/oBullet/collision_oEnemy.gml:14-25
  52. objects/oExplosion/collision_oEnemy.gml:12-19
  53. objects/oPiranha/step.gml:107-118
  54. objects/oEnemy/step.gml:76-97
  55. objects/oEnemy/step.gml:108-128
  56. objects/oShopkeeper/step.gml:479-503
  57. Replay fidelity/replays/shop-seed-35-spikes-murderer.txt
  58. Clip quirks/shopkeeper-spikes-murderer
  59. objects/oEnemy/step.gml:130-166
  60. objects/oManTrap/step.gml:20-40
  61. objects/oManTrap/step.gml:106-120
  62. scripts/scrRoomGen.gml:432-436
  63. scripts/scrRoomGen2.gml:447
  64. scripts/scrRoomGen3.gml:374
  65. scripts/scrRoomGen4.gml:476
  66. scripts/scrRoomGenYeti.gml:393
  67. scripts/scrRoomGenMarket.gml:344
  68. objects/oStarsRoom/alarm_0.gml:1-22
  69. scripts/scrCreateTileObj.gml:151-155
  70. scripts/scrShopkeeperAnger.gml:1-5
  71. objects/oShopkeeper2/create.gml:1-5
  72. objects/oShopkeeper2/step.gml:1-11
  73. objects/oShopkeeper/step.gml:415-426

Source code

  • objects/oShopkeeper/create.gml
  • objects/oShopkeeper/step.gml
  • objects/oShopkeeper/collision_oCharacter.gml
  • objects/oShopkeeper/collision_oWhip.gml
  • objects/oShopkeeper/collision_oShotgun.gml
  • objects/oShopkeeper2/step.gml
  • scripts/scrShopkeeperAnger.gml
  • scripts/scrInitLevel.gml
  • objects/oPlayer1/step.gml
#