Cite as
“Lufia II - Rise of the Sinistrals (USA)”
Licence
proprietary; never redistributed (docs/data-policy.md#roms)
Credit
Neverland (developer), Natsume (North American publisher)
Notes
No-Intro "Lufia II - Rise of the Sinistrals (USA)", the North American release. Headerless 2.5 MB (20 Mbit) LoROM image with the FastROM bit set; internal title "Lufia II(Estpolis II)". A bank $80-$FF address maps to the file offset (bank & $7F) × $8000 + (address − $8000), so $96:CF69 is 0xB4F69.

Cited on

Claims (20)

Each of the 224 monsters has a record reached through a table of 224 offsets at $96:85C0: the battle loader copies its 13-letter name, four words from +$11 to +$17, and four bytes from +$19 to +$1C, which it doubles into words; the routine at $81:FBDB reads the experience and gold it pays as words at +$1D and +$1F; and a list of three-byte entries from +$21, ended by 0, holds the drop: in an entry of kind 3 the low 9 bits name the item and the top 7 bits give the chance in percent. Terror Wave names the four words HP, MP, attack, and defense, the four bytes agility, intelligence, guts, and magic resistance, and the byte at +$0D the level. 132 monsters carry a drop. HP runs up to 65535 (Egg Dragon) and experience up to 60000 (Egg Dragon).0xB05C0-0xB4F18Code
Each of the 467 items, from no. 0 (no equipment) to no. 466, has a record reached through a table of 467 offsets at $96:CF69 and a 12-letter name at $9E:C7E8. The record's first nine bytes are copied as a block, and four mask bytes follow; each set mask bit, lowest first, adds a word. Byte 7's lowest set bit picks the equipment slot, byte 8 has one bit per character who can equip the item, the word at +5 is the price the Ancient Cave holds under its floor's limit, the seven words of mask bits 4 to 10 are what equipping adds, and mask bit 15's word names the item's IP attack. Terror Wave names the rest: bytes 0 to 4 use flags, more flags, targeting, icon, and sprite; byte 7's bits, low first, weapon, armor, shield, helmet, ring, and jewel; and the seven added words attack, defense, strength, agility, intelligence, guts, and magic resistance. The table holds 116 weapons, 66 armors, 45 shields, 53 helmets, 41 rings, 33 jewels, and 108 items with no kind bit.0xB4F69-0xB7ADD0xF47E8-0xF5DCBCode
Equipment names its IP attack by number; 158 numbers, from 2 to 168, appear in the item table. Entry n − 1 of a table of pointers at $84:8F10 leads to the attack's record in bank $84, whose byte at +5 is its IP cost and whose name starts at +6. Costs run from 8 to 255; the battle menu offers an attack only when the member's IP byte is at least its cost.0x20F10-0x2105F0x21074-0x21B3DCode
Each of the 40 spells has a record reached through a table of 40 offsets at $95:FA5B: an 8-letter name, a byte at +10 with one bit per character who can learn it (in Terror Wave's order), the MP cost at +12, the shop price as a word at +15, and the battle script's offset at +17; Terror Wave calls the byte at +9 the element. Costs run from 0 MP (Reset and Light) to 30 MP and prices to 65000 gold; Guy and Dekar learn none, and Fry and Zap are Artea's alone.0xAFA5B-0xAFF14Code
All seven characters share one experience curve: reaching level 2 takes 10 experience, level 10 2891, level 50 1548710, and level 99 9999999. The game computes it rather than storing it. Starting from a step of 20 (stored as 5120, in 1/256ths), each level adds the step to a running sum and then grows the step by step × (f + 1) / 256, where f is a factor that changes every eight levels: 190, 64, 49, 31, 17, 13, 5, 2, 2, 1, 1, 1, 1. The requirement is the sum / 256 − 10, except that reaching level 99 takes 9,999,999 flat: at level 98 the routine returns that figure instead.0xBB62C-0xBB9ABCode
Each character's stats grow by fixed steps, in sixteenths of a point, from a row of seven bytes that changes every eight levels: 7 characters × $70 bytes at $97:B62C, of which levels 2 to 99 reach the first 13 rows of 8 bytes; the fourteenth row is zeros. A stat at level L is its base plus ⌊(sum of the steps for levels 2 to L) / 16⌋. Terror Wave names the seven bytes HP, MP, strength, agility, intelligence, guts, and magic resistance; the guts byte is 0 in every row, so guts stays at its base.0xBB62C-0xBB93BCode
Each character's base stats are seven words at $97:B93C, 14 bytes per character, of which the routine adds only the low byte, each to the growth row's stat in the same place: Maxim starts from 20, 0, 12, 9, 8, 100, 5 (by Terror Wave's names, HP, MP, strength, agility, intelligence, guts, magic resistance).0xBB93C-0xBB99DCode
The seven capsule monsters have five forms each, 35 records reached through offsets at $97:DCB8 by the monster's number × 5 + form − 1. The stat routine pairs the byte at +$15 and the five at +$18 to +$1C with six growth codes at +$1D to +$22. Terror Wave names the rest of the record: a 12-letter name, an alignment byte at +14, and the eight stat bytes from +$15 as HP, attack, defense, strength, agility, intelligence, guts, and magic resistance. Foomy's line runs Foomy S, Foomy M, Foomy L, Foomy H, Gold Fox.0xBDCB8-0xBEE47Code
A capsule monster's growth code picks a row of eight rates at $A6:F420, one per 16-level band; each level adds its band's rate, and the sum is divided by 16. The table gives the rates as stored, before the routine halves them: a band equal to the monster's form adds half its rate, and each later band a quarter. The stored rates fall with the bands, from as much as 128 to 0.0x137420-0x13749FCode
Each capsule monster's fifth form comes from one fruit and goes back with another: a table of seven item words at $8E:E49A names the fruit that changes it to form 5, one at $8E:E4A8 the fruit that reverts it, and one at $8E:E4B6 the form it must be in and returns to. Foomy turns into the Gold Fox on a Secret fruit at form 4.0x7649A-0x764C3Code
The shop table at $97:EE9F holds offsets to 59 shops. Each starts with a kind byte, a flag byte, and a third byte; flag bit 0 lists the party's own items, each of bits 1 to 5 adds a list, and bit 7 one more menu entry. The first four lists are words ended by 0, and the fifth is bytes ended by $FF. Terror Wave names bit 0 pawn, bits 1 to 5 prize coins, items, weapons, armor, and spells, and bit 7 sell.0xBEE9F-0xBF63ACode
The Ancient Cave's enemies by floor: an enemy on floor N is one of the six entries from 2(N − 1) of a 200-byte table of monster numbers at $94:D95C, which names 149 different monsters in all. Floor 1 holds Goblin, Goblin Mage, Armor goblin, Regal Goblin, Troll, Ork; floor 98 Dark Warrior, Ochi Warrior, Sly Fox, Pierre.0xA595C-0xA5A23Code
The Ancient Cave's four fixed chest lists, as item words in the ROM: the nine Iris treasures at $91:FFCA, the nine restoratives at $91:FFDC (Potion and Hi-Magic twice each), the 41 blue-chest items at $94:EEA0, which are also the items the cave lets the party keep, and the 31 other consumables at $94:F13D.0x8FFCA-0x8FFED0xA6EA0-0xA6EF10xA713D-0xA717ACode
Measured by calling the cartridge's own floor builder in Mesen 30 times for each floor from 1 to 98 (2,940 floors, the generator's state running on from one build to the next, from a state the probe sets rather than a save): every cell a floor used lay in columns 1 to 8 and rows 2 to 14 of the 16-by-16 grid, no floor had more than 7 rooms, 20 enemies, or 8 chests, and every enemy placed was one of the six its floor's entries in the enemy table allow.0x19013-0x19E30Verified
Which enemies an Ancient Cave floor can hold depends only on its number: each enemy placed on floor N is entry 2(N − 1) plus a random 0 to 5 of a 200-entry table, so each floor has six kinds, a floor shares four of them with the next, and each entry serves three floors. A floor makes 4 to 7 tries to place an enemy, each at a random spot of a random cell, and a try fails when no cell is found or the spot is beside the start or another object; a treasure room adds up to 13 more, and a floor holds at most 20.0x19A37-0x19A41Code
Measured in the same 2,940 builds of floors 1 to 98 in Mesen (lufia-ii/cave-layout-measured): every armour roll gave an item from the first n − 128 of its floor's list once the list passed 127 items, and every one on floor 10 was an Apron; Providence first appeared on floor 21 and took the first chest of every floor-60-and-deeper build that no Iris treasure took; and with no new visit between builds, each of the nine Iris treasures appeared exactly once.0x19013-0x19E30Verified
Entering the Ancient Cave takes everything from the party except its blue-chest items. The game moves each item on the blue list from the bag and from the four party members' equipment to a list of its own, saves a copy of the party, then clears all but the first 14 bytes of each of the seven members' records, the bag, the gold and the play time, puts 10 Potions in the bag, gives back the blue items, and rebuilds the seven members from their default records; when the byte at $0A7F, which neither source names, is 7, it also returns every capsule monster to level 1, a step no probe has covered.0x20B20-0x20B9BCode
Between visits the game keeps, outside the copy the exit restores, a count of entries and one of wipes, the total time spent in the cave, and the deepest floor reached; what else carries over is the Iris flags and the blue items as the party holds them.0x20B20-0x20B58Code
The Ancient Cave changes its look and music in three bands of floors: floors 1 to 20, 21 to 40, and 41 to 98 each take their own block set, map header and music, chosen by (floor − 1) ÷ 10 from a 10-entry table; within a band the palette changes every two floors, through four.0x19F4F-0x19F580x19F65-0x19F6ACode
Measured by running the cartridge's own entry, exit and defeat routines in Mesen on a party the probe stages rather than a save: Maxim alone at level 40, with Water spear equipped and Sizzle sword, five Potions and Mega ax in the bag (the three weapons are on the blue-chest list). Entry left Maxim at level 1 with nothing equipped and a bag of 10 Potions followed by the three weapons. After three more Potions and two blue-list weapons (Air whip in the bag, Blaze sword equipped) were added, the exit gave back level 40 and the five Potions, dropped the 13 cave Potions, and put all five blue-list weapons in the bag, the equipped ones included, with nothing equipped. After the defeat routine on a second visit, the bag held only 10 Potions, and the exit that followed gave back the bag from before the visit (Sizzle sword, five Potions, Mega ax) with Water spear, the weapon Maxim had equipped, added to it, and neither weapon found inside. The probe stops each exit at $84:8AE2, before the screen redraw.0x2078A-0x20BC6Verified