Catching every Rock
Verified against the spelunky.ai port v0.1.10 on .
Catching every Rock is a quirk of Spelunky Classic in which a Pitcher's Mitt catch puts every Rock near the player in his hands, not just the one caught.
A Rock moving fast across the player costs him 2 hearts and stuns him, unless he wears the Pitcher's Mitt with empty hands, when he catches it. The catch is written for the object rather than the Rock, so it catches all of them.
What happens
#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 [1].
Why
#The player's step finds the Rock nearest him among those touching him, and if it's moving faster than 4 pixels a step and isn't one he's just thrown, either hurts him or, with the Mitt, catches it [2]:
if (global.hasMitt and !holdItem)
{
holdItem = oRock;
holdItem.held = true;
pickupItemType = holdItem.type;
}objects/oPlayer1/step.gml:1543-1548, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).The Rock it found is obj, but the catch puts oRock in his hands: the object, not the instance. In
GameMaker, setting a variable on an object sets it on every instance of it [3], so
holdItem.held = true makes every Rock that's awake held, and the shared item code puts each held item in the player's hands
[4]. The throw then sets the speed of holdItem, every Rock again, so
they all leave together [5] [6].
Reproducing it
#Wear the Mitt, with empty hands, and let a fast Rock hit the player once its few safe steps after a throw are over: his own Rock coming back off a wall, or one an explosion throws. Any other Rock near the screen comes to his hands with it. The replay of the clip's staged scene pins it: a Rock thrown at a pillar comes back at 7 pixels a step and is caught, and all three Rocks in the room are held until he throws them, all at the same speed [7].
In the port
#The spelunky.ai port reproduces it exactly: it's in docs/quirks.md's list of the 1.1 source's bugs [6], and the oracle's fingerprint of the replay pins every Rock's flight. No option turns it off.
FAQ
#- What does the Pitcher's Mitt catch do in Spelunky Classic?
A fast Rock that would hurt the player is caught instead, if he wears the Pitcher's Mitt and his hands are empty. The catch puts every Rock near the screen in his hands, not only that one.
- Why does the player throw several rocks at once?
The Mitt's catch marks the Rock object as held rather than the Rock it caught, which marks every Rock, and a throw then sends them all at the same speed, one on top of another.
- Is catching every Rock a bug?
It's in the 1.1 source: the catch writes the object's name where it means the instance it found. The spelunky.ai port keeps it.
See also
#- Related
References
#- Clip quirks/mitt-catch-every-rock
objects/oPlayer1/step.gml:1538-1565- Quirk 2 (docs/quirks.md)
objects/oItem/step.gml:37-67scripts/scrUseItem.gml:595-676- Quirk 1 (docs/quirks.md)
- Replay
fidelity/replays/item-mitt-catch-every-rock.txt
Source code
objects/oPlayer1/step.gmlobjects/oItem/step.gmlscripts/scrUseItem.gml