SpelunkyFan wiki

Rock

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

The Rock is a carryable item in Spelunky Classic that the player picks up and throws; a fast one takes 1 hit point from the monster nearest it.

It's the plainest thing the player can carry: it does nothing in his hands, and thrown, it hurts what it hits and keeps going, then lies where it stops, ready to be picked up again. Level generation scatters Rocks in every area, one on a block in a hundred.

Usage

#
Rock thrown at a snake. The player throws a rock down at a snake from a ledge: a thrown item moving fast enough kills the enemy it hits.

Crouching over a Rock with empty hands and pressing the attack key picks it up: the item the player lifts is the one nearest him, of any kind [8] [9]. He carries it in front of him [10], and the attack key throws it, at 8 pixels a step plus his own speed, rising at 3; holding up throws it at 9 upward, and holding down tosses it low along the floor at six tenths of the speed if he's on the ground, or throws it down at 3 if he isn't [11]. For its first 10 steps it can't hurt him [12] [13].

In flight it falls 0.6 pixels a step faster each step, up to 8, bounces back off a wall at half its speed, and bounces off the floor at half its speed if it lands faster than 1, losing seven tenths of its speed across on each step it touches the floor [14]. It moves only while it's within 16 pixels of the screen [15] [9].

While it moves faster than 2 pixels a step and touches a monster, it takes 1 hit point from the monster nearest it and gives the monster three tenths of its speed, and flies on; a Caveman, a Hawkman, a Mantrap, a Yeti or a Vampire is also stunned, and a few monsters have rules of their own (each monster's page has them) [1]. The clip shows a Rock thrown down from a ledge killing a Snake [16]. A Damsel it hits loses 1 hit point, which angers the Shopkeeper if she's for sale [17].

A Rock flying faster than 4 pixels a step across that hits the player, once its safe steps are over, takes 2 hearts, knocks him its way and stuns him for 20 steps [18].

Locations

#
  • Level generation, in every area: each block outside a shop with open space above it, more than 32 pixels from the entrance and the exit and 64 from a golden idol, has a 1 in 100 chance of a Rock on it [19].
  • The idol's boulder. A bomb that blows up the Boulder a golden idol sets rolling leaves rubble and, for each of three pieces, a 1 in 3 chance of a Rock [20].
  • The Tutorial, which has one [21].
  • The level editor's r tile [22].

Interactions

#
  • Pitcher's Mitt. Thrown from the hands, a Rock leaves 6 pixels a step faster across and nearly flat [23]. A fast Rock that would hit a player wearing it with empty hands is caught instead, and the code's catch takes every Rock near the screen into his hands at once [24] [9].
  • Bombs. An explosion adds 6 pixels a step to a Rock's speed up or down and 4 to 6 across, away from it [25], which can be fast enough to hurt monsters, or the player.
  • Lava. A Rock that touches lava stops and sinks, and is destroyed once it's under the surface [26].
  • Exits. Carried through a level's exit, it's in the player's hands on the next level [27] [28].

Tips

#
  • A Rock never breaks, so one Rock can be thrown at monster after monster.
  • A Rock thrown at a wall comes back at half its speed: one thrown hard enough can come back fast enough to hurt the player once its 10 safe steps are over.
  • A thrown Rock hurts the monster nearest it, which isn't always the one it touched, when two are close together.

Trivia

#
  • The Rock's own object sets only its name and size [29]: its flight and its hits on monsters are the code all items share, and only the player's code singles it out, for the hit a fast Rock does him and the Mitt's catch [18].

FAQ

#
How much damage does a Rock do in Spelunky Classic?

1 hit point to a monster, while it flies faster than 2 pixels a step. Most monsters have 1 hit point, so a thrown Rock kills them; a Caveman, a Hawkman, a Mantrap, a Yeti or a Vampire is stunned as well.

Can a Rock hurt the player in Spelunky Classic?

Yes. A Rock flying faster than 4 pixels a step across that hits him takes 2 hearts and stuns him, unless it's one he threw in the last 10 steps. With the Pitcher's Mitt and empty hands, he catches it instead.

Where do you find Rocks in Spelunky Classic?

Lying on the ground in every area: level generation gives each block with open space above it a 1 in 100 chance of one. Bombing the boulder a golden idol sets off can leave some, and the Tutorial has one.

Does a Rock break when thrown in Spelunky Classic?

No. Unlike a Jar or a Skull, it bounces off walls and floors and can be picked up and thrown again; only lava destroys it.

#
A thrown rock hurts the nearest enemy, not the one it hits. The player throws a rock up at a spider and a bat hanging side by side. It hits the spider, but the bat dies: a fast thrown item hurts the enemy nearest to it, not the one it touched.
The Pitcher's Mitt catches every rock at once. Wearing a pitcher's mitt, the player throws a rock at a wall and catches it on the rebound. The two rocks lying on the floor jump into his hands with it, and when he throws, all three fly together.

See also

#
Related

References

#
  1. objects/oItem/step.gml:256-350
  2. objects/oItem/step.gml:282
  3. objects/oItem/step.gml:294
  4. objects/oItem/step.gml:305
  5. objects/oItem/step.gml:315
  6. objects/oItem/step.gml:325
  7. objects/oItem/step.gml:344
  8. objects/oPlayer1/step.gml:1203-1214
  9. Quirk 1 (docs/quirks.md)
  10. objects/oItem/step.gml:37-61
  11. scripts/scrUseItem.gml:605-646
  12. scripts/scrUseItem.gml:606-607
  13. objects/oItem/alarm_2.gml:1
  14. objects/oItem/step.gml:84-111
  15. objects/oItem/step.gml:1-3
  16. Clip snake/thrown-rock
  17. objects/oItem/step.gml:365-398
  18. objects/oPlayer1/step.gml:1538-1565
  19. scripts/scrTreasureGen.gml:27-44
  20. objects/oExplosion/collision_oBoulder.gml:1-6
  21. Room rTutorial, as the room editor placed it
  22. scripts/scrCreateTileObj.gml:114-117
  23. scripts/scrUseItem.gml:667-676
  24. objects/oPlayer1/step.gml:1543-1548
  25. objects/oExplosion/collision_oItem.gml:30-36
  26. objects/oItem/step.gml:160-185
  27. objects/oPlayer1/step.gml:842-850
  28. objects/oLevel/create.gml:25-30
  29. objects/oRock/create.gml:3-5

Source code

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