Mechanic · combat · action, action-adventure
Dodge roll
A quick roll in the character's facing direction, often with a short window in which hits don't hurt.
On this page
A dodge roll trades a moment of control for distance and safety. In The Legend of Zelda: Ocarina of Time, A with the stick forward rolls Link1, and from frame 8 of the roll’s animation damage is ignored for 10 updates2.
- Invulnerable rollThe Legend of Zelda: Ocarina of Time (1998). A with the stick forward; 10 updates of invulnerability from the animation's frame 8.1,2
Games
| Game | Year | How | Note |
|---|---|---|---|
| The Legend of Zelda: Ocarina of Time | 1998 | Invulnerable roll | A with the stick forward; 10 updates of invulnerability from the animation's frame 8 |
Every claim about this mechanic, by game (2)
References
- ^ abIn the N64 NTSC 1.0 code, Link rolls when A is pressed with the stick forward, provided there is no hostile lock-on, his upper body isn't busy, an unnamed state flag (stateFlags1 bit 23) is clear, and the floor isn't floor type 7; with the stick elsewhere the same press puts away a held item or toggles Navi. The roll animation plays at 1.25 times speed (1.5 in the PAL N64 builds).Codezeldaret/oot
How we know
6489s32 Player_ActionHandler_Roll(Player* this, PlayState* play) { 6490 if (!Player_UpdateHostileLockOn(this) && !sUpperBodyIsBusy && !(this->stateFlags1 & PLAYER_STATE1_23) && 6491 CHECK_BTN_ALL(sControlInput->press.button, BTN_A)) { 6492 if (Player_TryRoll(this, play)) { 6493 return true; 6494 } else if ((this->putAwayCooldownTimer == 0) && (this->heldItemAction >= PLAYER_IA_SWORD_MASTER)) { 6495 Player_UseItem(play, this, ITEM_NONE); 6496 } else { 6497 this->stateFlags2 ^= PLAYER_STATE2_NAVI_ACTIVE;
src/overlays/actors/ovl_player_actor/z_player.c lines 6489–6498 at 14759ab · upstream ↗ 6350void Player_SetupRoll(Player* this, PlayState* play) { 6351 Player_SetupAction(play, this, Player_Action_Roll, 0); ⋮ 6354 FRAMERATE_CONST(1.25f, 1.5f) * sWaterSpeedFactor); ⋮ 6357s32 Player_TryRoll(Player* this, PlayState* play) { 6358 if ((this->controlStickDirections[this->controlStickDataIndex] == PLAYER_STICK_DIR_FORWARD) && 6359 (sFloorType != FLOOR_TYPE_7)) {
src/overlays/actors/ovl_player_actor/z_player.c lines 6350–6360 at 14759ab · upstream ↗ 46#if !OOT_PAL_N64 47#define FRAMERATE_CONST(value60Hz, value50Hz) (value60Hz) 48#else 49#define FRAMERATE_CONST(value60Hz, value50Hz) (value50Hz) 50#endif
include/versions.h lines 44–50 at 14759ab · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^ abIn the N64 NTSC 1.0 code, a roll makes Link invulnerable for 10 updates from frame 8 of its animation (8 updates in the PAL N64 builds): damage is ignored but, per the decompilers' comment, not the responses to it such as knockback.Codezeldaret/oot
How we know
9700 if (LinkAnimation_OnFrame(&this->skelAnime, 8.0f)) { 9701 Player_SetInvulnerability(this, FRAMERATE_CONST(-10, -8));
src/overlays/actors/ovl_player_actor/z_player.c lines 9700–9702 at 14759ab · upstream ↗ 4584 * @param timer must be a negative value representing the number of invulnerability frames. 4585 * @note Intangibility prevents taking damage and responses to damage like knockback, while invulnerability only 4586 * prevents taking damage. ⋮ 4588void Player_SetInvulnerability(Player* this, s32 timer) { 4589 if (this->invincibilityTimer > timer) { 4590 this->invincibilityTimer = timer;
src/overlays/actors/ovl_player_actor/z_player.c lines 4584–4590 at 14759ab · upstream ↗ 11709 if (this->invincibilityTimer < 0) { 11710 this->invincibilityTimer++;
src/overlays/actors/ovl_player_actor/z_player.c lines 11709–11710 at 14759ab · upstream ↗ 979 /* 0x0A78 */ s8 invincibilityTimer; // prevents damage when nonzero. Positive values are intangibility, negative are invulnerabilityinclude/player.h line 979 at 14759ab · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
Sources
Code
- zeldaret. 2026. “oot: a decompilation of The Legend of Zelda: Ocarina of Time (zeldaret/oot).” Commit 14759ab. zeldaret/oot @ 14759ab · licence, all uses