Mechanic · combat · role-playing game
Timed guard
A defense in a turn-based battle where a press just before an enemy's hit lands lessens or stops its damage.
On this page
A timed guard asks the defender for a press shortly before an enemy’s hit lands, instead of a held block. In Paper Mario a press in the last 3 updates1 before the hit takes 1 from Mario’s damage, unless A was also pressed in the 10 updates before those; a partner’s guard stops the damage1.
- ReducePaper Mario (2000), Mario. A fresh press of A in the 3 updates before a hit takes 1 off it, unless A was pressed in the 10 before those.1
- NegatePaper Mario (2000), partners. A partner's guard, read the same way, stops the hit's damage.1
Games
| Game | Year | How | Note |
|---|---|---|---|
| Paper Mario | 2000 | Reduce | Mario · a fresh press of A in the 3 updates before a hit takes 1 off it, unless A was pressed in the 10 before those |
| Paper Mario | 2000 | Negate | partners · a partner's guard, read the same way, stops the hit's damage |
Every claim about this mechanic, by game (1)
References
- ^ abcdIn the US version of Paper Mario, an enemy's hit on Mario is guarded when A was pressed shortly before it lands.
calc_enemy_damage_targetcallscheck_block_input(BUTTON_A)when Mario's debuff is none or one numbered at or afterSTATUS_KEY_POISON(so not dizzy, paralyzed, asleep, frozen, or stopped), he isn't stone, and the attack isn'tDAMAGE_TYPE_UNBLOCKABLE; with the Berserker badge,rand_int(1)decides instead. The check returns false before action commands are learned and in demo battles, and returns a guard with no press in the tutorial battle while the mode isAC_MODE_TUTORIAL_BLOCK. It guards if a fresh press of A is in the last 3 entries of the battle's pressed-button buffer, whichbtl_updatewrites once per battle update (5 entries with a Dodge Master badge, when the partner isn't acting), unless A was also pressed in the 10 entries before those. A guard takes 1 from Mario's damage, plus 1 for each Damage Dodge badge equipped. A guard by the partner, checked the same way when the partner isn't stone or knocked out, sets the damage to 0.Codepmret/papermariorevisedHow we know
551 if (battleStatus->actionCommandMode == AC_MODE_TUTORIAL_BLOCK && (battleStatus->flags1 & BS_FLAGS1_TUTORIAL_BATTLE)) { 552 battleStatus->blockResult = BLOCK_RESULT_SUCCESS; 553 return true;
src/battle/action_cmd.c lines 551–553 at 1104f1f · upstream ↗ 556 if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED || (gGameStatusPtr->demoBattleFlags & DEMO_BTL_FLAG_ENABLED)) { 557 return false; ⋮ 567 block = false; 568 blockWindow = 3; 569 mashWindow = 10; ⋮ 571 if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING) && is_ability_active(ABILITY_DODGE_MASTER)) { 572 blockWindow = 5; ⋮ 575 // Pre-window mashing check 576 bufferPos = battleStatus->inputBufferPos; 577 bufferPos -= mashWindow + blockWindow; ⋮ 582 for (i = 0; i < mashWindow; i++) { ⋮ 587 if (battleStatus->pushInputBuffer[bufferPos] & buttonMask) { ⋮
src/battle/action_cmd.c lines 556–616 at 1104f1f · upstream ↗ 292 battleStatus->pushInputBuffer[battleStatus->inputBufferPos] = battleStatus->curButtonsPressed; 293 battleStatus->holdInputBuffer[battleStatus->inputBufferPos] = battleStatus->curButtonsDown; ⋮ 295 battleStatus->inputBufferPos++;
src/battle/16C8E0.c lines 292–295 at 1104f1f · upstream ↗ 231HitResult calc_enemy_damage_target(Actor* attacker) {src/battle/1A5830.c line 231 at 1104f1f · upstream ↗ 430 // apply damage mitigation from blocking ⋮ 432 switch (actorClass) { 433 case ACTOR_CLASS_PLAYER: ⋮ 435 if ((target->debuff == 0 || target->debuff >= STATUS_KEY_POISON) 436 && (target->stoneStatus == 0) 437 && !(battleStatus->curAttackElement & DAMAGE_TYPE_UNBLOCKABLE) 438 ) { ⋮ 441 if (player_team_is_ability_active(target, ABILITY_BERSERKER)) { 442 blocked = rand_int(1); 443 } else { 444 blocked = check_block_input(BUTTON_A); ⋮ 447 if (blocked) { ⋮
src/battle/1A5830.c lines 430–466 at 1104f1f · upstream ↗ 2808 STATUS_KEY_DIZZY = 0x00000004, 2809 STATUS_KEY_PARALYZE = 0x00000005, 2810 STATUS_KEY_SLEEP = 0x00000006, 2811 STATUS_KEY_FROZEN = 0x00000007, 2812 STATUS_KEY_STOP = 0x00000008, 2813 STATUS_KEY_POISON = 0x00000009,
include/enums.h lines 2808–2813 at 1104f1f · upstream ↗ 2870s32 player_team_is_ability_active(Actor* actor, s32 ability) { ⋮ 2875 case ACTOR_CLASS_PLAYER: 2876 if (!(gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE)) { 2877 hasAbility = is_ability_active(ability);
src/battle/190B20.c lines 2870–2878 at 1104f1f · upstream ↗ 1881 case ABILITY_DAMAGE_DODGE: 1882 if (badgeMoveID == MOVE_DAMAGE_DODGE) { 1883 ret++;
src/inventory.c lines 1881–1883 at 1104f1f · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-22.
Revised after a check by a second AI model, 2026-10-22.
Sources
Code
- pmret and papermario contributors. 2026. “papermario: a decompilation of Paper Mario (pmret/papermario).” Commit 1104f1f. pmret/papermario @ 1104f1f · licence, all uses