| The NES version's title screen reads "© 1987 SQUARE" and "© 1990 NINTENDO". | Final Fantasy Disassembly/bank_0E.asm L77–81 | Code |
BattleRNG returns the next byte of a 256-byte table, indexed by a counter (btl_rngstate) that wraps, so battle draws repeat every 256 calls. | Final Fantasy Disassembly/bank_0F.asm L13817–13824 | Code |
BattleRNG's table holds $00 twice and never $95, so a battle draw is never $95. | Final Fantasy Disassembly/bank_0F.asm L13811–13824 | Code |
RandAX scales a table byte into a range: . | Final Fantasy Disassembly/bank_0C.asm L5888–5905 | Code |
| A character's damage stat rises by 1 whenever a level-up raises Strength to an even number, and by the weapon's damage when it is equipped; the weapon's hit bonus adds to hit rate the same way. | Final Fantasy Disassembly/bank_0B.asm L1060–1072Final Fantasy Disassembly/bank_0F.asm L10919–10928 | Code |
| A physical attack's hit chance starts at 168; Dark on the attacker costs 40, and Dark on the defender gives 40. Unless the defender is asleep or stunned, it then adds the attacker's hit rate and subtracts the defender's evade. The result is held within 1–255. | Final Fantasy Disassembly/bank_0C.asm L4309–4332Final Fantasy Disassembly/bank_0C.asm L4377–4399 | Code |
| Against a sleeping or stunned defender, base damage rises by a quarter, and the attacker's hit rate and the defender's evade drop out, so the hit chance stays at 168 apart from Dark's 40 either way. | Final Fantasy Disassembly/bank_0C.asm L4363–4380Final Fantasy Disassembly/bank_0C.asm L4309–4332 | Code |
| An attack swings times for hit rate , times a multiplier that FAST raises from 1 to 2; an unarmed Black Belt or Master swings twice as often. | Final Fantasy Disassembly/bank_0C.asm L5656–5666Final Fantasy Disassembly/bank_0C.asm L4407–4415Final Fantasy Disassembly/bank_0C.asm L8616–8627Final Fantasy Disassembly/bank_0C.asm L5745–5748Final Fantasy Disassembly/bank_0B.asm L897–901 | Code |
Each swing rolls 0–200 with RandAX; a roll of 200 always misses, and any other roll hits when it is at most the hit chance. | Final Fantasy Disassembly/bank_0C.asm L4471–4494 | Code |
| Each swing that rolls under 200 also rolls damage from the base to , capped at 255; a hit subtracts the defender's absorb, with a minimum of 1, and the swings' damage adds up to one total. | Final Fantasy Disassembly/bank_0C.asm L4312–4313Final Fantasy Disassembly/bank_0C.asm L3994–3996Final Fantasy Disassembly/bank_0C.asm L4482–4526 | Code |
| A swing is critical when its roll is at most the crit chance, which is capped at the hit chance; a critical adds the swing's random damage again, with no absorb taken from it. | Final Fantasy Disassembly/bank_0C.asm L4401–4405Final Fantasy Disassembly/bank_0C.asm L4514–4521 | Code |
| A character's crit chance is the equipped weapon's index number, not the crit rate in the weapon's data (no code we read touches that byte); an unarmed Black Belt or Master gets twice their level. | Final Fantasy Disassembly/bank_0C.asm L5692–5697Final Fantasy Disassembly/bank_0C.asm L27Final Fantasy Disassembly/bank_0F.asm L10916–10928Final Fantasy Disassembly/bank_0C.asm L5719–5743 | Code |
| A physical attack gains 40 hit chance and 4 base damage when its category or element matches the defender's, but neither side of a battle can trigger it: a character's attack reads the character's own category and weakness bytes instead of the weapon's, and a monster's attack is matched against a character's, and all four bytes are always 0. | Final Fantasy Disassembly/bank_0C.asm L4334–4357Final Fantasy Disassembly/bank_0C.asm L3998–4004Final Fantasy Disassembly/bank_0C.asm L4166–4172Final Fantasy Disassembly/bank_0C.asm L5668–5673 | Code |
| A damage spell always connects, for a random value from its power to ; its roll of 0–200 against 148 + the spell's hit rate − the target's magic defense doubles the damage instead of deciding a hit. | Final Fantasy Disassembly/bank_0C.asm L8283–8286Final Fantasy Disassembly/bank_0C.asm L8207–8211Final Fantasy Disassembly/bank_0C.asm L8153–8171Final Fantasy Disassembly/bank_0C.asm L8325–8332 | Code |
| A resisted element halves a damage spell's power and drops the 148 from its doubling chance; a weakness multiplies the power by 1.5 and adds 40 to the chance. | Final Fantasy Disassembly/bank_0C.asm L8288–8313 | Code |
| A damage spell's damage and its chance to double come from the spell's power, hit rate, and element, the target's magic defense, resistances, and weaknesses, and two random rolls. No stat of the caster enters either, so Intelligence adds nothing to spell damage. | Final Fantasy Disassembly/bank_0C.asm L7116–7126Final Fantasy Disassembly/bank_0C.asm L8283–8316Final Fantasy Disassembly/bank_0C.asm L8153–8171Final Fantasy Disassembly/bank_0C.asm L8207–8211Final Fantasy Disassembly/bank_0C.asm L8325–8338 | Code |
| TMPR and SABR, whose spell effect adds the spell's power to the target's attack, do nothing when cast on a character: the routine that loads a character's stats for a spell doesn't load attack, and the routine that saves them back skips it. | Final Fantasy Disassembly/Constants.inc L56–60Final Fantasy Disassembly/bank_0C.asm L8118–8132Final Fantasy Disassembly/bank_0C.asm L8645–8650Final Fantasy Disassembly/bank_0C.asm L8027–8070 | Code |
| Spells that change an enemy's elemental resistance or weakness, such as XFER, have no effect on enemies; the change is never saved, and attacks read those bytes from the enemy's data in ROM. | Final Fantasy Disassembly/bank_0C.asm L7975–8017Final Fantasy Disassembly/bank_0C.asm L7898–7903Final Fantasy Disassembly/bank_0C.asm L4044–4046 | Code |
| At each level-up, an unarmed Black Belt or Master gets absorb equal to their level and a damage stat of twice their level, whatever armor they wear. | Final Fantasy Disassembly/bank_0B.asm L174–184 | Code |
| Measured in the ROM over all 256 battle-RNG states, one swing with base damage 20, hit rate 10, and crit chance 1 against evade 6 and absorb 4 hits 221 times and is critical 4 times; with the attacker in Dark it hits 170 times, and against a sleeping defender 216 times. | Final Fantasy Disassembly/bank_0C.asm L4307–4591 | Verified |
| Measured the same way, four swings with base damage 40, hit rate 100, and crit chance 20 against evade 40 and absorb 10 land 1,020 of 1,024 swings, 109 of them critical, for 129–413 damage; with FAST, eight swings land 2,040 of 2,048, 213 critical. | Final Fantasy Disassembly/bank_0C.asm L4407–4415 | Verified |
| A level-up that raises a character's Agility also raises their evade by 1, up to 200. | Final Fantasy Disassembly/bank_0B.asm L1074–1082 | Code |
A character's RUN always succeeds when the party strikes first and always fails in a formation marked no-run; otherwise it succeeds when the character's Luck exceeds RandAX(0, level + 15), but the level is read from the wrong place: Disch notes the code reads another character's ailment byte or unrelated memory. | Final Fantasy Disassembly/bank_0C.asm L3755–3790Final Fantasy Disassembly/bank_0C.asm L3807–3819 | Code |
On an active enemy's turn, it flees when its morale is below twice the party leader's level, or when morale minus twice that level plus RandAX(0, 50) is below 80. | Final Fantasy Disassembly/bank_0C.asm L6778–6810 | Code |
Each round, DoBattleRound lists the 9 enemy slots and 4 characters and shuffles them with 16 swaps of two random positions; no stat enters the order. | Final Fantasy Disassembly/bank_0C.asm L3181–3183Final Fantasy Disassembly/bank_0C.asm L3199–3244 | Code |
| At the start of a battle, unless the formation is marked no-run, the game draws with of the party leader: below 11 the party is surprised and loses its first round of commands, and from 90 the party strikes first and the enemies skip the first round. | Final Fantasy Disassembly/bank_0C.asm L381–437Final Fantasy Disassembly/bank_0C.asm L3259–3260 | Code |
| On the overworld, a step onto a tile marked for fights starts a battle when the battle-step generator returns less than 10, or less than 3 aboard the ship; in dungeons and towns the threshold is a per-map rate. | Final Fantasy Disassembly/bank_0F.asm L1187–1197Final Fantasy Disassembly/bank_0F.asm L3298–3304Final Fantasy Disassembly/bank_0F.asm L3756–3757 | Code |
GetBattleFormation picks one of the area's 8 formations by indexing lut_RNG with a counter that rises by 1 per battle; the low 6 bits select formations 0–3 with 12 chances in 64 each, 4 and 5 with 6, 6 with 3, and 7 with 1. | Final Fantasy Disassembly/bank_0F.asm L1293–1299Final Fantasy Disassembly/bank_0F.asm L1357–1365 | Code |
lut_RNG, the 256-byte table at $F100, holds every byte from $00 to $FF exactly once. | Final Fantasy Disassembly/bank_0F.asm L11326–11334 | Code |
BattleStepRNG returns lut_RNG[i] for a counter that steps by 1 per call; each time it wraps to 0, a sign byte gains $A0, and its top bit sets the direction of the next pass. | Final Fantasy Disassembly/bank_0F.asm L1315–1345 | Code |
| A new character's hit rate is 10 as a Fighter, 7 as a Red Mage, and 5 in the other four classes; evade is 53 for the Fighter, Black Belt, and White Mage and 58 for the Thief, Red Mage, and Black Mage. | Final Fantasy Disassembly/bank_0F.asm L1852–1857Final Fantasy Disassembly/Constants.inc L494Final Fantasy Disassembly/Constants.inc L356–361 | Code |
| Each level-up adds 3 to the hit rate of a Fighter, Black Belt, Knight, or Master, 2 for a Thief, Red Mage, Ninja, or Red Wizard, and 1 for a White or Black Mage or Wizard, up to 200. | Final Fantasy Disassembly/bank_0B.asm L1183–1187Final Fantasy Disassembly/bank_0B.asm L897–901 | Code |
| A new game zero-fills every character's stat page, weapon and armor slots included, so the party starts unarmed, with 400 gold. | Final Fantasy Disassembly/bank_0F.asm L88–93Final Fantasy Disassembly/variables.inc L384Final Fantasy Disassembly/variables.inc L333 | Code |
| The 40 weapons add from 0 to 50 to hit rate: 0 for both nunchucks, the Iron Hammer, and four of the six staves; 10 for early blades such as the Small Knife and Short Sword; 35 for the Defense, CatClaw, Katana, and Xcalber; and 50 for the Masmune. | Final Fantasy Disassembly/bank_0C.asm L21–35Final Fantasy Disassembly/Constants.inc L452Final Fantasy Disassembly/Constants.inc L230 | Code |
Shop 1, the first weapon shop in lut_ShopData, sells the Wooden Staff, Small Knife, Wooden Nunchuck, Rapier, and Iron Hammer, with hit bonuses of 0, 10, 0, 5, and 0 and damage of 6, 5, 12, 9, and 9: the most accurate of them, the Small Knife, deals the least damage. | Final Fantasy Disassembly/bank_0E.asm L4872–4879Final Fantasy Disassembly/bank_0C.asm L21–26Final Fantasy Disassembly/bank_0F.asm L10916–10928 | Code |
| Across the 128 enemy records, evade runs from 0 (Scum) to 144 (the Air elemental), with a median of 48; 31 records sit below 25, and six reach 100 or more: Air, Nitemare (132), Frost D and Sphinx (120), Wraith (108), and Chaos (100). | Final Fantasy Disassembly/bank_0C.asm L94–102Final Fantasy Disassembly/Constants.inc L41Final Fantasy Disassembly/bank_0C.asm L6215Final Fantasy Disassembly/bank_0C.asm L4048–4050 | Code |
| A new game puts the party at overworld tile (153, 165), in land domain $2C, whose eight formation slots all hold 3–5 Imps (evade 6). The domain to its north, $24, gives 3–5 Imps in 48 of 64 battles; its other slots hold 1–3 GrImps (evade 9), 1–2 Wolves (36), a lone Madpony (22), and, 1 time in 64, 3–6 Imps with up to 4 GrImps. | Final Fantasy Disassembly/variables.inc L325–326Final Fantasy Disassembly/bank_0F.asm L1239–1259Final Fantasy Disassembly/variables.inc L777–785Final Fantasy Disassembly/bank_0B.asm L2085–2095Final Fantasy Disassembly/bank_0B.asm L2645–2654 | Code |
| The Air elemental (evade 144) is in the random battles of five standard maps, $2F, $30, $32, $33, and $3A, as 2–4 or 3–6 of them in one 12-in-64 slot of the last three, to which $32 and $33 add a second, smaller slot of 1–3 (15 and 18 of 64 in all); Wraith (108) fills 42 of 64 chances on map $25, Frost D (120) 30 of 64 on map $34, and Sphinx (120) 24 of 64 on map $0E and 12 of 64 in four overworld domains. | Final Fantasy Disassembly/bank_0F.asm L3298–3309Final Fantasy Disassembly/Constants.inc L453 | Code |
| Final Fantasy rolls once per swing against a single hit chance that already has the defender's evade subtracted; Final Fantasy II splits that into two sets of rolls, the attacker's against its hit % and the defender's against its evade %, and subtracts the defender's successes from the attacker's. | Final Fantasy Disassembly/bank_0C.asm L4377–4399Final Fantasy Disassembly/bank_0C.asm L4471–4494 | Code |