Lava
Verified against the spelunky.ai port v0.1.10 on .
Lava is a hazard in Spelunky Classic, pools of molten rock in the Temple and Olmec's Lair that kill the player as soon as his feet touch them.
Lava fills pools in the Temple and the depths of Olmec's Lair. It's a liquid, the kind of water that burns: the player dies the moment his feet touch it, and so does a monster. Some of its surface spurts flames, and blobs of magma that become Magma Men. On a dark level it lights the dark around it.
How it works
#Lava is a kind of water to the code: it fills a space and flows into any opening when the blocks holding it are destroyed, as water does [4]. The difference is what it does to whatever enters it. The clip shows the player walking off a floor into a pool: he dies as his feet touch it.
Spurts. When a level is made, each block of lava with nothing above it has a 1 in 4 chance of spurting [5]. A spurting block waits 100–300 steps (picked when it's made), then throws a flame up, or with a 1 in 8 chance a blob of magma, which turns into a Magma Man where it lands; it only counts down while the player is within 240 pixels [6] [7].
Flowing. Lava that flows away from its place is destroyed there, leaving three drips and, 1 in 6, a falling flame [8]. The second clip shows a bomb opening a Temple pool's wall: the lava flows out and away beside the player, who isn't hurt.
Damage
#| Victim | What happens | |
|---|---|---|
| The player | Loses 99 hearts, every heart he can have, as soon as a point just below his middle is in lava; he burns and sinks | [1] |
| Most monsters | Killed when their feet are in lava, then sink; one whose head the lava covers is removed | [9] |
| A Damsel | Killed | [10] |
| Olmec | Sinks and is destroyed: lava is the only thing that kills him | [11] |
| Items | Stop and sink 0.05 pixels a step, and are destroyed once lava covers them; a bomb explodes. The Sceptre sinks without being destroyed | [12] |
| Treasure | Sinks and is destroyed the same way | [13] |
| A rope | Burns from the segment in the lava up | [14] |
A death in lava is counted in the end-of-game statistics' lava row [15]. A monster lava kills doesn't count as the player's kill [16]. The monsters' check is in the code most monsters share, so those whose own step event replaces it, such as the Bat and the Magma Man, aren't hurt by it. A smash trap that slides into lava sinks and is destroyed too (Smash Trap).
Locations
#- The Temple, in its room templates' pools: each water tile of a Temple room is lava, and some pool edges are lava or a block, 1 in 2 each [17] [18].
- Olmec's Lair, whose room is built over a sea of lava [19].
- The ending and the Sun challenge room, a bonus room [20] [21].
- Custom levels, as the level editor's tile
l[22].
Those rooms also have solid blocks drawn as lava, which are only walls [23].
Avoiding
#- Lava kills on touch, whatever the player's hearts, so there's no crossing it: only over it, on a rope, a ladder or a jump.
- Mind the spurts. A blob of magma thrown up by a spurt hurts the player, and becomes a Magma Man where it lands (Magma Man).
- Letting it out. A bomb that breaks a pool's wall lets it flow away, as in the second clip, which can open the way across, or flood the floor below.
Interactions
#- Ropes dropped into lava burn up from the bottom, segment by segment [24].
- Light. Lava counts as a light source on a dark level [25].
- Generation keeps traps off lava: a Spear Trap isn't built where it would block a passage of lava, nor one on a block with lava on it [26].
FAQ
#- Does lava kill you instantly in Spelunky Classic?
Yes. The moment the player's feet touch lava he loses every heart, catches fire and sinks.
- Can you swim in lava in Spelunky Classic?
No. Lava flows like water when its wall is broken, but the player dies on touching it, before he could swim.
- Where is lava in Spelunky Classic?
In the Temple (levels 13–16), in pools that some rooms have, and under Olmec's Lair, where it's what kills Olmec.
- What happens to items that fall into lava?
They stop and sink slowly, and are destroyed once the lava closes over them; a bomb blows up. Treasure is lost the same way, and a rope burns.
See also
#References
#objects/oPlayer1/step.gml:195-213objects/oPlayer1/step.gml:196objects/oLava/step.gml:6-15- Replay
fidelity/replays/terrain-bomb-lava.txt scripts/scrSetupWalls.gml:398-414objects/oLava/step.gml:1-16objects/oLava/create.gml:3-5objects/oLava/destroy.gml:1-9objects/oEnemy/step.gml:63-74objects/oDamsel/step.gml:77-85objects/oOlmec/step.gml:35-43objects/oItem/step.gml:160-185objects/oTreasure/step.gml:69-79objects/oRope/step.gml:1-4objects/oPlayer1/step.gml:200objects/oEnemy/step.gml:68scripts/scrRoomGen4.gml:328-332scripts/scrRoomGen4.gml:497-500- Room
rOlmec, as the room editor placed it - Room
rEnd, as the room editor placed it - Room
rSun, as the room editor placed it scripts/scrCreateTileObj.gml:69-72objects/oLavaSolid/create.gml:1-3- Replay
fidelity/replays/terrain-rope-burn-lava.txt objects/oPlayer1/step.gml:83-88scripts/scrEntityGen.gml:410-427objects/oEnemy/step.gml:65-74
Source code
objects/oLava/create.gmlobjects/oLava/step.gmlobjects/oLava/destroy.gmlobjects/oPlayer1/step.gmlobjects/oEnemy/step.gmlobjects/oItem/step.gmlobjects/oTreasure/step.gmlscripts/scrSetupWalls.gmlscripts/scrRoomGen4.gml