Lava

From SMWiki

Jump to: navigation, search
Mario getting killed by standard lava.

In Super Mario World, lava (also used as mud) is a deadly substance that will instantly kill you whenever you touch it, no matter what kind of powerup you have. Even the Star doesn't save you when you fall in lava. Lava also has the ability to kill sprites. However, a certain few cannot be killed by lava, not even if sprite buoyancy is set.

Hacking Information

Riding a skull train on underground lava.
  • One must distinguish standard object 0x1A (the type of lava (or mud) as it is used in castles) from tileset specific objects 0x38 through 0x3B (the type of lava (or mud) as it is used in caves).
    • Standard object 0x1A is treated just like water, except that it can kill the player. It can also kill sprites - except those that have the 'Can't be killed by stars' flag set ($7E:167A, bit 1) -, but only if the sprite buoyancy flag is set. Yoshi is the only exception to the 'Don't kill if can't be killed by star' rule.
    • Tileset specific objects 0x38-0x3B are treated as solid - this explains why Floating Skulls don't sink away in it, whereas they do with standard lava. Just like standard lava, these objects can kill all sprites except for those that can't be killed by stars. However, it isn't required to set the sprite buoyancy flag for that to happen - this type of lava will ignore that flag. Just like with standard lava, Yoshi is also automatically killed.
    • The sloped versions of this tileset specific lava allow sprites to walk on them, even those that should normally be killed instantly by lava. There is a fix for it, however, which only allows sprites that can't be killed by stars to walk on them.
  • To change the amount of time a sprite sinks away in lava before disappearing, change PC x9536 (SNES $019336) from 0x40 to whichever value you'd like to change it to.
CODE_019330:        A9 05         LDA.B #$05                ; \ Sink into lava.
CODE_019332:        9D C8 14      STA.W $14C8,X             ; / 
CODE_019335:        A9 40         LDA.B #$40                ; \ Sinking timer = #$40.
CODE_019337:        9D 58 15      STA.W $1558,X             ; /
Personal tools