SpelunkyFan wiki

Pistol

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

The Pistol is a weapon in Spelunky Classic that fires one bullet at a time, taking 4 hit points from a monster; shops sell it from $5,000.

Its bullet is the Shotgun's pellet, one at a time: it takes 4 hit points from any monster it hits, and the Pistol can fire again after 20 steps, half the Shotgun's wait, with a smaller kick. Weapon Shops and the Dice House sell it, and Crates and buried blocks give it away.

Usage

#
Pistol shots. The player buys a pistol and fires it left into the shopkeeper beside him, who loses 4 hit points and falls stunned. Turning right, he shoots a bat out of the air. The shopkeeper gets up angry and knocks him down.

The Pistol is picked up like any item, crouching over it and pressing the attack key. While it's held, the attack key fires it, on the ground, in the air, hanging or climbing; crouching, the key puts it down in front of the player instead [1]. It isn't thrown. A shot fires one bullet at 6–8 pixels per step, plus the player's, never slower than 6 forward, straight ahead, knocks the player 1 pixel a step back and 1 up unless he's hanging or climbing, and starts the wait of 20 steps before the next [4].

The bullet flies in a straight line, without falling, until it hits a block, a monster, a damsel or a player [5]. In the clip, the player pays for a Pistol and fires it at the Shopkeeper beside him, who loses 4 of his 20 hit points and falls stunned; turning, he shoots a Bat out of the air. The Shopkeeper gets up angry and knocks him down, and the player drops the Pistol [6].

The Pistol goes with the player through a level's exit if he's holding it, and is in his hands on the next level [7] [8]. He drops it when he's stunned, or when he teeters too long at a ledge's edge [9] [10].

Damage

#

The bullet's code is its own, so every monster takes the same 4 hit points, with no wait, stunned or not; a Caveman, Yeti, Hawkman or Shopkeeper still alive is also stunned for 20 steps, and the Yeti King and the Tomb Lord are knocked back half as far [11]. The Shotgun's table has the rest; a Pistol's bullet is one of its pellets.

Obtaining

#
SourceChance
Weapon Shop1 in 4 for each ware, once the rolls for a Web Cannon, a Shotgun and a Bomb Box fail[12]
The Dice House's prize1 in 8, once the rolls before it, from a Jetpack's 1 in 40 to a Compass's 1 in 8, fail[13]
A Crate1 in 80, once the rolls before it, from a Jetpack's 1 in 500 to a Web Cannon's 1 in 80, fail[14]
Buried in a block1 in 19 of the items buried in blocks[15]

A Weapon Shop stocks one only if the level hasn't got one already [16], and it adds 10% of the base price for each level past the second [17]. Shops are made from level 2 on [18], and level 16, Olmec's Lair, has none:

Area1st level2nd level3rd level4th level
The Mines—$5,000$5,500$6,000
The Jungle$6,500$7,000$7,500$8,000
The Ice Caves$8,500$9,000$9,500$10,000
The Temple$10,500$11,000$11,500—

The Dice House puts its prize up from the same set of rare items, and a roll of seven gives it away [19] [20]. Every block of rock away from the level's edges that isn't gold and holds no gem has a 1 in 1200 chance of hiding an item, one of nineteen at random [21] [15]. In custom levels, it's the level editor's tile - [22].

Paying for one, or carrying one out of a shop without paying, which angers the Shopkeeper, shows "YOU GOT A PISTOL!", and it stays in the player's hands [23] [24] [25].

Interactions

#
  • Shopkeepers. A shot stuns a Shopkeeper for 20 steps; when he gets up he's angry, as in the clip [6].
  • Jars and Skulls. A bullet breaks either [26].

Tips

#
  • Most monsters have 4 hit points or fewer, so one bullet kills them, and the Pistol's shorter wait lets it fire at the next one sooner than the Shotgun can.

Trivia

#
  • The Pistol's shot plays the Shotgun's sound and shows its blast [27].

FAQ

#
How much damage does the Pistol do in Spelunky Classic?

4 hit points a bullet, to any monster, the same as one of the Shotgun's six pellets. Most monsters have 4 hit points or fewer, so one bullet kills them.

How fast can the Pistol fire in Spelunky Classic?

Once every 20 steps (0.67 seconds), half the Shotgun's wait.

Where do you find the Pistol in Spelunky Classic?

In Weapon Shops and as the Dice House's prize. Free ones come out of Crates (a 1 in 80 roll, once the rolls before it fail) and out of blocks that hide them.

How much does the Pistol cost in Spelunky Classic?

$5,000 on level 2, the first with shops, and 10% of that more on each level after it, up to $11,500 on level 15.

See also

#
Related

References

#
  1. scripts/scrUseItem.gml:216-275
  2. objects/oBullet/collision_oEnemy.gml:16
  3. objects/oPistol/create.gml:6
  4. objects/oPlayer1/step.gml:175
  5. objects/oBullet/step.gml:1-2
  6. Clip pistol/shopkeeper
  7. objects/oPlayer1/step.gml:842-850
  8. objects/oLevel/create.gml:25-30
  9. objects/oPlayer1/step.gml:329-345
  10. objects/oPlayer1/step.gml:150-171
  11. objects/oBullet/collision_oEnemy.gml:1-36
  12. scripts/scrShopItemsGen.gml:36-67
  13. scripts/scrGenerateItem.gml:47-59
  14. objects/oPlayer1/step.gml:617-625
  15. scripts/scrGenerateItem.gml:63-89
  16. scripts/scrShopItemsGen.gml:52-55
  17. scripts/scrShopItemsGen.gml:179-191
  18. scripts/scrLevelGen.gml:240
  19. scripts/scrRoomGen.gml:392-397
  20. objects/oShopkeeper/step.gml:173-200
  21. objects/oBrick/create.gml:7-16
  22. scripts/scrCreateTileObj.gml:357-362
  23. scripts/scrStealItem.gml:263-272
  24. Quirk 1 (docs/quirks.md)
  25. Replay fidelity/replays/weapon-seed-39-pistol.txt
  26. objects/oJar/collision_oBullet.gml:1
  27. scripts/scrUseItem.gml:245-258
  28. objects/oBullet/collision_oEnemy.gml:16-25
  29. objects/oBullet/collision_oEnemy.gml:1-16
  30. objects/oBullet/collision_oEnemy.gml:14-32

Source code

  • objects/oPistol/create.gml
  • objects/oBullet/step.gml
  • objects/oBullet/collision_oEnemy.gml
  • scripts/scrUseItem.gml
  • scripts/scrShopItemsGen.gml
  • scripts/scrGenerateItem.gml
#