SpelunkyFan wiki

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. The player walks off the floor into a pool of lava and dies as his feet touch it.

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.

Lava flowing away. A bomb in a Temple lava pool destroys the pool's wall, and the lava flows away, dripping, beside the player, who isn't hurt.

Damage

#
VictimWhat happens
The playerLoses 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 monstersKilled when their feet are in lava, then sink; one whose head the lava covers is removed[9]
A DamselKilled[10]
OlmecSinks and is destroyed: lava is the only thing that kills him[11]
ItemsStop and sink 0.05 pixels a step, and are destroyed once lava covers them; a bomb explodes. The Sceptre sinks without being destroyed[12]
TreasureSinks and is destroyed the same way[13]
A ropeBurns 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

#
Related

References

#
  1. objects/oPlayer1/step.gml:195-213
  2. objects/oPlayer1/step.gml:196
  3. objects/oLava/step.gml:6-15
  4. Replay fidelity/replays/terrain-bomb-lava.txt
  5. scripts/scrSetupWalls.gml:398-414
  6. objects/oLava/step.gml:1-16
  7. objects/oLava/create.gml:3-5
  8. objects/oLava/destroy.gml:1-9
  9. objects/oEnemy/step.gml:63-74
  10. objects/oDamsel/step.gml:77-85
  11. objects/oOlmec/step.gml:35-43
  12. objects/oItem/step.gml:160-185
  13. objects/oTreasure/step.gml:69-79
  14. objects/oRope/step.gml:1-4
  15. objects/oPlayer1/step.gml:200
  16. objects/oEnemy/step.gml:68
  17. scripts/scrRoomGen4.gml:328-332
  18. scripts/scrRoomGen4.gml:497-500
  19. Room rOlmec, as the room editor placed it
  20. Room rEnd, as the room editor placed it
  21. Room rSun, as the room editor placed it
  22. scripts/scrCreateTileObj.gml:69-72
  23. objects/oLavaSolid/create.gml:1-3
  24. Replay fidelity/replays/terrain-rope-burn-lava.txt
  25. objects/oPlayer1/step.gml:83-88
  26. scripts/scrEntityGen.gml:410-427
  27. objects/oEnemy/step.gml:65-74

Source code

  • objects/oLava/create.gml
  • objects/oLava/step.gml
  • objects/oLava/destroy.gml
  • objects/oPlayer1/step.gml
  • objects/oEnemy/step.gml
  • objects/oItem/step.gml
  • objects/oTreasure/step.gml
  • scripts/scrSetupWalls.gml
  • scripts/scrRoomGen4.gml
#