The lit Smash Trap's harmless touch
Verified against the spelunky.ai port v0.1.12 on .
The lit Smash Trap's harmless touch is a quirk of Spelunky Classic in which a dark level's Smash Trap's touch takes no hearts: it only crushes.
A Smash Trap hits the player for 10 hearts on every step it touches him, throws him and makes him drop what he holds. On a dark level the Temple makes the lit kind instead, which glows and slides as the plain one does, but isn't a Smash Trap to the one check that hits the player, so its touch does nothing. It kills only by sliding on into him until he's crushed.
What happens
#On a dark Temple level, the player jumps into the line of a lit Smash Trap. It slides at him, and its touch neither takes hearts nor throws him: it slides on into him, and crushes him [1].
Why
#On a dark level, scrEntityGen makes oSmashTrapLit where it would make oSmashTrap
[2]. The lit kind has the plain one's code
[3], but not the plain one as its parent: both are children of
oMovingSolid, where the lit Arrow and Spear Traps are children of their plain kinds [4]. The
player's step looks for a Smash Trap by name:
if (collision_rectangle(x-6, y-6, x+6, y+7, oSmashTrap, 0, 0))
{
if (global.plife > 0 and isRealLevel()) global.miscDeaths[8] += 1;
obj = instance_nearest(x, y, oSmashTrap);
global.plife -= 10;
if (obj.x+8 < x) xVel = -rand(4,6);
else xVel = rand(4,6);
yVel = -6;objects/oPlayer1/step.gml:1649-1657, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).A check for oSmashTrap finds its children, and the lit kind isn't one, so none of it runs: no 10 hearts, no
throw, no dropping what he holds [5], and no count in the deaths
table's SMASH TRAP row (miscDeaths[8]). The lit trap is still solid, so once it has slid into him until his
middle is inside it, the crush check any solid sets off takes 99 hearts, counted as CRUSHED
(miscDeaths[2]) [6].
Reproducing it
#Reach a dark Temple level with a Smash Trap, which one block in sixty gets once the monsters' rolls fail, and
step into its line [7]. The replay, with
seed 1, waits at level 13's exit until level 14 comes up dark, with six lit Smash Traps, and jumps the player
into one's line. It slides at him, and his 4 hearts go all at once, on the step it crushes him, with the
crush's yVel of -3; no step before has the hit's -6. The kill is counted as crushed, never as the smash trap
[8]. A plain Smash Trap's touch, on a lit level, takes 10 hearts
a step before it crushes him [9].
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
[4], and the oracle's fingerprint of the replay pins the hearts, the player's yVel and the
deaths table. No option turns it off.
FAQ
#- Does a Smash Trap hurt the player on a dark level?
Not by touching him. A dark level's Smash Trap is the lit kind, which the player's code doesn't count as a Smash Trap, so its touch takes none of the 10 hearts a plain one's does. It still kills him by sliding on into him until he's crushed.
- Does the lit Smash Trap knock the player back or make him drop what he holds?
No. Both are part of the plain Smash Trap's hit, which the lit kind never sets off.
- What does a lit Smash Trap's kill count as in the statistics?
Crushed, as anything solid's crush is, not the smash trap row.
See also
#References
#- Clip smash-trap/lit
scripts/scrEntityGen.gml:469-470objects/oSmashTrapLit/step.gml:1-137- Quirk 1 (docs/quirks.md)
objects/oPlayer1/step.gml:1658-1668objects/oPlayer1/step.gml:1492-1511scripts/scrEntityGen.gml:466-471- Replay
fidelity/replays/trap-dark-smash.txt - Replay
fidelity/replays/trap-smash-crush.txt