SpelunkyFan wiki

Chest

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

For the box of items, see Crate; for the locked chest, see Udjat Eye.

The Chest is a carryable item in Spelunky Classic that opens, with up and the attack key, into three or four gems, or one time in twelve a lit bomb.

Opened, it spills out a handful of gems, worth from $200 each on the Mines' levels, and sometimes a big one; but now and then it's a trap that throws out a lit Bomb. It's heavy, like a Crate, and stays where it is, open, once it's been opened.

Usage

#
Chest opened. The player stands at a chest and presses up and the attack key. The lid opens and four gems spill out, an emerald, a sapphire and two rubies, which he walks over and collects.

Pressing up and the attack key while the player stands at a closed Chest opens it: its lid opens, and it stays, open, for good [2]. What comes out is thrown up at 2 pixels a step and up to 3 to either side [3]:

ContentsChance
A lit Bomb, which explodes 40 steps (1.33 seconds) later, and nothing else1 in 12, except on the Tutorial[4]
3–4 small gems, each an Emerald, a Sapphire or a Ruby, one chance in threeOtherwise[5]
And a big gem: a Big Emerald, a Big Sapphire or a Big Ruby, one chance in three1 in 4, with the small gems[6]

The bomb's test is that the level number is above 0, and the Tutorial is level 0 [7]. In the clip, a Chest opens into four gems, an emerald, a sapphire and two rubies, which the player walks over and collects [8].

A Chest is heavy: the player carries it higher than other items, and throws it at 4 pixels a step plus his own speed, rising at 2, or at 4 upward [9] [10]. Thrown faster than 2 pixels a step, it hurts a monster as any thrown item does [11].

Locations

#
  • Level generation, in every area: in a nook one block high with a wall beside it, a 1 in 15 chance, once the rolls for a web, the Udjat Eye's locked chest (on the level that has one) and a Crate's 1 in 10 fail [12].
  • The Temple: some of its rooms have a tile that's a Chest or a Crate, one chance in two each [13].
  • Olmec's Lair: a 1 in 15 chance on some of its tiles, the first of their rolls [14].
  • The Tutorial, which has one [15].
  • The level editor's c tile [16].

Interactions

#
  • Bombs. An explosion throws a Chest away from it without breaking or opening it [17].
  • Shopkeepers. A trap's lit bomb doesn't anger a Shopkeeper it's near, where one the player lights does: the trap lights it without marking it armed, and only an armed bomb angers him [18] [19].
  • Exits. The player sets down a heavy item, a Chest among them, when he takes an exit, so a Chest can't be carried to the next level [20].

Tips

#
  • A Chest that turns out to be a trap gives 40 steps to get clear of its bomb, which is thrown up out of it.
  • A Chest can be carried before it's opened, so its gems, or its bomb, come out where the player sets it down.

Trivia

#
  • The lifetime count of chests opened goes up on every press of up and the attack key at a Chest, before the code checks that it's closed, so an open Chest counts again each time. It's only written to the game's statistics file: the code that would show it is switched off [21] [22].
  • A trap Chest plays the sound of a trap rather than the Chest's own [23].

FAQ

#
What's in a Chest in Spelunky Classic?

3–4 small gems, each an Emerald, a Sapphire or a Ruby, and a 1 in 4 chance of a big one as well. One Chest in twelve, outside the Tutorial, holds a lit Bomb instead.

Can a Chest explode in Spelunky Classic?

Yes. With a 1 in 12 chance, opening one throws out a lit Bomb that explodes 40 steps (1.33 seconds) later, and no gems.

Can you open a Chest twice in Spelunky Classic?

No. An open Chest stays where it is, open, and up and the attack key do nothing more to it.

What's the difference between a Chest and a Crate in Spelunky Classic?

A Chest holds gems, or a trap, and stays once it's open; a Crate holds one item, such as a Bomb Bag or a Rope Pile, and vanishes when it's opened.

See also

#
Drops
Related

References

#
  1. objects/oPlayer1/step.gml:561-609
  2. objects/oPlayer1/step.gml:561-567
  3. objects/oPlayer1/step.gml:568-605
  4. objects/oPlayer1/step.gml:568-578
  5. objects/oPlayer1/step.gml:580-593
  6. objects/oPlayer1/step.gml:594-605
  7. objects/oPlayer1/other_animation_end.gml:87-94
  8. Clip chest/open
  9. objects/oItem/step.gml:44-56
  10. scripts/scrUseItem.gml:609-635
  11. objects/oItem/step.gml:256-350
  12. scripts/scrTreasureGen.gml:47-72
  13. scripts/scrRoomGen4.gml:359-363
  14. scripts/scrRoomGen5.gml:177-179
  15. Room rTutorial, as the room editor placed it
  16. scripts/scrCreateTileObj.gml:285-288
  17. objects/oExplosion/collision_oItem.gml:30-36
  18. objects/oPlayer1/step.gml:570-577
  19. objects/oBomb/step.gml:6-17
  20. objects/oPlayer1/step.gml:815-820
  21. objects/oPlayer1/step.gml:561-565
  22. objects/oGame/draw.gml:137-155
  23. objects/oPlayer1/step.gml:578-581

Source code

  • objects/oChest/create.gml
  • objects/oPlayer1/step.gml
  • objects/oItem/step.gml
  • scripts/scrUseItem.gml
  • scripts/scrTreasureGen.gml
#