Claim set · data/claims/super-mario-rpg.yaml

Super Mario RPG's rules (Yoshifanatic's Super Mario RPG disassembly)

Game: Super Mario RPG.

For the levels each character can reach, from 2 to 30 for Mario, 3 for Mallow, 7 for Geno, 9 for Bowser and 10 for Toadstool (their rows below that are zero), each level a character gains ends with a bonus the player picks from three: more Attack and Defense, more maximum HP, or more Magic Attack and Magic Defense. The amounts are a table by character and level. Defense and Magic Defense always get 1. HP, Attack and Magic Attack each repeat every three levels with amounts of their own, Mario's at levels 2 to 4 running 3, 3 and 4 HP, 1, 2 and 1 Attack, and 3, 1 and 1 Magic Attack. HP's cycle changes at level 21: Bowser's stays 1 or 3 at every level, and the others' fall to 1 to 3 (Toadstool's 3 at level 21, then 2, 1 and 1 over and over). The cursor starts on HP. Once the player picks, the screen shows the new values; A applies them and B goes back to the three choices. HP raises the maximum and fills the character's HP to it; each other stat stops at 255. Several levels from one battle each bring their own bonus, one after another. super-mario-rpg/level-up-bonus

CharacterLevelMax HP bonusAttack bonusDefense bonusMagic Attack bonusMagic Defense bonus
Mario231131
Mario332111
Mario441111
Mario531131
Mario632111
Mario741111
Mario831131
Mario932111
Mario1041111
Mario1131131
Mario1232111
Mario1341111
Mario1431131
Mario1532111
Mario1641111
Mario1731131
Mario1832111
Mario1941111
Mario2031131
Mario2112111
Mario2221111
Mario2311131
Mario2412111
Mario2521111
Mario2611131
Mario2712111
Mario2821111
Mario2911131
Mario3012111
Toadstool200000
Toadstool300000
Toadstool400000
Toadstool500000
Toadstool600000
Toadstool700000
Toadstool800000
Toadstool900000
Toadstool1091111
Toadstool1151131
Toadstool1253111
Toadstool1391111
Toadstool1451131
Toadstool1553111
Toadstool1691111
Toadstool1751131
Toadstool1853111
Toadstool1991111
Toadstool2051131
Toadstool2133111
Toadstool2221111
Toadstool2311131
Toadstool2413111
Toadstool2521111
Toadstool2611131
Toadstool2713111
Toadstool2821111
Toadstool2911131
Toadstool3013111
Bowser200000
Bowser300000
Bowser400000
Bowser500000
Bowser600000
Bowser700000
Bowser800000
Bowser912111
Bowser1031111
Bowser1111131
Bowser1212111
Bowser1331111
Bowser1411131
Bowser1512111
Bowser1631111
Bowser1711131
Bowser1812111
Bowser1931111
Bowser2011131
Bowser2112111
Bowser2231111
Bowser2311131
Bowser2412111
Bowser2531111
Bowser2611131
Bowser2712111
Bowser2831111
Bowser2911131
Bowser3012111
Geno200000
Geno300000
Geno400000
Geno500000
Geno600000
Geno761111
Geno851131
Geno953111
Geno1061111
Geno1151131
Geno1253111
Geno1361111
Geno1451131
Geno1553111
Geno1661111
Geno1751131
Geno1853111
Geno1961111
Geno2051131
Geno2113111
Geno2221111
Geno2311131
Geno2413111
Geno2521111
Geno2611131
Geno2713111
Geno2821111
Geno2911131
Geno3013111
Mallow200000
Mallow343111
Mallow461111
Mallow541121
Mallow643111
Mallow761111
Mallow841121
Mallow943111
Mallow1061111
Mallow1141121
Mallow1243111
Mallow1361111
Mallow1441121
Mallow1543111
Mallow1661111
Mallow1741121
Mallow1843111
Mallow1961111
Mallow2041121
Mallow2113111
Mallow2221111
Mallow2311121
Mallow2413111
Mallow2521111
Mallow2611121
Mallow2713111
Mallow2821111
Mallow2911121
Mallow3013111
CodeSuper-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L234766-L234832 — the bonus table: 15 bytes a level from level 2, 3 a character in the order Mario, Toadstool, Bowser, Geno, Mallow (the order of the name list at L83199-L83218)DATA_FA1CEC: db $03,$11,$31,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03 db $21,$11,$00,$00,$00,$00,$00,$00,$00,$00,$00,$04,$31,$11,$04,$11Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L84778-L84828CODE_C2E151: … LDA.w #$0001 … STA.l $400068,xOur readingset up the option sprites84778–84820put the cursor on option 184821–84822Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L84855-L84915CODE_C2E216: LDA.w $3014 BEQ.b CODE_C2E22A BIT.w #$0200 BNE.b CODE_C2E22B BIT.w #$0100 BNE.b CODE_C2E23A BIT.w #$0080 BNE.b CODE_C2E28E CODE_C2E22A: RTS CODE_C2E22B: …Our readingif Left is newly pressed84856–84859 move the cursor down one, from 0 round to 284867–84874if Right is newly pressed84860–84861 move it up one, from 2 round to 084876–84885if A is newly pressed, go to the preview84862–84863redraw the cursor at the new option84886–84914Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L84916-L84958CODE_C2E28E: … TYX LDA.l $400066,x SEC SBC.w #$0002 STA.b $E8 … LDA.b $E8 ASL ASL ASL …Our readingrow = (new level - 2) × 15 + character × 384919–84948read the bonus table84949–84952run the cursor's option from the table: 0 the Attack and Defense routine, 1 the HP one, 2 the Magic one, so the cursor's start at 1 is HP84953–84958Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L84959-L85091CODE_C2E2DE: … INY LDA.b [$E4],y STA.b $EA SEP.b #$20 LDA.l $7FF806,x STA.w $349A LDA.b $EA LSR LSR LSR …Our readingoption 0: Attack + the high four bits of the row's second byte, Defense + its low four bits, each at most 255; show both84959–85014option 1: maximum HP + the row's first byte; show it85016–85033option 2: Magic Attack + the high four bits of the third byte, Magic Defense + its low four bits, each at most 255; show both85035–85090Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L85092-L85170CODE_C2E41F: LDA.w $3014 BIT.w #$0080 BNE.b CODE_C2E43C BIT.w #$8000 BNE.b CODE_C2E42D RTS CODE_C2E42D: LDA.w #$0200 JSR.w CODE_C2E646 LDA.w #$2000 TSB.w $3490 …Our readingon a new press of A, apply85093–85095on a new press of B, show the three choices again85096–85105option 0: store the new Attack and Defense85153–85157option 1: store the new maximum HP, and the same as the current HP85159–85164option 2: store the new Magic Attack and Magic Defense85166–85170Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L83394-L83465 — the labels the level-up screen draws beside each value; the routine at L83075-L83090 picks the string by the message number (0x8010 Attack, 0x8011 Defense, 0x800F Max HP, 0x8008 Mg.Attack, 0x8009 Mg.Defense, 0x800D and 0x800E the prompt)DATA_C2D4FE: dw DATA_C2D522,DATA_C2D524,DATA_C2D539,DATA_C2D522,DATA_C2D5F9,DATA_C2D60F,DATA_C2D625,DATA_C2D63D dw DATA_C2D654,DATA_C2D66D,DATA_C2D685,DATA_C2D68F,DATA_C2D695,DATA_C2D697,DATA_C2D6A4,DATA_C2D611 … DATA_C2D625: db $04,$1A DATA_C2D627: db $04,$04,"Attack",$04,$0A,$08,$01,$03,$04,$0A,$2D,$04,$0A,$08,$02,$03,$00 … DATA_C2D63F: db "Defense",$04,$0A,$08,$01,$03,$04,$0A,$2D,$04,$0A,$08,$02,$03,$00 DATA_C2D654: …Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L83075-L83090CODE_C2D2C6: … LDA.b $F0 BPL.b CODE_C2D2DE LDX.w $3492 STX.b $FE AND.w #$7FFF CODE_C2D2DE: ASL TAX LDA.l DATA_C2D4FE,xSuper-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L14997-L15016CODE_C06A56: LDA.b #$01 CODE_C06A58: BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus BNE.b CODE_C06A58 REP.b #$20 LDA.w !REGISTER_Joypad1Lo BIT.w #$000F BEQ.b CODE_C06A6A LDA.w #$0000 CODE_C06A6A: TAX …Our readingread controller 1 (nothing when its low four bits are set)15000–15006new presses = held now and not held at the last read15008–15013Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L85172-L85205CODE_C2E4F3: LDA.l $400062,x ASL TAX LDA.w $0811,x DEC STA.w $0811,x AND.w #$00FF BEQ.b CODE_C2E508 JMP.w CODE_C2DEAE CODE_C2E508:Our readingcount off one of the character's pending levels; if any are left, start the next level's gains85194–85203else go to the next party member85205Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L84294-L84300CODE_C2DD46: LDA.b $8E ASL TAY LDA.w $0811,y INC STA.w $0811,yOur readingthe experience routine counts one more pending level in the party member's entry of 0x0811 for each level the new total reaches84295–84300An attack that runs the battle's damage step is judged as a timed hit as its damage is applied, from a record of the buttons first pressed on each frame, counted from the record's last clearing, the first frame recorded after it being frame 0 (a battle-script command clears it, and so does each judgment). Exactly one frame with a press of A, B, X or Y between the attacker's outer bounds doubles the damage if it falls between its inner bounds, and adds half otherwise; no such frame, or two or more, adds nothing, so pressing again on a later frame spoils a good press (buttons pressed together on one frame count once). The extra is shown with the damage and taken from the target's HP too. The bounds are frame counts per weapon (super-mario-rpg-tables/weapon-timing): the Hammer's inner bounds take a press 14 to 20 frames in, 7 frames (computed), and its outer bounds 8 to 38; the outer end is cut back to the number of frames recorded so far. Code — a hit lowers HP at battle-record offset 0x11, which holds the character record's byte 1, since the record is copied in from offset 0x10 (super-mario-rpg-tables/monsters, L75085-L75102): byte 1 (0x7FF801) is the current HP, byte 3 (0x7FF803) its maximumChecked by claude, 2026-11-08 — read the bonus routine's states, its row arithmetic and the three options, and decoded the pinned bonus table by that layoutRevised after a check by a second AI model, 2026-11-08.

The table has a row for every level from 2 to 30 for all five characters; Toadstool's rows hold zeros up to level 9, Bowser's to 8, Geno's to 6 and Mallow's at level 2. Left and Right are the controller's bits 0x0200 and 0x0100 in the game's copy of the SNES joypad register, A 0x0080 and B 0x8000.

An attack that runs the battle's damage step is judged as a timed hit as its damage is applied, from a record of the buttons first pressed on each frame, counted from the record's last clearing, the first frame recorded after it being frame 0 (a battle-script command clears it, and so does each judgment). Exactly one frame with a press of A, B, X or Y between the attacker's outer bounds doubles the damage if it falls between its inner bounds, and adds half otherwise; no such frame, or two or more, adds nothing, so pressing again on a later frame spoils a good press (buttons pressed together on one frame count once). The extra is shown with the damage and taken from the target's HP too. The bounds are frame counts per weapon (super-mario-rpg-tables/weapon-timing): the Hammer's inner bounds take a press 14 to 20 frames in, 7 frames (computed), and its outer bounds 8 to 38; the outer end is cut back to the number of frames recorded so far. super-mario-rpg/timed-hit

About: Super Mario RPG Action command

Value: full ×2 · partial ×1.5 · none ×1

CodeSuper-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L74295-L74343CODE_C28FE6: LDA.w #$1000 TSB.w $0706 JSL.l CODE_C10003 LDA.w #$1000 TRB.w $0706 SEP.b #$20 LDA.w $0B00 STA.w !REGISTER_BGModeAndTileSizeSetting … INC.w $3040 DEC.w $3042 …Our readingthe battle's display update74295–74331store this frame's new presses in the next of 128 entries, wrapping74335–74342Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L14997-L15013CODE_C06A56: LDA.b #$01 CODE_C06A58: BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus BNE.b CODE_C06A58 REP.b #$20 LDA.w !REGISTER_Joypad1Lo BIT.w #$000F BEQ.b CODE_C06A6A LDA.w #$0000 CODE_C06A6A: TAX …Our readingnew presses = buttons held now and not held at the last read15008–15013Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L69291-L69294CODE_C267FB: STZ.w $304C INC.b $60 JMP.w CODE_C20C4FOur readinga script command clears the record's position69292Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L58531-L58535 — the clearing command's entry among the battle-script commands of the table at L58324dw CODE_C266A8 dw CODE_C26713 dw CODE_C2676E dw CODE_C267FB dw CODE_C26803Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L79811-L79826LDA.l $7E001C,x CMP.b #$FF BNE.b CODE_C2B9C7 LDA.l $7E0001,x CODE_C2B9C7: STA.l $7E002E,x STA.b $FA LDX.w #$0010 LDY.w #$00E0 JSR.w CODE_C2B3CA LDX.b $F8 REP.b #$20 …Our readingweapon = the battler's weapon slot, or a byte of its record when the slot is empty79811–79816copy the weapon's four timing bytes into the battler's record79818–79826Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L79193-L79210CODE_C2B58E: LDA.l DATA_FA0000+$26 STA.b $DC LDA.w #DATA_FA438A>>16 STA.b $DE LDA.b $D0 ASL ASL TYX TAY LDA.b [$DC],y STA.b $00,x …Our readingthe four bytes at 4 × weapon in the weapon timing table79194–79208Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L81743-L81814CODE_C2C894: LDX.w $0750 STX.b $C8 LDA.l $7E005C,x AND.w #$00FF ASL STA.w $30D0 LDA.l $7E005D,x AND.w #$00FF ASL STA.w $30D2 LDA.l $7E005E,x …Our readingbounds = the attacker's four timing bytes, each × 2 (two bytes an entry)81744–81757outer end = the smaller of its byte and the record's position81758–81765clear the record's position, and judge81766–81772result - 1: below 0, no change81773–81777extra = the damage, halved when the result is 181784–81788damage shown + extra81790–81793unless the target is flagged, its HP - extra, at least 0; at 0 it falls81794–81812Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L82994-L83073CODE_C2D237: LDA.w $304E BIT.w #$0001 BEQ.b CODE_C2D246 LDA.w #$0002 STA.b $DE BRA.b CODE_C2D288 CODE_C2D246: STZ.b $DE LDA.w $304C CLC ADC.b $D0 …Our readingif flag bit 0 of 0x304E is set: result 282995–83000count the entries with A, B, X or Y between the outer bounds83003–83014not exactly one: result 083015–83016count those between the inner bounds83017–83027one: result 2; none: result 183028–83036the count: each entry from the first bound, wrapping at 256 bytes, with any of the bits 0xC0C0 set83057–83073Checked by claude, 2026-11-08 — read the record's writer, the weapon timing load, the judgment and the damage step at the pinned linesRevised after a check by a second AI model, 2026-11-08.

A, B, X and Y are the bits 0x0080, 0x8000, 0x0040 and 0x4000 of the SNES joypad register the game copies. The record holds new presses, so holding a button counts once. The display update that writes it is the battle's vertical-blank routine, so an entry is a frame. A set bit 0 of 0x304E makes every judgment a full success; the battle clears it at its start, and no line found sets it.

When an enemy's attack damages a party member, the same record of first presses judges a guard, counted back from the last frame recorded before the damage is applied (frame 0). Exactly one frame with a press of A, B, X or Y between frames 62 and 1 before it, falling between 23 and 3 frames before, gives back half the damage, rounded down (the party member takes half, rounded up), if it is outside 15 to 11 frames before, and blocks all of it inside them; no such frame, two or more, or one outside 23 to 3, blocks nothing. The full block is 5 frames wide and the half block the other 16 of a 21-frame span (computed). super-mario-rpg/timed-guard

About: Super Mario RPG Timed guard

Value: span frames 62–1 before · half frames 23–3 before · full frames 15–11 before

CodeAn attack that runs the battle's damage step is judged as a timed hit as its damage is applied, from a record of the buttons first pressed on each frame, counted from the record's last clearing, the first frame recorded after it being frame 0 (a battle-script command clears it, and so does each judgment). Exactly one frame with a press of A, B, X or Y between the attacker's outer bounds doubles the damage if it falls between its inner bounds, and adds half otherwise; no such frame, or two or more, adds nothing, so pressing again on a later frame spoils a good press (buttons pressed together on one frame count once). The extra is shown with the damage and taken from the target's HP too. The bounds are frame counts per weapon (super-mario-rpg-tables/weapon-timing): the Hammer's inner bounds take a press 14 to 20 frames in, 7 frames (computed), and its outer bounds 8 to 38; the outer end is cut back to the number of frames recorded so far. Code — the record of first presses and the counting routineSuper-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L81816-L81838CODE_C2C93E: SEP.b #$20 LDX.w $0750 STX.b $C8 JSR.w CODE_C2B30A STA.b $CF LDX.w $0730 STX.b $CA JSR.w CODE_C2B30A STA.b $CE BEQ.b CODE_C2C95A LDA.b $CF …Our readingonly when the attacker is not a party member and the target is81818–81828and bit 0x80 of the target's record word at 0x44 is set (what sets it is not read here)81834–81838Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L78807-L78819CODE_C2B30A: REP.b #$20 TXA CMP.l DATA_C2A1F0 BPL.b CODE_C2B319 LDA.w #$0001 SEP.b #$20 RTS CODE_C2B319: LDA.w #$0000 SEP.b #$20 RTSOur readinga battler below the first enemy's slot (0xFC00) is a party member78809–78818Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L76490-L76494DATA_C2A1EA: dw $FA80,$FB00,$FB80 DATA_C2A1F0: dw $FC00,$FC80,$FD00,$FD80,$FE00,$FE80,$FF00,$FF80Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L81840-L81916CODE_C2C969: LDA.w $304C SEC SBC.w #$0080 AND.w #$00FF STA.w $304C STA.b $B0 LDA.w #$0002 STA.w $30D0 LDA.w #$0050 STA.w $30D2 LDA.w #$0078 …Our readingstart 128 bytes (64 entries) back from the record's position81841–81846bounds 2, 0x50, 0x78, 0x7C: entries 1 to 62 outer, 40 to 60 inner81847–81860result below 2: no guard81861–81866bounds 0x50, 0x60, 0x68, 0x78: entries 40 to 60 outer, 48 to 52 inner81869–81884result 1: half the damage, rounded down, goes back to the target's HP and off the damage shown81885–81916Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L81951-L81961CODE_C2CA73: LDA.l $7E0041,x BIT.w #$0080 BNE.b CODE_C2CA8F LDA.l $7E0011,x CLC ADC.b $C2 STA.l $7E0011,x LDA.w #$0000 STA.l $7E0045,x RTSOur readingresult 2 - all the damage goes back to the target's HP, and the damage shown is 081952–81960Checked by claude, 2026-11-08 — read the guard's side test, its two judgments and both outcomes, and worked the entry numbers back to frames: entry k of 64 is 63 - k frames before the last one writtenRevised after a check by a second AI model, 2026-11-08.

Entry 63 is the last frame recorded and entry 0 the one 63 before it; neither is counted, so a press on those frames neither guards nor spoils a guard. The branch for a target flagged in its record (L81918-L81950) sets HP from another field instead of adding back.

An attack's damage is its power less the target's defense, at least 1 unless the power is 0, and at most 9999. An ordinary attack's power is the attacker's Attack, against the target's Defense. A special's is the caster's Magic Attack plus the special's own power, against Magic Defense, except that the four specials that restore HP (Therapy, Group Hug, HP Rain and Come Back) take no defense off (computed). An item's is its own power, with no defense taken off and no multiplier. A party member's ordinary attack first moves its Attack by a random amount: from Attack less the weapon's variance (0 if that is negative) up by 0 to twice the variance. A monster's ordinary attack has no variance; its power, a number from 0 to 7, picks a multiplier applied after the subtraction: ×1, ×1.5 (the half rounded down), ×2, ×4, ×8, ×16, ×32 or ×64. A monster's magic attack uses its Magic Attack plus that number against Magic Defense, and deals 0 when the number is 0. The halving and ×1.5 steps (super-mario-rpg/damage-status-steps) and the elements, which can make the damage 0 (super-mario-rpg/damage-elements), follow, then the 9999 cap. Three kinds of attack skip the formula (super-mario-rpg/damage-skips). A timed hit's extra comes after all of this, from the damage as applied, and has no cap of its own (super-mario-rpg/timed-hit). super-mario-rpg/damage-formula

About: Super Mario RPG Damage formula

Value: physical Attack ± weapon variance − Defense, ≥ 1 · special Magic Attack + power − Magic Defense, ≥ 1 · item item power · cap 9999

CodeSuper-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80864-L80963CODE_C2C1F4: LDA.b $F8 BPL.b CODE_C2C1FE LDY.w #$0000 STY.b $C2 RTS CODE_C2C1FE: LDA.b $F9 BIT.b #$28 BEQ.b CODE_C2C211 LDA.b $CC BEQ.b CODE_C2C20E …Our readingthe three kinds that skip the formula (super-mario-rpg/damage-skips)80865–80908load power and defense80911first flags 0x02: skip the subtraction80912–80914second flags 0x40, which only a party member's ordinary attack sets: power less the variance, 0 if negative, plus a draw from 0 to twice the variance80915–80937a nonzero power less the defense, raised to 1 if 0 or below80940–80950the multiplier, the status steps and the elements80954–80956cap at 9999 (0x270F)80958–80962Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80967-L81017CODE_C2C2AA: LDX.b $CA LDA.b $F8 BIT.b #$01 BNE.b CODE_C2C2C0 LDA.l $7E0078,x STA.b $C4 LDA.l $7E0079,x STA.b $C5 BRA.b CODE_C2C2CC CODE_C2C2C0: LDA.l $7E0074,x …Our readingdefense: Magic Defense (record word 0x78), or Defense (0x74) when first flags 0x01 (physical)80968–80982power: the attacker's Attack (0x72) when first flags 0x0181012–81016otherwise 0 if the power byte is 0, the power word itself when first flags 0x04, else Magic Attack (0x76) plus the power80988–81009Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L81019-L81118CODE_C2C308: LDA.b $F9 BPL.b CODE_C2C30D RTS CODE_C2C30D: LDA.b #$00 XBA LDA.b $FB AND.b #$07 ASL TAX JMP.w (DATA_C2C319,x) …Our readingonly when second flags 0x80 is clear81020–81022the power's low three bits pick ×1, ×1.5 (the half rounded down, added), ×2, ×4, ×8, ×16, ×32 or ×6481025–81116Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80204-L80227CODE_C2BCCA: SEP.b #$20 LDX.w $0750 STX.b $C8 JSR.w CODE_C2B30A STA.b $CF LDX.w #$072E STX.b $C6 LDA.w $072C STA.b $CD JSR.w CODE_C2BD55 JMP.w CODE_C2BE53 …Our readingan ordinary attack: the acting battler (0x0750) is the attacker, and whether it is a party member is kept (0xCF)80205–80209then the ordinary attack's set-up80214a special: the same, then the special's set-up80218–80227Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L78807-L78819CODE_C2B30A: REP.b #$20 TXA CMP.l DATA_C2A1F0 BPL.b CODE_C2B319 LDA.w #$0001 SEP.b #$20 RTS CODE_C2B319: LDA.w #$0000 SEP.b #$20 RTSOur readinga battler below the first monster slot is a party member (1)78809–78818Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L76490-L76494DATA_C2A1EA: dw $FA80,$FB00,$FB80 DATA_C2A1F0: dw $FC00,$FC80,$FD00,$FD80,$FE00,$FE80,$FF00,$FF80Our readingthe three party slots sit below the eight monster slots, the first at 0xFC0076490–76494Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80282-L80334CODE_C2BD55: LDY.w #$0001 STY.b $F8 LDA.b $CF BNE.b CODE_C2BD9F LDA.b $CD LDX.w #$0002 LDY.w #$00E0 JSR.w CODE_C2B3CA LDA.b $E0 ASL AND.b #$C0 …Our readingan ordinary attack is physical (first flags 0x01)80283–80284a monster's (the attacker not a party member): its attack's four bytes from the monster attack table80285–80290bits 5 and 6 of its first byte become first flags 0x40 and 0x80 (0x80: no damage)80291–80295bit 4 clears first flags 0x01, making it a magic attack80296–80300bit 3 sets first flags 0x20 and second flags 0x20 (knock-out)80302–80307its hit rate is the second byte, its power the low three bits of the first80309–80313a party member's: second flags 0x40 (variance), hit rate 99, power 0, the weapon's element80323–80331Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80336-L80368CODE_C2BDB7: LDA.b $CD LDX.w #$0006 LDY.w #$00E0 JSR.w CODE_C2B3CA LDA.b $E0 AND.b #$23 STA.b $F8 LDA.b $EB BIT.b #$04 BEQ.b CODE_C2BDD2 LDA.b #$40 …Our readinga special: its twelve bytes from the specials table80337–80340first flags from byte 0 (bits 0x01, 0x02 and 0x20), second flags from byte 1 with 0x80 set (so no multiplier)80341–80352hit rate byte 6, power byte 5, element byte 480353–80358Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80383-L80413CODE_C2BE18: LDA.b $CD STA.w $072C STZ.w $072D LDA.b #$06 STA.b $F8 LDA.b $F1 BIT.b #$04 BEQ.b CODE_C2BE2E LDA.b #$40 TSB.b $F8 CODE_C2BE2E: …Our readingan item: first flags 0x06 (no subtraction; the power word itself)80386–80388second flags with 0x80 set, hit rate 100, power byte 15 into the low byte only, element byte 480395–80404Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L79811-L79836LDA.l $7E001C,x CMP.b #$FF BNE.b CODE_C2B9C7 LDA.l $7E0001,x CODE_C2B9C7: STA.l $7E002E,x STA.b $FA LDX.w #$0010 LDY.w #$00E0 JSR.w CODE_C2B3CA LDX.b $F8 REP.b #$20 …Our readingthe weapon (record place 0x1C), or, when that place holds 0xFF (none), the number in record place 0x01, is the item looked up79811–79820the weapon's byte 14 becomes the attacker's variance (record 0x7A)79831–79836Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L78761-L78787CODE_C2B2C6: PHX PHY STA.b $44 LDA.b $40 AND.w #$FF00 ORA.w #$0001 STA.b $40 JSL.l CODE_C00000 LDA.b $46 PLY PLX …Our readinga draw below a range, through the game's random routine78761–78773a draw from the low bound to the high one, inclusive (LDA.w #$EB00 is the bytes A9 00 EB: in 8-bit mode LDA #$00, then XBA)78776–78787Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L81370-L81403CODE_C2C55E: REP.b #$20 LDX.b $CA LDA.b $F9 BIT.w #$0001 BNE.b CODE_C2C583 LDA.l $7E0011,x STA.l $7E0035,x SEC SBC.b $C2 BPL.b CODE_C2C579 LDA.w #$0000 …Our readingthe damage comes off the target's HP, stopping at 0, or a heal (second flags 0x01) adds to it up to the maximum81372–81401the amount is kept for the display, the record word the timed hit adds to81403Each of the 27 specials has a fixed FP cost, power, hit rate, element and statuses. Jump costs 3 FP at power 25 and Ultra Flame 14 at 60; Bowser Crush and Geno Flash cost the most, 16, and Psychopath the least, 1. A damaging special's damage is the caster's Magic Attack plus its power against Magic Defense (super-mario-rpg/damage-formula). Sleepy Time and Mute have a hit rate of 99 and Terrorize and Poison Gas 90; the rest have 100. Jump, Super Jump and Ultra Jump carry the Jump element, Fire Orb, Super Flame and Ultra Flame Fire, Thunderbolt and Shocker Thunder, and Snowy Ice. The list of the acting character's specials halves each cost, rounded up, while the Scrooge Ring is worn, and marks a special unusable when its cost is more than the battle's FP; the cost as listed comes off that FP when the special is picked. Code — computed from the specials table quoted there: byte 0 of Therapy, Group Hug and HP Rain is 0x82 and of Come Back 0x02, the four rows whose byte 1 has the heal bit 0x01; no other row's byte 0 has 0x02A character reaches level 2 at 16 experience in all, level 10 at 700, level 20 at 3950 and level 30 at 9999, where experience stops: a character already at 9999 gets none, and a total past it is cut back to 9999. After a battle, unless a flag that skips the award is set, each party member gets the battle's experience whole, doubled for one wearing the Exp. Booster, and goes up every level the new total reaches, several at once if it reaches several. Code — equip slot 12 holds the weapon, record place 0x1C, as the accessory's slot 14 is 0x1EAn attack that runs the battle's damage step is judged as a timed hit as its damage is applied, from a record of the buttons first pressed on each frame, counted from the record's last clearing, the first frame recorded after it being frame 0 (a battle-script command clears it, and so does each judgment). Exactly one frame with a press of A, B, X or Y between the attacker's outer bounds doubles the damage if it falls between its inner bounds, and adds half otherwise; no such frame, or two or more, adds nothing, so pressing again on a later frame spoils a good press (buttons pressed together on one frame count once). The extra is shown with the damage and taken from the target's HP too. The bounds are frame counts per weapon (super-mario-rpg-tables/weapon-timing): the Hammer's inner bounds take a press 14 to 20 frames in, 7 frames (computed), and its outer bounds 8 to 38; the outer end is cut back to the number of frames recorded so far. Code — the timed hit's damage step adds half or all of the kept amount again, after this routineThe monster table gives each of 256 monster numbers its HP, Attack, Defense, Magic Attack and Magic Defense, and the battle names it from a list of 13-letter names by the same number; 17 numbers have a blank name. HP runs up to 8000 (Smithy), Attack to 250 (Smithy and Culex), Defense to 200 (the Wind Crystal), Magic Attack to 130 (the Fire Crystal and Smithy) and Magic Defense to 180 (the Mad Adder). Each number points to 16 bytes, which the battle copies into the monster's battle record: the first two are its HP, which it starts the battle with, and bytes 3 to 6 fill the places where a party member's record holds Attack, Defense, Magic Attack and Magic Defense. Code — record places 0x16-0x19 hold Attack, Defense, Magic Attack and Magic Defense; the battle copies them to the words at 0x72-0x78Checked by claude, 2026-11-08 — read the damage routine, the power and defense loads, the multiplier table, the attacker and slot tests, the three attack set-ups, the weapon and variance load and the random-range routine at the pinned linesRevised after a check by a second AI model, 2026-11-08.

The flags are two bytes the attack's set-up fills: the first flags (0xF8) and the second flags (0xF9). The item set-up writes only the power's low byte (0xFB), and the power is read as a word with the next byte (0xFC) as its high byte, so an item deals its own power only while that byte is 0; what it holds then is not read here. The monster set-up's first flags 0x40 (from bit 5 of the attack's first byte) is a different bit from the variance's second flags 0x40. The 9999 cap compares the damage's low 16 bits as a signed number, so a value of 42,768 or more would pass it (computed). Only a monster's attack has a multiplier above ×1, and its Attack and Magic Attack are single bytes, so before the status steps it is at most (255 + 7) × 64 = 16,768, and 25,152 after the ×1.5 step (computed): under the edge against a party member. Against a monster weak to the element, doubled, it could reach 50,304 (computed); whether a monster's attack can hit a monster is not read here.

Three kinds of attack skip the damage formula (super-mario-rpg/damage-formula). One marked to deal nothing deals 0. One marked to knock out deals 9999 when it hits; it is of two kinds, and on a miss one does nothing while the other goes through the formula after all (super-mario-rpg/hit-chance). One marked to take a share deals its power in sixteenths of the target's current HP, rounded down, or, if it heals, restores that many sixteenths of the target's maximum HP, rounded down; only the 9999 cap applies after it, and it holds while the share stays under 42,768 (computed). A monster attack's knock-out bit gives the kind that does nothing on a miss; none of the party's 27 specials carries either of the other two marks (computed, super-mario-rpg-tables/specials), and which attacks do is not read here. super-mario-rpg/damage-skips

About: Super Mario RPG Damage formula

Value: knock out 9999 · share power × HP ÷ 16, rounded down

CodeSuper-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80864-L80911CODE_C2C1F4: LDA.b $F8 BPL.b CODE_C2C1FE LDY.w #$0000 STY.b $C2 RTS CODE_C2C1FE: LDA.b $F9 BIT.b #$28 BEQ.b CODE_C2C211 LDA.b $CC BEQ.b CODE_C2C20E …Our readingfirst flags 0x80: damage 080865–80869second flags 0x08 or 0x20: on a hit (0xCC not 0) 9999, on a miss the ordinary formula80872–80882second flags 0x10: current HP, or maximum HP when second flags 0x01, times the power, then four halvings; then straight to the cap80885–80908the ordinary formula80910–80911Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L78833-L78869CODE_C2B32E: STA.b $DF LSR.b $DF BEQ.b CODE_C2B33E CODE_C2B334: LSR.b $02,x ROR.b $01,x ROR.b $00,x LSR.b $DF BCC.b CODE_C2B334 CODE_C2B33E: RTS …Our readinga three-byte value shifted right once for each halving, the count given as a single bit (0x10: four), so the remainder is dropped78833–78844the 16-bit HP times the power byte, into three bytes78846–78869Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80957-L80963CODE_C2C29C: REP.b #$20 LDA.w #$270F CMP.b $C2 BPL.b CODE_C2C2A7 STA.b $C2 CODE_C2C2A7:Our readingthe cap at 9999 (0x270F)80957–80962Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80415-L80466CODE_C2BE53: LDY.b $C6 INY INY LDX.b $00,y BNE.b CODE_C2BE5E JMP.w CODE_C2BEFF CODE_C2BE5E: STY.b $C6 STX.b $CA JSR.w CODE_C2B30A STA.b $CE …Our readingthe next target in the list, or the end when there is none80416–80421the hit draw's result is kept (0xCC)80441–80442a miss goes to the next target, doing nothing to this one, unless second flags 0x0880443–80446unless the attack heals (second flags 0x01), a target with status bit 0x80 or boost bit 0x01 is skipped80456–80464then the damage routine, on a hit or a 0x08 miss80466Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80302-L80307LDA.b $E0 BIT.b #$08 BEQ.b CODE_C2BD88 LDA.b #$20 TSB.b $F8 TSB.b $F9Our readinga monster attack's bit 3 sets first flags 0x20 and second flags 0x2080302–80307An attack's damage is its power less the target's defense, at least 1 unless the power is 0, and at most 9999. An ordinary attack's power is the attacker's Attack, against the target's Defense. A special's is the caster's Magic Attack plus the special's own power, against Magic Defense, except that the four specials that restore HP (Therapy, Group Hug, HP Rain and Come Back) take no defense off (computed). An item's is its own power, with no defense taken off and no multiplier. A party member's ordinary attack first moves its Attack by a random amount: from Attack less the weapon's variance (0 if that is negative) up by 0 to twice the variance. A monster's ordinary attack has no variance; its power, a number from 0 to 7, picks a multiplier applied after the subtraction: ×1, ×1.5 (the half rounded down), ×2, ×4, ×8, ×16, ×32 or ×64. A monster's magic attack uses its Magic Attack plus that number against Magic Defense, and deals 0 when the number is 0. The halving and ×1.5 steps (super-mario-rpg/damage-status-steps) and the elements, which can make the damage 0 (super-mario-rpg/damage-elements), follow, then the 9999 cap. Three kinds of attack skip the formula (super-mario-rpg/damage-skips). A timed hit's extra comes after all of this, from the damage as applied, and has no cap of its own (super-mario-rpg/timed-hit). Code — applying the damage takes it off record word 0x11, and a heal stops at record word 0x13: current and maximum HPEach of the 27 specials has a fixed FP cost, power, hit rate, element and statuses. Jump costs 3 FP at power 25 and Ultra Flame 14 at 60; Bowser Crush and Geno Flash cost the most, 16, and Psychopath the least, 1. A damaging special's damage is the caster's Magic Attack plus its power against Magic Defense (super-mario-rpg/damage-formula). Sleepy Time and Mute have a hit rate of 99 and Terrorize and Poison Gas 90; the rest have 100. Jump, Super Jump and Ultra Jump carry the Jump element, Fire Orb, Super Flame and Ultra Flame Fire, Thunderbolt and Shocker Thunder, and Snowy Ice. The list of the acting character's specials halves each cost, rounded up, while the Scrooge Ring is worn, and marks a special unusable when its cost is more than the battle's FP; the cost as listed comes off that FP when the special is picked. Code — computed from the table quoted there: byte 1 of the 27 rows holds only 0x00, 0x01, 0x02 and 0x05, so none has 0x08, 0x10 or 0x20An attack with a hit rate of 100 always hits. Otherwise an attack marked to test the knock-out guard, as a monster attack's knock-out bit marks it, misses a target with that guard, which the Safety Ring, the Attack Scarf, the Jinx Belt and the Quartz Charm give from the start of a battle. Against a monster, a draw from 0 to 99 below its evade (or its magic evade, for an attack that isn't physical) is a miss; then, against any target, a draw from 0 to 99 below the hit rate is a hit. A party member's ordinary attack has a hit rate of 99, so it hits a monster with no evade 99 times in 100 (computed); against a party member only the hit rate is drawn. A miss does nothing to that target, except by the knock-out kind that falls back to the damage formula on a miss (super-mario-rpg/damage-skips). Code — the hit draw, and the knock-out guard that turns a knock-out attack into a missChecked by claude, 2026-11-08 — read the damage routine's first branches, the multiply and shift routines, the cap, the next-target and miss paths up to the damage call, and the monster attack's knock-out bit at the pinned linesRevised after a check by a second AI model, 2026-11-08.

The marks are bits of the attack's flags: no damage is the first flags' 0x80; the knock-out kinds are the second flags' 0x20 (no fallback) and 0x08 (falls back to the formula on a miss); the share is the second flags' 0x10, and a heal the second flags' 0x01. The share is built in three bytes, but the cap compares only the low two, as a signed number: a share of 42,768 to 65,535 passes it uncapped, and one of 65,536 or more loses its third byte (computed). Record words 0x11 and 0x13 are the target's current and maximum HP. Before the damage routine, any attack but a heal skips a target with status bit 0x80 or boost bit 0x01; what those bits are is not read here (knocking out sets boost bit 0x80).

After the subtraction and multiplier, damage that isn't a heal is halved once (rounded down, but not below 1) if any of these holds: the attacker has the status Terrorize inflicts (bit 0x08) or status bit 0x20 (one of the two the Trueform Pin guards against); the target has status bit 0x20; the target's boost bit 0x04 is set (what sets it is not read); or the target has the boost that halves that type of attack, bit 0x40 for ordinary attacks and 0x20 for specials and items (the two bits the Bracer, the Crystalline and the Ghost Medal give). It is then raised by half once (×1.5, the half rounded down) if the target has Terrorize's status, or the attacker has the boost for its type, bit 0x10 for ordinary attacks and 0x08 for others (the two bits Geno Boost, the Energizer, the Power Blast and the Troopa Pin give). A heal skips both steps. An ordinary attack on a target with the status Sleepy Time inflicts (bit 0x02) wakes it, clearing its statuses. super-mario-rpg/damage-status-steps

About: Super Mario RPG Damage formula

Value: halve attacker feared or 0x20; target 0x20, boost 0x04, or defense boost · raise ×1.5: target feared, or attacker's attack boost

CodeSuper-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L81119-L81199CODE_C2C382: LDA.b $F9 BIT.b #$01 BEQ.b CODE_C2C389 RTS CODE_C2C389: LDX.b $C8 LDA.l $7E0040,x BIT.b #$28 BNE.b CODE_C2C3BD LDX.b $CA LDA.l $7E0040,x …Our readinga heal (bit 0x01 of the second flags) skips this81120–81123halve if the attacker's status has 0x08 or 0x2081126–81129or the target's status has 0x20, or its boosts 0x0481130–81136or, for a physical attack, the target's boost 0x40; for any other, 0x2081137–81148halving: a nonzero value shifted right, raised to 1 if that gives 081150–81157×1.5 if the target's status has 0x0881160–81163or, for a physical attack, the attacker's boost 0x10; for any other, 0x0881164–81176×1.5: the value plus half of it81178–81183a physical attack on a target whose status has 0x02 clears its status81186–81198Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L81266-L81291CODE_C2C48B: LDX.b $CA LDA.b $FE BEQ.b CODE_C2C4C0 EOR.l $7E004E,x AND.b $FE BEQ.b CODE_C2C4C0 CMP.l $7E0040,x BCC.b CODE_C2C4C0 STA.l $7E0040,x LDA.l $7E0041,x AND.b #$FB …Our readingan attack's statuses, less those the target is immune to, replace the target's when they are at least its current status byte81267–81275its boost bits (0x78 of the next byte) are added to the target's boosts81285–81290Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L79934-L79947CODE_C2BAE8: LDA.b $E1 BIT.b #$01 BEQ.b CODE_C2BAF8 LDA.l $7E004E,x ORA.b $E7 STA.l $7E004E,x CODE_C2BAF8: LDA.b $E1 BIT.b #$02 BEQ.b CODE_C2BB08 LDA.l $7E004F,x …Our readingequipment flagged in byte 1 adds its byte 7 to the party member's status immunities (0x01) and its byte 8 to its starting boosts (0x02)79935–79947An attack with a hit rate of 100 always hits. Otherwise an attack marked to test the knock-out guard, as a monster attack's knock-out bit marks it, misses a target with that guard, which the Safety Ring, the Attack Scarf, the Jinx Belt and the Quartz Charm give from the start of a battle. Against a monster, a draw from 0 to 99 below its evade (or its magic evade, for an attack that isn't physical) is a miss; then, against any target, a draw from 0 to 99 below the hit rate is a hit. A party member's ordinary attack has a hit rate of 99, so it hits a monster with no evade 99 times in 100 (computed); against a party member only the hit rate is drawn. A miss does nothing to that target, except by the knock-out kind that falls back to the damage formula on a miss (super-mario-rpg/damage-skips). Code — the starting boosts become the battle's boostsEach of the 27 specials has a fixed FP cost, power, hit rate, element and statuses. Jump costs 3 FP at power 25 and Ultra Flame 14 at 60; Bowser Crush and Geno Flash cost the most, 16, and Psychopath the least, 1. A damaging special's damage is the caster's Magic Attack plus its power against Magic Defense (super-mario-rpg/damage-formula). Sleepy Time and Mute have a hit rate of 99 and Terrorize and Poison Gas 90; the rest have 100. Jump, Super Jump and Ultra Jump carry the Jump element, Fire Orb, Super Flame and Ultra Flame Fire, Thunderbolt and Shocker Thunder, and Snowy Ice. The list of the acting character's specials halves each cost, rounded up, while the Scrooge Ring is worn, and marks a special unusable when its cost is more than the battle's FP; the cost as listed comes off that FP when the special is picked. Code — Sleepy Time's status byte is 0x02, Terrorize's 0x08; Geno Boost's boost byte is 0x18Each weapon, armor and accessory adds fixed amounts, possibly negative, to five stats while worn: Speed (the stat the battle sorts its battlers by, highest first), Attack, Defense, Magic Attack and Magic Defense. It may also nullify or resist elements, guard against statuses, and give boosts from the start of each battle, and one flag per character (Mario, Toadstool, Bowser, Geno and Mallow) says who can wear it. Weapons give only Attack and a variance (super-mario-rpg/damage-formula); the Lazy Shell and the Frying Pan give the most Attack, 90, with variances of 40 and 20. The Lazy Shell armor gives the most Defense and Magic Defense, 127, and takes 50 from Speed, Attack and Magic Attack. Every character can wear the Work Pants, the Super Suit, the Lazy Shell armor and all accessories but four: the Jump Shoes, the Attack Scarf and the Coin Trick are Mario's alone and the B~tub Ring is Toadstool's. The Super Suit, the Lazy Shell armor and the Safety Ring nullify all four elements, and the Amulet and the B~tub Ring resist them. Code — the Trueform Pin guards against statuses 0x60; the Ghost Medal gives boosts 0x60 and the Troopa Pin 0x18; the Bracer and Crystalline give 0x60, the Energizer and Power Blast 0x18Checked by claude, 2026-11-08 — read the halving and raising steps and the status and boost writer at the pinned linesChecked by a second AI model, 2026-11-08.

An attack with an element (Jump, Fire, Thunder or Ice) deals 0 to a target that nullifies all its elements, except that Mario's Jump-element attacks keep their damage while he wears the Jump Shoes. Otherwise a party member who resists all its elements takes half (rounded down, but not below 1), and a monster weak to all of them takes ×2. A party member's nullified and resisted elements are those of its equipment combined (the Super Suit, the Lazy Shell armor and the Safety Ring nullify all four; the Amulet and the B'tub Ring resist all four); a monster's are its own (super-mario-rpg-tables/monster-defenses). The element step runs after the status steps (super-mario-rpg/damage-formula). A party member's ordinary attack carries its equipment's attack element, which none of the 86 pieces of equipment has (computed). super-mario-rpg/damage-elements

About: Super Mario RPG Elemental weakness

Value: nullify 0 · resist ÷2 (party) · weak ×2 (monsters)

CodeSuper-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L81202-L81263CODE_C2C422: LDA.b $FD BNE.b CODE_C2C427 RTS CODE_C2C427: LDX.b $CA LDA.b $CE BNE.b CODE_C2C433 LDA.b $FD STA.l $7E006A,x CODE_C2C433: LDA.l $7E004C,x …Our readingno element, no change81203–81205every element bit of the attack (Jump 0x80, Fire 0x40, Thunder 0x20, Ice 0x10) among the target's nullified ones81214–81217unless a party member (0xCF set) attacks with Jump (0x80) wearing accessory 0x4C81218–81227damage 081230–81231a party target (0xCE set) resisting every element bit: half, raised to 1 if that gives 081235–81248a monster weak to every element bit: double81254–81261Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L79914-L79927CODE_C2BAAF: CLC ADC.l $7E0078,x STA.l $7E0078,x SEP.b #$20 LDA.l $7E004B,x ORA.b $E4 STA.l $7E004B,x LDA.l $7E004C,x ORA.b $E5 STA.l $7E004C,x LDA.l $7E004D,x …Our readingeach piece of equipment adds its bytes 4, 5 and 6 (attack element, nullified, resisted) to the party member's79917–79927Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L74845-L74857LDA.b #$00 STA.l $7E0071,x STA.l $7E0073,x STA.l $7E0075,x STA.l $7E0077,x STA.l $7E0079,x STA.l $7E004B,x LDA.l $7E001F,x STA.l $7E004C,x LDA.l $7E0020,x STA.l $7E004D,x LDA.l $7E0021,x …Our readinga monster starts with no attack element, and takes bytes 12, 13 and 14 as nullified elements, weaknesses and status immunities74845–74857Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80329-L80331LDX.b $C8 LDA.l $7E004B,x STA.b $FDOur readinga party member's ordinary attack takes its attack element80329–80331Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L79780-L79808CODE_C2B94C: PHP SEP.b #$20 STX.b $F8 LDA.l $7E0015,x STA.l $7E0070,x LDA.l $7E0016,x STA.l $7E0072,x LDA.l $7E0017,x STA.l $7E0074,x LDA.l $7E0018,x STA.l $7E0076,x …Our readingat the battle's start the party member's attack element, nullified and resisted elements, immunities and starting boosts are cleared, before the equipment adds its own79804–79808Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80204-L80209CODE_C2BCCA: SEP.b #$20 LDX.w $0750 STX.b $C8 JSR.w CODE_C2B30A STA.b $CFOur readingthe acting battler (0x0750) is the attacker (0xC8), and whether it is a party member is kept (0xCF)80205–80209Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80423-L80427CODE_C2BE5E: STY.b $C6 STX.b $CA JSR.w CODE_C2B30A STA.b $CEOur readingthe target is kept (0xCA), and whether it is a party member (0xCE)80425–80427Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L78807-L78819CODE_C2B30A: REP.b #$20 TXA CMP.l DATA_C2A1F0 BPL.b CODE_C2B319 LDA.w #$0001 SEP.b #$20 RTS CODE_C2B319: LDA.w #$0000 SEP.b #$20 RTSOur readinga battler below the first monster slot is a party member (1)78809–78818Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L76490-L76494DATA_C2A1EA: dw $FA80,$FB00,$FB80 DATA_C2A1F0: dw $FC00,$FC80,$FD00,$FD80,$FE00,$FE80,$FF00,$FF80Our readingthe three party slots sit below the eight monster slots, the first at 0xFC0076490–76494Each of the 27 specials has a fixed FP cost, power, hit rate, element and statuses. Jump costs 3 FP at power 25 and Ultra Flame 14 at 60; Bowser Crush and Geno Flash cost the most, 16, and Psychopath the least, 1. A damaging special's damage is the caster's Magic Attack plus its power against Magic Defense (super-mario-rpg/damage-formula). Sleepy Time and Mute have a hit rate of 99 and Terrorize and Poison Gas 90; the rest have 100. Jump, Super Jump and Ultra Jump carry the Jump element, Fire Orb, Super Flame and Ultra Flame Fire, Thunderbolt and Shocker Thunder, and Snowy Ice. The list of the acting character's specials halves each cost, rounded up, while the Scrooge Ring is worn, and marks a special unusable when its cost is more than the battle's FP; the cost as listed comes off that FP when the special is picked. Code — the element bytes of Jump (0x80), Fire Orb (0x40), Thunderbolt (0x20) and Snowy (0x10)Each weapon, armor and accessory adds fixed amounts, possibly negative, to five stats while worn: Speed (the stat the battle sorts its battlers by, highest first), Attack, Defense, Magic Attack and Magic Defense. It may also nullify or resist elements, guard against statuses, and give boosts from the start of each battle, and one flag per character (Mario, Toadstool, Bowser, Geno and Mallow) says who can wear it. Weapons give only Attack and a variance (super-mario-rpg/damage-formula); the Lazy Shell and the Frying Pan give the most Attack, 90, with variances of 40 and 20. The Lazy Shell armor gives the most Defense and Magic Defense, 127, and takes 50 from Speed, Attack and Magic Attack. Every character can wear the Work Pants, the Super Suit, the Lazy Shell armor and all accessories but four: the Jump Shoes, the Attack Scarf and the Coin Trick are Mario's alone and the B~tub Ring is Toadstool's. The Super Suit, the Lazy Shell armor and the Safety Ring nullify all four elements, and the Amulet and the B~tub Ring resist them. Code — bytes 4-6 of each piece of equipment, byte 4 (the attack element) 0 in all 86 rows (computed from the table quoted there); item 0x4C is the Jump Shoes, Mario's aloneA character reaches level 2 at 16 experience in all, level 10 at 700, level 20 at 3950 and level 30 at 9999, where experience stops: a character already at 9999 gets none, and a total past it is cut back to 9999. After a battle, unless a flag that skips the award is set, each party member gets the battle's experience whole, doubled for one wearing the Exp. Booster, and goes up every level the new total reaches, several at once if it reaches several. Code — the accessory sits in record place 0x1E (slot 14)Checked by claude, 2026-11-08 — read the element step, the equipment sums, the attacker, target and slot tests, and the monster set-up at the pinned linesRevised after a check by a second AI model, 2026-11-08.

An attack with a hit rate of 100 always hits. Otherwise an attack marked to test the knock-out guard, as a monster attack's knock-out bit marks it, misses a target with that guard, which the Safety Ring, the Attack Scarf, the Jinx Belt and the Quartz Charm give from the start of a battle. Against a monster, a draw from 0 to 99 below its evade (or its magic evade, for an attack that isn't physical) is a miss; then, against any target, a draw from 0 to 99 below the hit rate is a hit. A party member's ordinary attack has a hit rate of 99, so it hits a monster with no evade 99 times in 100 (computed); against a party member only the hit rate is drawn. A miss does nothing to that target, except by the knock-out kind that falls back to the damage formula on a miss (super-mario-rpg/damage-skips). super-mario-rpg/hit-chance

About: Super Mario RPG Hit chance

Value: ordinary attack hit rate 99 · always 100

CodeSuper-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80810-L80862CODE_C2C19E: LDX.b $CA LDA.b $FA CMP.b #$64 BNE.b CODE_C2C1A9 LDA.b #$01 RTS CODE_C2C1A9: LDA.b $F8 BIT.b #$20 BEQ.b CODE_C2C1BA LDA.l $7E0041,x …Our readinghit rate 100: a hit80812–80816first flags 0x20 against a target with boost 0x02 (the knock-out guard): a miss80819–80826a monster target (0xCE clear): a draw below its evade (record 0x1B, physical) or magic evade (0x1C) misses80829–80846then a draw below the hit rate hits80849–80853a party target (0xCE set): only the hit-rate draw80857–80861Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L78789-L78805CODE_C2B2F2: LDA.b $DB XBA LDA.b #$00 XBA REP.b #$20 INC JSR.w CODE_C2B2C6 SEP.b #$20 CMP.b $DA BMI.b CODE_C2B307 LDA.b #$00 …Our readinga draw from 0 to the bound given (99 here), true when it is below the value78790–78804Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80440-L80451CODE_C2BE8B: JSR.w CODE_C2C19E STA.b $CC BNE.b CODE_C2BEA4 LDA.b $F9 BIT.b #$08 BEQ.b CODE_C2BE53 LDX.b $CA LDA.l $7E0044,x AND.b #$BF STA.l $7E0044,x CODE_C2BEA4:Our readingthe hit draw80441–80442a miss goes to the next target, unless second flags 0x0880443–80446Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L79928-L79933LDA.b $E0 BIT.b #$80 BEQ.b CODE_C2BAE8 LDA.l $7E004F,x ORA.b #$02 STA.l $7E004F,xOur readingequipment whose first byte has 0x80 sets boost 0x02 in the party member's starting boosts79928–79933Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L79853-L79855CODE_C2BA2A: LDA.l $7E004F,x STA.l $7E0041,xOur readingthe starting boosts become the battle's boosts79854–79855Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L80423-L80427CODE_C2BE5E: STY.b $C6 STX.b $CA JSR.w CODE_C2B30A STA.b $CEOur readingthe target is kept (0xCA), and whether it is a party member (0xCE)80425–80427Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L78807-L78819CODE_C2B30A: REP.b #$20 TXA CMP.l DATA_C2A1F0 BPL.b CODE_C2B319 LDA.w #$0001 SEP.b #$20 RTS CODE_C2B319: LDA.w #$0000 SEP.b #$20 RTSOur readinga battler below the first monster slot is a party member (1)78809–78818Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L76490-L76494DATA_C2A1EA: dw $FA80,$FB00,$FB80 DATA_C2A1F0: dw $FC00,$FC80,$FD00,$FD80,$FE00,$FE80,$FF00,$FF80Our readingthe three party slots sit below the eight monster slots, the first at 0xFC0076490–76494An attack's damage is its power less the target's defense, at least 1 unless the power is 0, and at most 9999. An ordinary attack's power is the attacker's Attack, against the target's Defense. A special's is the caster's Magic Attack plus the special's own power, against Magic Defense, except that the four specials that restore HP (Therapy, Group Hug, HP Rain and Come Back) take no defense off (computed). An item's is its own power, with no defense taken off and no multiplier. A party member's ordinary attack first moves its Attack by a random amount: from Attack less the weapon's variance (0 if that is negative) up by 0 to twice the variance. A monster's ordinary attack has no variance; its power, a number from 0 to 7, picks a multiplier applied after the subtraction: ×1, ×1.5 (the half rounded down), ×2, ×4, ×8, ×16, ×32 or ×64. A monster's magic attack uses its Magic Attack plus that number against Magic Defense, and deals 0 when the number is 0. The halving and ×1.5 steps (super-mario-rpg/damage-status-steps) and the elements, which can make the damage 0 (super-mario-rpg/damage-elements), follow, then the 9999 cap. Three kinds of attack skip the formula (super-mario-rpg/damage-skips). A timed hit's extra comes after all of this, from the damage as applied, and has no cap of its own (super-mario-rpg/timed-hit). Code — the ordinary attack's hit rate (99), and a monster attack's knock-out bit setting first flags 0x20Three kinds of attack skip the damage formula (super-mario-rpg/damage-formula). One marked to deal nothing deals 0. One marked to knock out deals 9999 when it hits; it is of two kinds, and on a miss one does nothing while the other goes through the formula after all (super-mario-rpg/hit-chance). One marked to take a share deals its power in sixteenths of the target's current HP, rounded down, or, if it heals, restores that many sixteenths of the target's maximum HP, rounded down; only the 9999 cap applies after it, and it holds while the share stays under 42,768 (computed). A monster attack's knock-out bit gives the kind that does nothing on a miss; none of the party's 27 specials carries either of the other two marks (computed, super-mario-rpg-tables/specials), and which attacks do is not read here. Code — the knock-out kind marked second flags 0x08 falls back to the formula on a missEach weapon, armor and accessory adds fixed amounts, possibly negative, to five stats while worn: Speed (the stat the battle sorts its battlers by, highest first), Attack, Defense, Magic Attack and Magic Defense. It may also nullify or resist elements, guard against statuses, and give boosts from the start of each battle, and one flag per character (Mario, Toadstool, Bowser, Geno and Mallow) says who can wear it. Weapons give only Attack and a variance (super-mario-rpg/damage-formula); the Lazy Shell and the Frying Pan give the most Attack, 90, with variances of 40 and 20. The Lazy Shell armor gives the most Defense and Magic Defense, 127, and takes 50 from Speed, Attack and Magic Attack. Every character can wear the Work Pants, the Super Suit, the Lazy Shell armor and all accessories but four: the Jump Shoes, the Attack Scarf and the Coin Trick are Mario's alone and the B~tub Ring is Toadstool's. The Super Suit, the Lazy Shell armor and the Safety Ring nullify all four elements, and the Amulet and the B~tub Ring resist them. Code — the Safety Ring, Attack Scarf, Jinx Belt and Quartz Charm are the four items whose first byte has 0x80The monster table gives each of 256 monster numbers its HP, Attack, Defense, Magic Attack and Magic Defense, and the battle names it from a list of 13-letter names by the same number; 17 numbers have a blank name. HP runs up to 8000 (Smithy), Attack to 250 (Smithy and Culex), Defense to 200 (the Wind Crystal), Magic Attack to 130 (the Fire Crystal and Smithy) and Magic Defense to 180 (the Mad Adder). Each number points to 16 bytes, which the battle copies into the monster's battle record: the first two are its HP, which it starts the battle with, and bytes 3 to 6 fill the places where a party member's record holds Attack, Defense, Magic Attack and Magic Defense. Code — a monster's 16 bytes go to its record from place 0x13, so bytes 8 and 9 sit at 0x1B and 0x1CChecked by claude, 2026-11-08 — read the hit routine, the chance draw, the target and slot tests, the miss path and the equipment boost bits at the pinned linesRevised after a check by a second AI model, 2026-11-08.

A battle begun from the field fights one of three formations from a pack, and a second value picks which of the three. A pack's four bytes hold its three formation numbers' low bytes, and bits 0, 1 and 2 of the fourth add each one's ninth bit, so a pack can name formations 0 to 511 (computed). A field routine passes the pack from a field value and the choice from a byte that another field routine saves from a field object (its byte 0x0E, saved with its byte 0x0D). A pack number of 0xFFFF fights formation 3 and sets the flag that skips the experience award. A formation's three stat bytes are loaded with it, the third setting its run chance (super-mario-rpg/run-away). super-mario-rpg/battle-formations

About: Super Mario RPG Visible encounter

Value: formations 512 · per pack 3

CodeSuper-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L74386-L74455CODE_C290B8: LDA.b $48 CMP.w #$FFFF BNE.b CODE_C290CA LDA.w #$0003 STA.l $7EFA0E INC.w $0B64 RTS CODE_C290CA: LDA.l DATA_F90000+$0A STA.b $B8 LDA.w #DATA_F9222A>>16 …Our readingpack 0xFFFF: formation 3, and the award-skip flag set74387–74393the pack's four bytes at 4 × its number (nine bits)74396–74410the choice (0, 1 or 2) picks a low byte and its ninth bit from bit 0, 1 or 2 of the fourth byte74411–74452the formation number kept for the battle74454Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L74465-L74480LDA.l $7EFA0E ASL CLC ADC.l $7EFA0E TAY LDA.l DATA_F90000+$0E STA.b $EA LDA.w #DATA_F92AAA>>16 STA.b $EC LDA.b [$EA],y STA.l $7EFA1C INY …Our readingthe formation's three stat bytes at 3 × its number74466–74480Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L9663-L9675CODE_C045CB: LDA.l $003178 BNE.b CODE_C045FC PHB LDA.b #$00 PHA PLB REP.b #$20 LDA.w $700E STA.b $48 SEP.b #$20 LDA.w $70A7 …Our readinga field routine passes a field value as the pack and a saved object byte as the choice9671–9675Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L8254-L8262CODE_C03C9F: STA.b $80 INC STA.w $316D JSR.w CODE_C0C637 LDA.b $0D,x STA.w $70A8 LDA.b $0E,x STA.w $70A7Our readingfor the object slot given, its bytes 0x0D and 0x0E are saved8255–8262A character reaches level 2 at 16 experience in all, level 10 at 700, level 20 at 3950 and level 30 at 9999, where experience stops: a character already at 9999 gets none, and a total past it is cut back to 9999. After a battle, unless a flag that skips the award is set, each party member gets the battle's experience whole, doubled for one wearing the Exp. Booster, and goes up every level the new total reaches, several at once if it reaches several. Code — the award-skip flag (0x0B64)Checked by claude, 2026-11-08 — read the pack decoder, the formation-stat load, the field routine that passes the pack and choice, and the object-byte save at the pinned linesRevised after a check by a second AI model, 2026-11-08.

Running from a battle succeeds when a draw from 0 to 100 is at most the formation's run chance, 80, 50, 20 or 0 by the low two bits of its third stat byte: 81, 51 or 21 times in 101 (computed). A failed draw shows "Couldn't run!"; at 0 there is no draw and the battle shows "Can't run from this". Of the 512 formations, 12 have 80, 399 have 50, none 20, and 101 can't be run from (computed). super-mario-rpg/run-away

About: Super Mario RPG Fleeing

ChancesFormations
8012
50399
200
0101
CodeSuper-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L60871-L60900CODE_C2227B: LDA.l $7EFA1E AND.w #$0003 TAX SEP.b #$20 LDA.l DATA_C224A0,x BEQ.b CODE_C22296 STA.b $DA LDA.b #$64 STA.b $DB JSR.w CODE_C20627 BRA.b CODE_C22298 …Our readingthe run chance from the low two bits of the formation's third byte60872–60876at 0, result 2; otherwise a draw from 0 to 100 at or below the chance gives 1, else 060877–60885result 1 runs; 2 picks message 0x26, 0 message 0x2460887–60900Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L61110-L61111DATA_C224A0: db $50,$32,$14,$00Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L57449-L57465CODE_C20627: LDA.b $DB XBA LDA.b #$00 XBA REP.b #$20 INC JSR.w CODE_C205FB SEP.b #$20 CMP.b $DA BEQ.b CODE_C2063E BMI.b CODE_C2063E …Our readingtrue when a draw from 0 to the bound is at or below the value57450–57465Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L57421-L57433CODE_C205FB: PHX PHY STA.b $44 LDA.b $40 AND.w #$FF00 ORA.w #$0001 STA.b $40 JSL.l CODE_C00000 LDA.b $46 PLY PLX …Our readingthe draw goes through the same random routine as the hit draw57422–57432Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L234995-L234999 — the two messages' textDATA_FA2891: db " Couldn't run!",$00 DATA_FA28A0: db " Can't run from this",$7B,$00Super-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L234931-L234934 — the battle message pointers; entries 0x24 and 0x26 (bytes) point to the two messagesDATA_FA26F1: … dw DATA_FA287C,DATA_FA2887,DATA_FA2891,DATA_FA28A0,DATA_FA28B6,DATA_FA28BA,DATA_FA28C2,DATA_FA28CASuper-Mario-RPG-Disassembly: Super Mario RPG (SNES) disassembly · SMRPG/Routine_Macros_SMRPG.asm#L230239-L230335 — the 512 formations' three stat bytes, at F9:2AAA in the ROM; the counts by run chance are from the third byte of every rowDATA_F92AAA: dw $FF00,$00C3,$C3FF,$FF00,$00C3,$C3FF,$FF00,$0001A battle begun from the field fights one of three formations from a pack, and a second value picks which of the three. A pack's four bytes hold its three formation numbers' low bytes, and bits 0, 1 and 2 of the fourth add each one's ninth bit, so a pack can name formations 0 to 511 (computed). A field routine passes the pack from a field value and the choice from a byte that another field routine saves from a field object (its byte 0x0E, saved with its byte 0x0D). A pack number of 0xFFFF fights formation 3 and sets the flag that skips the experience award. A formation's three stat bytes are loaded with it, the third setting its run chance (super-mario-rpg/run-away). Code — the third stat byte is loaded with the formationChecked by claude, 2026-11-08 — read the run command's chance, draw and outcomes, decoded both message pointers, and counted the formation rows by their run bitsRevised after a check by a second AI model, 2026-11-08.