Ruby
Verified against the spelunky.ai port v0.1.10 on .
For the bigger gem, see Big Ruby.
The Ruby is a small gem in Spelunky Classic worth $400 in the Mines and more deeper down, found only in Chests.
It's one of the three small gems a Chest holds, with the Emerald and the Sapphire: worth twice an Emerald and as much as a Sapphire. Like every gem, it can't be collected until a moment after it appears; then the player collects it by touching it.
Value
#A Ruby's base value is $400, and it's worth a quarter of that more for each area past the Mines, the code counting Olmec's Lair as an area of its own [3] [4]:
| Area | Value |
|---|---|
| The Mines | $400 |
| The Jungle | $500 |
| The Ice Caves | $600 |
| The Temple | $700 |
| Olmec's Lair | $800 |
Locations
#Rubies come only out of Chests. Opened, a Chest that isn't a trap spills 3–4 small gems, each an Emerald, a Sapphire or a Ruby, one chance in three [2]; one Chest in twelve, outside the Tutorial, holds a lit Bomb instead [5]. Nothing else in the game makes one: level generation, the monsters and the level editor make only the big gems [6].
Collecting
#A new Ruby can't be collected: the code all treasure shares starts it uncollectable, and the gem's own alarm makes it collectable 20 steps (0.67 seconds) after it appears [7] [8] [9]. Gold out of the rock has no such wait [10]. After that, the player collects it by touching it while he isn't stunned or dead [11].
He takes one treasure a step, the one nearest him, and only if that one can be collected [12]. So a gem fresh out of a Chest that lies nearer him than another treasure he touches holds the other back too, until its wait is over: the same nearest pick as the nearest-enemy hits [13].
In the clip, a Chest opens into an Emerald, a Sapphire and two Rubies at the player's feet. He stands among them, collecting nothing, for 20 steps; then he takes one a step, a Ruby, the Sapphire, the other Ruby and last the Emerald [14].
Its value shows under his money and is counted into it after a short pause; whatever is left is counted at once when he leaves the level [15] [16]. A gem plays its own sound, where gold plays the coin's [17], and the screen between levels shows each Ruby collected on the level [18].
A loose Ruby falls and comes to rest like other treasure, moving only while it's on the screen; a Web it falls into holds it, and lava it sinks into destroys it [19] [20].
Trivia
#- Each kind of gem collected is counted in a tally of its own (
global.rubiesfor the Ruby), which only the screen between levels reads, counting it back down as it draws the level's loot [21] [22].
FAQ
#- How much is a Ruby worth in Spelunky Classic?
$400 in the Mines, $500 in the Jungle, $600 in the Ice Caves, $700 in the Temple and $800 in Olmec's Lair: twice an Emerald's worth, and the same as a Sapphire.
- Where do you find Rubies in Spelunky Classic?
Only in Chests. An opened Chest spills three or four small gems, each an Emerald, a Sapphire or a Ruby at even odds, unless it's one of the one in twelve that hold a lit bomb.
- Why can't I pick up a Ruby in Spelunky Classic?
A new Ruby can't be collected for its first 20 steps (0.67 seconds), so the gems out of a Chest stay at the player's feet a moment before he takes them, one a step.
- Is a Ruby worth more than a Sapphire in Spelunky Classic?
No, not a small one: a Ruby and a Sapphire are both worth $400 in the Mines. A Big Ruby, at $1,600, is worth more than a Big Sapphire, at $1,200.
See also
#References
#objects/oRuby/create.gml:8objects/oPlayer1/step.gml:580-593objects/oPlayer1/step.gml:1996scripts/scrInitLevel.gml:24-29objects/oPlayer1/step.gml:568-579scripts/scrCreateTileObj.gml:269-284objects/oTreasure/create.gml:10objects/oRuby/create.gml:7objects/oRuby/alarm_0.gml:1objects/oGoldChunk/create.gml:8objects/oPlayer1/step.gml:1990-2016objects/oPlayer1/step.gml:1990-1993- Quirk 1 (docs/quirks.md)
- Clip chest/open
objects/oPlayer1/step.gml:1953-1971objects/oPlayer1/other_animation_end.gml:46-50objects/oPlayer1/step.gml:2000-2014objects/oTransition/alarm_0.gml:41-46objects/oTreasure/step.gml:1-79objects/oWeb/collision_oTreasure.gml:1-2objects/oPlayer1/step.gml:2006-2012objects/oTransition/alarm_0.gml:29-88