Claim set · data/claims/ff5.yaml

Final Fantasy V (everything8215's disassembly)

Game: Final Fantasy V.

A combatant's ATB timer is set to 120 + equipment weight ÷ 8 − agility, at least 1, adjusted for haste or slow, and UpdateTimer counts it down by one each tick and flags it when it reaches 0, when the turn comes due. The battle speed setting sets a wait of 0, 15, 30, 60, 120, or 240 when a character's turn arrives. ff5/atb-timer

About: Final Fantasy V Active Time Battle

Value
{
 "base": 120,
 "weightDivisor": 8,
 "min": 1,
 "turnWait": [
  0,
  15,
  30,
  60,
  120,
  240
 ]
}
CodeFinal Fantasy V Disassembly · src/battle/battle-main.asm#L5397-L5416;initialize ATB (A: character index 0-12) .proc ResetATB … lda CharStruct::EqWeight,X jsr ShiftDivide_8 ;weight/8 clc adc #$78 ;+120 sec sbc Agility ;-agi beq :+ bcs :++ : lda #$01 ;min 1 …Final Fantasy V Disassembly · src/battle/battle-main.asm#L4721-L4748;Advances a status/atb timer if that status is supposed to be checked this tick … .proc UpdateTimer … lda CurrentTimer,X beq FlagTimer dec CurrentTimer,X lda CurrentTimer,X bne TimerActive FlagTimer: ;flag EnableTimer when CurrentTimer hits 0Final Fantasy V Disassembly · src/battle/battle-main.asm#L11470-L11473and #$0F ;battle mode and speed tax lda f:BattleSpeedTbl,X sta ATBWaitTimeFinal Fantasy V Disassembly · src/battle/battle-main.asm#L5336-L5349;Waits when a character's turn arrives (amount depending on battle speed setting) .proc ATBWait … lda ATBWaitLeft beq DoneWaiting dec sta ATBWaitLeftFinal Fantasy V Disassembly · src/battle/battle-main.asm#L24789-L24792; d0/ecf2: battle speed constants BattleSpeedTbl: .byte 0,15,30,60,120,240,0,0 ; active .byte 0,15,30,60,120,240,0,0 ; waitChecked by claude, 2026-10-25 — read ResetATB, UpdateTimer, the battle-speed load (L11470-L11473), the table, ATBWait (L5337-L5350), and the block that starts the wait (L3697-L3705), where a character whose turn has come up and isn't disabled gets ATBWaiting set and ATBWaitLeft loaded from ATBWaitTime

Cited by: Final Fantasy V, Turn order

A physical attack first rolls 0–99 against its hit % (100 where the attack type calls SetHit100andTargetEvade, as fists and katanas do) and misses on a roll at or above it; a target that can dodge then rolls 0–99 against its evade %, and a roll under it is a miss, or a shield block when the target carries a shield. ff5/hit-check

About: Final Fantasy V Hit chance

CodeFinal Fantasy V Disassembly · src/battle/battle-main.asm#L19091-L19122;Check for Physical Hit .proc CheckPHit _7E23: jsr Random_0_99 cmp HitPercent bcs Miss … jsr Random_0_99 cmp EvadePercent bcs Return ldx TargetOffset lda CharStruct::RHShield,X …Final Fantasy V Disassembly · src/battle/battle-main.asm#L18698-L18705.proc SetHit100andTargetEvade _7C47: lda #$64 sta HitPercent ldx TargetOffset lda CharStruct::Evade,X sta EvadePercentFinal Fantasy V Disassembly · src/battle/battle-main.asm#L16363-L16369;Attack Type 30 (Fists) … jsr SetHit100andTargetEvade jsr HitPhysicalFinal Fantasy V Disassembly · src/battle/battle-main.asm#L16574-L16582;Attack Type 37 (Katanas) … jsr SetHit100andTargetEvade jsr HitPhysicalChecked by claude-agent, 2026-10-21 — read each pinned range against every part of the statement

Cited by: Final Fantasy V, Hit chance

Three attack types call CheckCrit: fists (type 30), katanas (type 37), and type 36, which the source comments as bows with an element and which uses the knife damage formula, after moving its crit % from its second parameter to the first. CheckCrit makes a critical when a roll of 0–99 is under that crit %, and a critical doubles Attack and sets Defense to 0. ff5/critical

About: Final Fantasy V Critical hit

CodeFinal Fantasy V Disassembly · src/battle/battle-main.asm#L20794-L20812;Check for Critical Hit ;Param1: Crit% … .proc CheckCrit _87DF: lda MagicSword ;no crits with magic sword, bne Ret ;in vanilla FF5 no weapons support both anyway jsr Random_0_99 cmp Param1 bcs Ret lda #$01 sta Crit …Final Fantasy V Disassembly · src/battle/battle-main.asm#L16363-L16382;Attack Type 30 (Fists) ;Param1: Crit% … jsr CheckCritFinal Fantasy V Disassembly · src/battle/battle-main.asm#L16574-L16592;Attack Type 37 (Katanas) ;Param1: Crit% … jsr CheckCritFinal Fantasy V Disassembly · src/battle/battle-main.asm#L16542-L16564;Attack Type 36 (Bows with Element) ;Param1: Hit% ;Param2: Crit% … jsr KnifeDamage … lda Param2 sta Param1 ;move Crit% to Param1 jsr CheckCrit ;because crit routine expects it thereChecked by claude-agent, 2026-10-21 — read each pinned range against every part of the statement

These are the only three jsr CheckCrit lines in battle-main.asm at the pinned commit.

Cited by: Critical hit, Final Fantasy V

Physical damage is (Attack − Defense) × M, at most 9,999, and 0 when Defense is at least Attack. For swords, Attack is the weapon's attack power plus a random 0 to an eighth of it, and M is Level × Strength ÷ 128 + 2. ff5/damage

About: Final Fantasy V Damage formula

Value
{
 "cap": 9999,
 "swordSpread": 0.125,
 "swordMPlus": 2
}
CodeFinal Fantasy V Disassembly · src/battle/battle-main.asm#L22910-L22945;Subtract Defense from Damage and multiply by M … .proc CalcBaseDamage _93F8: longa sec lda Attack sbc Defense beq :+ bcs ApplyM : tdc sta BaseDamage …Final Fantasy V Disassembly · src/battle/battle-main.asm#L19430-L19467;Swords damage formula … .proc SwordDamage … lda AttackInfo::AtkPower,X tax stx $0E ;Attack Power jsr ShiftDivide_8 ldx #$0000 jsr Random_X_A longa clc …Checked by claude, 2026-10-25 — read each pinned range against every part of the statement; SwordDamage (L19436-L19468) computes Attack, M, and Defense as the statement gives them

Cited by: Damage formula, Final Fantasy V

While FleeSuccess is nonzero, CheckFlee counts a flee ticker up each pass; on the 20th it rolls 0–99 and escapes when the roll is under the encounter's flee chance, and otherwise the ticker restarts. A flee chance with the high bit set shows the can't-run message instead, and a FleeSuccess of $80 (the Exit spell) escapes at once. The source doesn't show what sets FleeSuccess for ordinary running; its RAM notes only guess that holding L and R does. ff5/run

About: Final Fantasy V Fleeing

Value
{
 "ticks": 20
}
CodeFinal Fantasy V Disassembly · src/battle/battle-main.asm#L13368-L13397CheckFlee: lda FleeTickerActive beq ResetFleeTicker lda FleeSuccess bmi _FleeSuccess ;80h: exit cast beq ResetFleeTicker lda EncounterInfo::FleeChance bpl AdvanceTicker … lda #$20 ;can't run message … AdvanceTicker: …Final Fantasy V Disassembly · src/battle/battle_ram.inc#L1662-L1663FleeSuccess = $7BE8 ;80h on Exit cast ;0 seems to reset FleeTicker for normal running, so might be another value while holding L+R?Final Fantasy V Disassembly · src/battle/battle-main.asm#L16011-L16018lda EncounterInfo::FleeChance bmi Miss ;80h = can't run jsr Random_0_99 cmp Param1 bcs Miss lda #$80 sta FleeSuccessChecked by claude-agent, 2026-10-21 — read each pinned range against every part of the statement

Cited by: Final Fantasy V, Fleeing

Each step on a normal map adds the map's rate to a random-battle counter ($E0 at the normal rate; $40, $180, or $200 at the others), and a battle starts when a byte from the random table, plus an offset that grows by $11 each time its pointer wraps, is under the counter's high byte. ff5/encounter-rate

About: Final Fantasy V Random encounter

Value
{
 "normal": 224,
 "low": 64,
 "high": 384,
 "veryHigh": 512
}
CodeFinal Fantasy V Disassembly · src/field/field-main.asm#L21620-L21670; [ check random battles (normal map) ] … lda f:SubBattleRate,x … lda $16a8 ; random battle counter clc adc f:_c0cb09,x ; add probability value bcc @cabf lda #$ff00 ; max $ff00 @cabf: sta $16a8 lda $06 shorta …Final Fantasy V Disassembly · src/field/field-main.asm#L21700-L21701_c0cb09: .word $00e0, $0040, $0180, $0200Final Fantasy V Disassembly · src/field/field-main.asm#L21861-L21873_c0cc52: @cc52: phx inc $4f bne @cc60 lda $0b60 clc adc #$11 sta $0b60 @cc60: lda $4f tax lda f:RNGTbl,x clc …Checked by claude-agent, 2026-10-21 — read each pinned range against every part of the statement

Cited by: Final Fantasy V, Random encounter

Final Fantasy IV and V both give each combatant a timer that counts down to its turn. Final Fantasy IV sets its length from a ratio, 50 times a reference party member's agility over 10 times the combatant's; Final Fantasy V sets it to 120 plus equipment weight ÷ 8 minus agility. ff5/atb-changes-ff4

About: Final Fantasy V Active Time Battle

CodeFinal Fantasy IV Disassembly · battle/init.asm#L518-L550ldx #$0032 … lda #$0a … jsr Div16 … sta $2060,xFinal Fantasy IV Disassembly · battle/battle.asm#L1476-L1504@96d6: inx3 ; next timer lda #6 ; loop through 6 timers … dec $2a04,x ; decrement counterFinal Fantasy V Disassembly · src/battle/battle-main.asm#L5405-L5416jsr ShiftDivide_8 ;weight/8 clc adc #$78 ;+120 sec sbc Agility ;-agiChecked by claude-agent, 2026-10-21 — read each pinned range against every part of the statement

Cited by: Active Time Battle, Final Fantasy V

Final Fantasy IV counts a weapon attack's hits from a loop of percentage rolls, one per point of the attack multiplier, less the target's evade rolls; Final Fantasy V's physical check makes one hit roll and one evade roll, and the attack either lands or misses. ff5/hit-changes-ff4

About: Final Fantasy V Hit chance

CodeFinal Fantasy IV Disassembly · battle/damage.asm#L16-L27CalcHits: … @c990: jsr Rand99 cmp $38fa ; check vs. hit rate bcs @c99b inc $38fd ; increment number of hits @c99b: dey bne @c990Final Fantasy V Disassembly · src/battle/battle-main.asm#L19092-L19122.proc CheckPHit … jsr Random_0_99 cmp HitPercent bcs Miss … jsr Random_0_99 cmp EvadePercent … Miss: inc AtkMissedChecked by claude-agent, 2026-10-21 — read each pinned range against every part of the statement

Cited by: Final Fantasy V, Hit chance, Multi-hit attack