Majora's Mask

Damage Flag Corruption

discovered by volken330 in Ocarina of Time
found to be possible in Majora's Mask by Exodus and SeedBorn

(WIP)

When Link does an attack, the attack sets damage flags indicating what type(s) of damage the attack deals, and things that respond to attacks read those flags to determine the effects of the attack. Certain attacks (deku bubble, human magic spin attack, and Fierce Deity sword beam) spawn an actor with associated damage flags. Using a bottled item that also spawns an actor (fairy, bugs, fish, and spring water) at the right time causes the attack actor to deallocate and the bottled actor to spawn in its place in memory, overwriting the damage flags with garbage data, while the thing being attacked is still reading the damage flags. This garbage data is then interpreted as damage types, meaning these three attacks can deal keg damage, mirror shield light ray damage, and more.

The garbage data that replaces the damage flags depends on the bottled item used and where in memory the attack actor was allocated, so using damage flag corruption requires setting up the heap.

Examples

Play: YouTube video Play: YouTube video

Last updated October 12, 2026 by bewildebeest

Damage Flag Corruption - ZSR.GG