Spring Trap
Verified against the spelunky.ai port v0.1.10 on .
The Spring Trap is a trap in Spelunky Classic, a spring on Ice Caves floors that throws the player high into the air when he steps on it, unharmed.
A Spring Trap is a spring plate lying on the floor of the Ice Caves. Stepping onto it throws the player straight up at 16 pixels per step (480 per second), and each time he comes back down on it, it throws him up again. It never hurts anyone: its danger is where it throws him, and it saves him from a long fall's damage.
How it works
#When the player is on the ground over its middle (within 6 pixels), standing, walking, ducking or looking up, the spring lifts him 16 pixels and throws him upward at 16 pixels per step. It then stays sprung for 10 steps and until its animation ends, and can't throw anything else until then [1] [3] [4]. The player doesn't have to press anything: landing on it is being on the ground over it. The clip shows him landing on a spring and being thrown up three times, every 24 steps.
A monster that doesn't fly is thrown up at 8 pixels per step and given 1 pixel a step more speed the way it faces; an item that isn't held, at the same speed, from 24 pixels up [5] [6].
Damage
#None: nothing in a Spring Trap's code hurts. Landing on one is safe however far the player falls, as the check for a long fall's damage skips a player on a spring [7].
Locations
#Level generation puts Spring Traps only in the Ice Caves, on the dark rock, not on ice: on each rock block with four open blocks above it, no monster or spikes on it, more than 64 pixels from the entrance and the exit, and not in a shop, a 1 in 10 chance, before the roll for a Yeti [8].
They're also in the Moon and Sun challenge rooms, bonus rooms [9] [10], and in
custom levels as the level editor's tile _ [11].
Avoiding
#- Step around it. It only throws what's over its middle, within 6 pixels, so a jump over it, or a step onto its edge, is safe.
- Remove its floor. A Spring Trap on screen with nothing under it disappears [12]. In the second clip a UFO's laser destroys the block under one, and it's gone the next step.
- Bombs don't destroy it directly. It isn't a block, and a Bomb that went off beside one left it in place [13]; a blast that breaks the block under it removes it.
Interactions
#- Spring Shoes make the player's own jumps higher; a Spring Trap throws him whether he wears them or not.
- Exits. A player going through a door isn't thrown, even over a spring [14].
Trivia
#- The spring's code for monsters and the one for items differ: a monster is lifted 16 pixels, an item 24, and only a Damsel among items is nudged the way it faces [15].
FAQ
#- What does a Spring Trap do in Spelunky Classic?
It throws whoever steps on it into the air: the player at 16 pixels a step, monsters and items at 8. It doesn't hurt, and landing on one never costs the player hearts for a long fall.
- Where are Spring Traps in Spelunky Classic?
In the Ice Caves (levels 9–12), on the floors of rock with plenty of open space above, and in the Moon and Sun challenge rooms.
- How do you get rid of a Spring Trap in Spelunky Classic?
By destroying the block under it: a Spring Trap with nothing under it disappears. A bomb's blast beside it doesn't destroy it.
See also
#- Related
References
#objects/oSpringTrap/collision_oPlayer1.gml:1-15objects/oSpringTrap/collision_oPlayer1.gml:1-3objects/oSpringTrap/other_animation_end.gml:1-5objects/oSpringTrap/step.gml:4objects/oSpringTrap/collision_oEnemy.gml:1-14objects/oSpringTrap/collision_oItem.gml:1-19objects/oPlayer1/step.gml:268-276scripts/scrEntityGen.gml:362-371- Room
rMoon, as the room editor placed it - Room
rSun, as the room editor placed it scripts/scrCreateTileObj.gml:245-248objects/oSpringTrap/step.gml:1-6- Replay
fidelity/replays/trap-spring.txt objects/oSpringTrap/collision_oPlayer1.gml:3objects/oSpringTrap/collision_oItem.gml:7-17
Source code
objects/oSpringTrap/create.gmlobjects/oSpringTrap/step.gmlobjects/oSpringTrap/collision_oPlayer1.gmlobjects/oSpringTrap/collision_oEnemy.gmlobjects/oSpringTrap/collision_oItem.gmlobjects/oSpringTrap/other_animation_end.gmlobjects/oPlayer1/step.gmlscripts/scrEntityGen.gml