Cite as
“Ogre Battle - The March of the Black Queen (USA)”
Licence
proprietary; never redistributed (docs/data-policy.md#roms)
Credit
Quest
Notes
Internal header (at file offset $7FC0, no copier header; file 1,572,864 bytes = 1.5 MB): title "Ogre Battle USA", map mode $20 (LoROM, slow), cartridge type $02 (ROM, RAM, battery), size byte $0B (declares 2 MB; the file is 1.5 MB), 8 KB SRAM ($03), country $01 (USA), version 0, checksum $D316 with complement $2CE9.

Cited on

Claims (71)

Ogre Battle's cartridge ROM as Ogre Battle - The March of the Black Queen (USA), counted by part of the game: each stretch of code or data goes to the part its region says it serves, and the value sums the bytes of each part. The regions come from our trace, as no disassembly exists, and until they are read most of the ROM counts as not yet read.0x0-0x17ffffUnsourced
The 101 character classes, numbered from 1, as the ROM's per-field arrays hold them: each class's name, movement type, weight, cost and cost per level, whether it may lead a unit, base hit points, Strength, Agility, Intelligence, Charisma, Alignment and Luck with the growth of four of them, the number of front-row and back-row attacks and each attack's name, six resistances, name group, the classes its promotion list names, and the level, Alignment and Charisma a change into it requires (classes 1 to 77). The game's own routines, called in MesenCE for every class, use each column as the table has it. The class window shows the name, attack names and counts, movement type and leadership. A character made in a class from 1 to 81 gets the base hit points, Strength, Agility and Intelligence plus the growth for each level past 1 and a random bonus of 0 to 4 hit points and 0 to 2 of each of the three stats, the stats stopping at 255; the four classes whose base hit points are 0, 58 to 61 (the undead), stay at 0. One made in class 82 or up gets the base values alone. Either way it gets the class's Charisma, Alignment, Luck and resistances, the cost plus the cost per level for each level past 1, and a name from the name group. The class-change list holds the promotion list's classes whose requirements the character meets, and a unit's movement type comes from its members' weights (ogre-battle-snes/unit-movement).0x17D35-0x17FF70x1EF91-0x1F05A0x1F08B-0x1F1540x1F16D-0x1F2360x1F24F-0x1F3180x1F331-0x1F3FA0x1F413-0x1F4770x1F490-0x1F4F40x1F50D-0x1F5710x1F6A1-0x1F8FE0x3DB4F-0x3DC180x4AD4C-0x4B0070x8BA2F-0x8BAF80x8BB29-0x8BE180x8BECD-0x8BF31Verified
Five more arrays of one byte per class, for the 101 classes: the wiki's "FR Attack" and "BR Attack" codes, a compatibility number, the wiki's canvas size, and the battle terrain type.0xE195-0xE1F90x1F572-0x1F6A00x1F98B-0x1F9EF0x8BA2F-0x8BAF80x8BB29-0x8BE18Wiki
The 72 attack names a class's front-row and back-row attacks are shown by, numbered from 0 in the order of their pointers, from HEALING, HEALING and FIREBALL to TAIL, CHARGE and SLEEPING.0x3DC49-0x3DEBCWiki
The 200 items, numbered from 1: each one's name, kind and value, and, for the first 100, its bonuses to Strength, Intelligence and the six resistances (physical, fire, ice, lightning, black and white), which can be negative, and, for the first 70, the element a player's character attacks with when it holds the item (ogre-battle-snes/attack-element). Called in MesenCE, the game's item list points each of the 200 items' lines at its name and at its kind's sign, the shop prices each item at 10 times its value (ogre-battle-snes/shop-price), the status screen adds a held item's Strength and Intelligence bonuses to the values it shows, stopping at 0 and 255, and the equip command adds its six resistance bonuses to the character's resistances.0x3BD46-0x3C4770x3C519-0x3C5E00x3C612-0x3C7A10x3C7A3-0x3C8060x3C808-0x3C86B0x3C86D-0x3C8D00x3C8D2-0x3C9350x3C937-0x3C99A0x3C99C-0x3C9FF0x3CA01-0x3CA640x3CA66-0x3CAC90x5AE3C-0x5AE81Verified
The eight kinds of town the game names: Walled, Trade, Self-Ruled, Magician's, Free, Industrial, Temple and Shrine.0x3C479-0x3C4C9Wiki
The 332 towns, temples and bases of the 30 stages, stage by stage: each one's name, population, morale, compatibility number, store type, town type, and a last byte, $FF for the 60 bases, 0 for 191 records and 1 for the other 81.0x2E8C2-0x2E8E50x2E8E8-0x2E9260x2E929-0x2E9700x2E973-0x2E9C30x2E9C6-0x2EA040x2EA07-0x2EA450x2EA48-0x2EAA10x2EAA4-0x2EAFD0x2EB00-0x2EB740x2EB77-0x2EBD90x2EBDC-0x2EC470x2EC4A-0x2EC9A0x2EC9D-0x2ED110x2ED14-0x2EDA30x2EDA6-0x2EE2C0x2EE2F-0x2EE880x2EE8B-0x2EEE40x2EEE7-0x2EF7F0x2EF82-0x2EFDB0x2EFDE-0x2F05B0x2F05E-0x2F0C00x2F0C3-0x2F1250x2F128-0x2F1C00x2F1C3-0x2F2640x2F267-0x2F2FF0x2F302-0x2F3490x2F34C-0x2F3AE0x2F3B1-0x2F4130x2F416-0x2F4780x2F47B-0x2F4A70x48000-0x480C60x480DE-0x481300x48146-0x48DFBWiki
The 30 stages, numbered from 0, as three tables of 30 entries hold them: each stage's day goal, the number of days its stage-clear and day rules compare the days spent with (ogre-battle-snes/chaos-stage-clear, chaos-day); its hour shift, added to the hour while the battles' reference value climbs and subtracted once it falls, so a positive shift lengthens the stretch at 100 (ogre-battle-snes/hour-alignment); and the five items its shop sells. Called in MesenCE for each stage number, the game's stage setup copies the stage's day goal and hour shift and keeps the address of the stage's row of ogre-battle-snes-tables/encounters, and the shop's fill lists the stage's five items (ogre-battle-snes/shop-price).0x2D173-0x2D1CC0x3CACA-0x3CB5FVerified
The neutral encounters of the 30 stages, three per stage, each a terrain code, a level and a class, in a row of nine bytes per stage; the stage setup keeps the address of stage n's row (stages).0x2E69F-0x2E7ACWiki
How fast each of the ten movement types crosses each of the 20 terrain codes, a 16-bit speed each; a 0 kills a unit there (code 17, the wiki's Sky, for every ground type) and 256 stops it (code 18, Walls), and only the two flying types have neither. Called in MesenCE, the map's speed lookup returns the grid's word for every type on every code, code 19's for the codes past it that were tried (20, 21 and 254), and 256 off the map (ogre-battle-snes/unit-movement). The types' names are the game's; the codes' are the wiki's location codes.0x30000-0x300600x3D661-0x3D7F0Verified
A battle coefficient from 0 to 15 for each of the ten battle-terrain types a class has (the classes' battleTerrain) on each of the 20 terrains a battle is fought on, two to a byte.0x1F8FF-0x1F962Wiki
Nineteen group formations of 7 bytes at 0x2E83D, which place a stage unit's members. A unit's record names three kinds of member, each a class and a level, and a formation; the leader, the first kind, goes to the place in byte 0; the second kind to bytes 1, 2 and 3 and the third to bytes 4, 6 and 5, where bytes 2 and 3 give way to 6 and 5 when they are $FF, so a unit has five members at most. A member whose class is $FF gets class 0, and so does the fourth or fifth member when its place is $FF.0x2E83D-0x2E8C10x28299-0x283640x28241-0x2826EVerified
The 22 tarot cards of the opening questions, from MAGICIAN to WORLD: for each, the points its three answers give the four Lord types (Ianuki, Phantom, Ice Cloud and Thunder), packed a half-byte each, and the largest change it can make to the starting HP, Strength, Agility, Intelligence, Charisma, Alignment and Luck when it is the seventh, bonus card.0x5AD1E-0x5AE3B0x81620-0x816C7Code notes
In the US release, run in Mesen from power-on, each of the six opening questions reads two bytes of the points table, the chosen answer's pair (the first, second or third), from the row of the card whose picture it showed before it, and the seventh card reads its own row of the seven bonus bytes: the rows follow the card names' order, Magician 0 to World 21, with no shift. Three runs drew 17 of the 22 cards; the Lovers, Hermit, Fortune, Death and Temperance didn't come up.0x5AD1E-0x5AE3BVerified
The 24 named characters, numbered 102 to 125 after the 101 classes (Ashe to Galf): each one's name, the class the game makes them, the class name the game's class-name table lists under their own number, and their hit points, Strength, Agility, Intelligence, Charisma, Alignment and Luck. When the game makes one of them in one of the army's slots, 0 to 99, it copies all seven from the character's row, with no growth by level, and the six resistances from the class's row.0x1ECA9-0x1ECB60x1ECE4-0x1ED260x1ED60-0x1EDAA0x1EDAB-0x1EE2E0x1EE53-0x1EE8F0x1EAD4-0x1EAEB0x1F05B-0x1F08A0x1F155-0x1F16C0x1F237-0x1F24E0x1F319-0x1F3300x1F3FB-0x1F4120x1F478-0x1F48F0x1F4F5-0x1F50C0x88D0C-0x88D3B0x8B992-0x8BA2E0x8BAF9-0x8BB280x8BE19-0x8BECC0x1ECD4-0x1ECDA0x13954-0x139610x151AF-0x151BACode
The 1,694 character names, by the pointer table the game picks them from: 550 for group 0, the male classes, 550 for group 1, the female, 550 for group 2, the large, then 44 for the characters numbered 82 to 125, one each in number order. The group is a byte per number (class or named character); a new character whose number is in group 0, 1 or 2 gets a random one of that group's 550, and for group 3, the Lord's classes, the routine takes the address $07A4 in RAM instead of a list entry.0x1EE53-0x1EE8F0x1EE2F-0x1EE420x88000-0x8BA2E0x8BECD-0x8BF490x00539-0x0055C0x005B7-0x00604Code
The game's equip command takes only items 1 to 100: for a higher number, the treasures and the items made to be used, it shows a message and equips nothing. A character holds one item. Equipping one returns the item the character held to the stock, takes one of the new item from its stack, and changes the character's six resistances by the items' bonus columns: the old item's physical, fire, ice, lightning, black and white bonuses are taken off and the new one's added. Choosing an empty stock slot takes the character's item off; with an empty slot and no item held, nothing happens. The command's own code tests only the item's number.0x30D67-0x30D750x30E01-0x30E600x30E7F-0x30F3B0x30DB9-0x30DCF0x30E73-0x30E7ECode
The 33 items the use command accepts, 151 to 183 (Stone of Dragos to Glass Pumpkin), each with its own routine, by a table of 33 routine addresses the game indexes by the item's number less 151. The use command refuses any other item: those up to 150, the equipment and the treasures, and 184 to 200.0x30BE0-0x30BFD0x30CAF-0x30CC60x30D22-0x30D630x30BFE-0x30C340x30CF5-0x30CFDCode
Seven items raise one of a character's statistics when used, and one of the item is used up: item 158 (HP.) raises maximum hit points by a random 1 to 20, to at most 999, except on a character with the undead flag, whose maximum it then sets to 0; items 159, 160 and 161 (STR., AGI. and INT.) raise Strength, Agility and Intelligence by a random 5 to 10, to at most 255; items 162, 163 and 164 (CHA., ALI. and LUK.) raise Charisma, Alignment and Luck by a random 5 to 10, to at most 100. Current hit points don't change.0x31970-0x31AB40x32882-0x328A60x00510-0x005380x1ED60-0x1EDAA0x31B63-0x31B800x32F57-0x32F6A0x1EC69-0x1EC7B0x3286F-0x32881Code
Six items change a character's class when used on a character of the right class, after the player confirms: item 151 (DRAGOS) a MASTER (class 14) into a DRAGONER (15); item 152 (STAFF) a MAGE (20) into a SORCERER (21); item 153 (UNDEAD) a SORCERER (21) into a LICH (22) or a TIAMAT (56) into a ZOMBIE{8F} (57); item 154 (BLOOD) a KNIGHT (2) or an EVIL ONE (5) into a VAMPYRE (32); item 155 (CROWN) an AMAZON (10) into a PRINCESS (34); item 156 (PUMPKIN+) a PUMPKIN (35) into a HALLOWEEN (36). On a character of any other class the item does nothing but show a message.0x317A2-0x3181E0x32803-0x328390x31C5B-0x31C680x327FD-0x32802Code
In the US release, run in Mesen from power-on, the character-making routine, handed the numbers of Rauny (103), Slust (123) and Warren (108) for slots 2 to 4 of the starting army, reads each one's byte of the named characters' class table and makes each with the class, hit points, Strength, Agility, Intelligence, Charisma, Alignment and Luck of the character's row, and the character's own name: Rauny a MUSE with 159 hit points, Slust a DRAGOON with 198, Warren a WIZARD with 102.0x1EC62-0x1EC650x1EAD4-0x1EAEBVerified
A level-up raises the level by 1 and puts experience back to 0. Each stat grows by its class's growth plus a random 0, 1 or 2, drawn separately for each: maximum hit points (to at most 999), and Strength, Agility and Intelligence (to at most 255). Current hit points don't rise. The character's cost rises by its class's cost per level. At level 99 a level-up only puts experience back to 0. A Werewolf or Tigerman in its Beastman form grows as a Werewolf when its werewolf flag is set and as a Tigerman when it isn't, and a Vampyre in its second form grows as a Vampyre.0x23A82-0x23B53Verified
A character levels up when its experience has reached 100. The routine that levels characters up checks each living member of the player's side in the battle's list, then the Lord, wherever the Lord is, and raises each by one level at most.0x239FD-0x23A810x1DE4F-0x1DE5B0x1DB53-0x1DB550x1DDFF-0x1DE01Code notes
A death in a battle, on either side, sets off the changes to experience (experience), charisma (charisma-after-kill) and alignment (alignment-after-kill), unless a battle flag is set, and only when the attack on record came from one of the player's units (experience). The flag covers the deaths of one check and is cleared after it. The battle's list marks the members of the computer's units as the computer's side.0x1C648-0x1C6E90x182B5-0x182FD0x2561B-0x2563A0x1C6FE-0x1C70B0x1D5B7-0x1D5C00x1819F-0x181A30x20588-0x2058DCode notes
When a combatant dies, each living member of the player's side gains experience by the dead combatant's level minus its own. A victim at the same level gives 14. One that is 1 to 5 levels higher gives 19, 24, 33, 49 or 66, and 6 or more levels higher, 99. One that is 1 level lower gives 11, 2 lower 9, and 3 or more lower 1. Experience stops at 100. Only kills by the player's side count: nothing is given when the attacker on record for the death is in one of the computer's units, or there is none. It doesn't matter whose side the victim was on: a player's character killed by the player's own side gives the rest the same experience.0x2561B-0x2563A0x2568E-0x256D50x25754-0x257610x25B0B-0x25B1BVerified
The combatant credited with a kill, when it is in one of the player's units (experience), gains or loses alignment. Killing a victim whose alignment is much higher costs up to 3 points, and killing one whose alignment is much lower earns up to 3. The victim's level minus the killer's is then added as well, so a stronger victim raises alignment and a weaker one lowers it. In full: the killer's alignment minus the victim's, below -20, gives -3; -20 to -11, -2; -10 to -1, -1; 0 to 9, 0; 10 to 19, +1; 20 to 29, +2; 30 or more, +3. The result stays between 0 and 100, except that a sum of 128 or more comes out as 0.0x256D6-0x257160x25745-0x25752Verified
The combatant credited with a kill, when it is in one of the player's units (experience), gains charisma for a strong victim and loses it for a weak one: +8 for a victim 2 or more levels higher, +6 for 1 higher, +4 at the same level, +2 for 1 lower, nothing for 2 lower, then -2, -4, -6, and -8 for a victim 6 or more levels lower. Charisma stays between 0 and 100.0x25717-0x25744Verified
Outside the usual battle mode, a death gives experience to the Lord alone, and only when the victim is an enemy and the killer is the player's (experience). Which battles run that way isn't known. An enemy 0 to 4 or more levels higher gives 14, 19, 24, 33 or 49. One 1 level lower gives 99, then 14, 11 and 9 for 2 to 4 levels lower, and 1 for 5 or more. Experience stops at 100, and alignment and charisma don't change.0x25651-0x2568DVerified
Each battle takes a reference value from 0 to 100, in steps of 25, that follows the game's clock: 100 around midday and 0 around midnight. Each stage has an hour shift (ogre-battle-snes-tables/stages, hourShift), added to the hour while the value climbs and subtracted once it falls, so a positive shift starts the climb earlier and the fall later, lengthening the stretch at 100, and a negative one shortens it. While the hour plus the shift is below 10, that sum decides: below 3 gives 0, 3 to 5 25, 6 50 and 7 to 9 75. From 10, the hour minus the shift decides: below 15 gives 100, 15 to 17 75, 18 50, 19 to 21 25, and 22 and up 0. While a flag the stage's setup sets on one stage is on, the value is 0. Damage scores lose a fifth of each side's alignment's distance from it (damage, lord-attack).0x29261-0x292B30x292EA-0x292F00x1DCB2-0x1DCD70x28000-0x280100x28164-0x28175Verified
The tarot cards that do damage (tarot-battle) set the Lord against each target. Each side scores half its Strength, or half its Intelligence for a magic attack; minus a fifth of its alignment's distance from the battle's reference value (hour-alignment); plus twice a terrain coefficient for its class on the battlefield; plus a random 1 to 8. The Lord's score then gains a quarter of itself, rounded down, once for each target fewer than 5 in the card's target list. The target's score also gains 2, is held to 255 (a score below 0 counts as 255), and is scaled by its resistance to the attack's element, out of 100. The Lord's score minus the target's, at least 1, comes off the target's hit points; TOWER gets no quarters and takes half as much again.0x1DC8D-0x1DD590x1DD5A-0x1DDE00x1BCD9-0x1BD120x1D21F-0x1D24F0x1D485-0x1D4B90x1C265-0x1C2ABVerified
Every tarot card but FORTUNE acts on each of its targets in turn. MAGICIAN, CHARIOT, HERMIT, JUSTICE, DEVIL and JUDGEMENT do damage worked out from the Lord's score against the target's (lord-attack): fire, physical, lightning, cold, black and white damage, scored by the Lord's Intelligence for MAGICIAN, JUSTICE and JUDGEMENT and its Strength for the rest. All but JUDGEMENT miss an undead target. TOWER does physical damage the same way, and half as much again; it misses undead targets and flyers that aren't stunned or petrified. SUN does (100 − the target's alignment)² / 50 − 20, or 1 when that is below 0, plus a random 0 to 7, so at alignment 68 it can do none. DEATH does 999 damage to a target at half its maximum hit points or below. PRIESTESS heals 50 hit points and EMPRESS 999, up to the maximum. FOOL kills a target outright without touching its hit points, and sets the flag that keeps the deaths checked next from changing experience, alignment and charisma (death-handler). HIEROPHANT stuns as STUN does (status-effects). LOVERS charms with a chance of (steps + 3) in 10, the steps counted as for STUN (status-hit), from the Lord's score (half its luck plus its Intelligence, minus its alignment's distance from the battle's reference value) less the target's. HIEROPHANT, LOVERS, DEATH, SUN and FOOL miss characters numbered 82 and up. EMPEROR gives a target one more attack; TEMPERANCE ends charm, stun and petrification and gives back the attacks and Agility the last two took; STAR adds 50 to a target's Agility; MOON moves a target's place number 5 along, from the first five to the last five and back. STRENGTH, HANGED MAN and WORLD set battle flags: the player's characters take less damage and the enemies more (damage-flags), and the computer's magic misses the player's side (hit-chance, status-hit-other).0x1CFBF-0x1D0290x1CF8D-0x1CFA20x1D218-0x1D36E0x1D36F-0x1D5CE0x1D61F-0x1D639Verified
An attack does the attacker's score minus the target's, and at least 1. The attacker scores half its Strength, or half its Intelligence for a magic attack; plus twice its class's terrain coefficient for the battlefield (ogre-battle-snes-tables/terrain-coefficients); minus a fifth of its alignment's distance from the battle's reference value (hour-alignment); plus a random 1 to 8; plus 8 if it has been kissed. Its unit's tactic takes 4 off for STRONG and adds 4 for WEAK. The target scores half the same stat, twice its own terrain coefficient, minus a fifth of its own alignment's distance (and 1 more when that term is larger than the score so far), plus a random 3 to 10, plus 8 if kissed. That score is held to 255, and a score still below 0 after the random part also counts as 255. It is then scaled by the target's resistance to the attack's element, out of 100, so a higher resistance means less damage. The target's unit's tactic adds 4 to it for STRONG and takes 4 off for WEAK. Each target of an attack is scored apart. Some attack codes and two battle flags change the result (skill-damage, damage-flags).0x1BD19-0x1BD750x1C1D5-0x1C2640x1BFBA-0x1C1930x1C1A2-0x1C1A90x18FF8-0x1901D0x1BCD9-0x1BD180x188EE-0x1893B0x18E1C-0x18E6F0x1BD76-0x1BD8BVerified
Two battle flags change the target's score after resistance: one raises the player's characters' score by 30% when they are the targets, and the other lowers the enemies' score by 30% when they are. The tarot cards STRENGTH and HANGED MAN set them (tarot-battle).0x1C0F7-0x1C13A0x1C1AA-0x1C1D4Verified
Some attack codes change the result. Vampyre's SLEEPING always does 0. Code $A3, which no class lists, is scored by Strength and does 1.5 times the damage. Codes $AB to $B0 are scored by Strength too: $AB doubles the attacker's score; BLADE (the General's) and codes $AF and $B0 add 30% of its low 8 bits; LIFESUCK adds nothing; and IAINUKI (the Samurai's, the Lord's and others') adds half of the score's low 8 bits to those 8 bits alone, so a low byte of 171 or more wraps around (198 becomes 41) and the part from 256 up is kept.0x1BFC6-0x1C0150x1C16D-0x1C1880x1BD8C-0x1BD930x1BD54-0x1BD75Verified
Each target of an attack is hit or missed by a chance from 40% to certain. Each side scores its Agility, or Intelligence for a magic attack, plus half its Luck, plus its class's terrain coefficient, plus a random 0 to 7; a player's character adds 10, and an enemy counts its class's Luck. The attacker's score minus the target's sets the chance: below -48, 40%; -48 to -33, 50%; -32 to -17, 60%; -16 to -1, 70%; 0 to 15, 80%; 16 to 31, 90%; 32 or more, always. A target marked undead (undead) is hit only by white attacks. Codes $A0 to $AA follow other rules (status-hit), and so does a battle flag (notes).0x1B725-0x1B97D0x1BC0C-0x1BC64Verified
The status attacks are hit or missed by rules of their own. For STUN (the Witch's), CHARM (the Vampyre's), PUMPKIN (the Pumpkin's and Halloween's) and PETRIFY (the Cockatris's), each side scores its Intelligence, or its Agility for PUMPKIN and PETRIFY; plus half its Luck (an enemy's class's); plus 10 for a player's character using PUMPKIN or PETRIFY; minus its alignment's whole distance from the battle's reference value (hour-alignment); plus 3 and a random 0 to 7. The attacker's score minus the target's counts steps as for an ordinary attack (hit-chance): 0 below -48, then 1 more for each 16, up to 7 from 48. STUN and CHARM land with a chance of the steps in 10 (never at 0 steps, 70% at most), PETRIFY of one more (10% to 80%), and PUMPKIN of three more (30% to certain). PUMPKIN and PETRIFY never land on an enemy numbered 82 or above, and CHARM never lands on numbers 78 to 98, the Lord's among them, or from 102. PETRIFY misses while the attacker itself is first in the target list. HEALING, HEALING+ and KISS always land, and the Vampyre's SLEEPING never does.0x1B725-0x1B97D0x1BC65-0x1BCD8Verified
Four codes that no class lists as its own attack hit by other rules. Codes $A5 and $A8 land as STUN does (status-hit). Codes $A3 and $A4 land without a roll: $A3 on any target but one marked undead (undead), and not on a flying class (Hawk Man to Wyvern, classes 62 to 77) unless it is stunned or petrified; $A4 on a target at half its maximum hit points or less, never on one whose maximum is 0. With a battle flag set, the computer's STUN, CHARM and $A8 miss the player's side, while its $A3, $A4, $A5, PUMPKIN and PETRIFY still land.0x1B7CD-0x1B8270x1B920-0x1B955Verified
When the game makes a character, it marks Skeletons, Wraiths, Ghosts and Phantoms undead, and no other class. Among ordinary attacks only white ones hit an undead target (hit-chance); some special attacks follow their own rules against it (status-hit-other), and the tarot cards theirs (tarot-battle).0x1EC5F-0x1EC7B0x3E6C3-0x3E6D1Verified
What the special attacks do to a target they land on. KISS marks it kissed (8 more on its scores, damage) and CHARM marks it charmed. STUN marks it stunned and PETRIFY marks it petrified, and on a target that was neither, either one takes the target's attacks left off the battle's count of attacks left and sets its Agility for the battle to 0; STUN on a target already stunned does nothing more. PETRIFY turns only the first target in its list to stone, then strikes every target in the list as an ordinary physical attack by Strength. PUMPKIN takes from each target in turn half the hit points the first target has at that moment, at least 1: on targets at 100 and 301, the first drops to 50 and the second loses 25. A target at 1 hit point dies. Code $A4 does 999 damage, $A5 does nothing, and $A8 acts as STUN.0x1BD76-0x1BDB60x1BE1A-0x1BEE00x1C265-0x1C2ABVerified
HEALING and HEALING+ restore to each target a quarter, rounded down, of the sum of the healer's Intelligence, half its alignment and a random 0 to 7, less a quarter of its alignment's distance from the battle's reference value (hour-alignment), and never past the target's maximum hit points. When the distance outweighs the rest, the sum wraps around and the target is healed to its maximum: a healer with Intelligence 10 and alignment 0 heals fully when the reference value is 100.0x1BDBE-0x1BE190x1C30E-0x1C32FVerified
HEALING heals the healer's living ally with the fewest hit points, counting one at its maximum as 999 and taking the first in the battle's list on a tie; HEALING+ heals every living ally. Under any battle order but STRONG, a healer facing a living foe marked undead (undead) instead attacks every such foe with white magic, code $35 for HEALING and $77 for HEALING+.0x18BE5-0x18C930x18D46-0x18D790x18E71-0x18EC8Verified
A player's character killed in battle loses all its experience: when the hit points reach 0, the routine that takes damage off them marks the combatant dead and, on the player's side, puts its experience back to 0. In the probe the kill was code $A4's 999 damage.0x1C265-0x1C2D7Verified
Each combatant gets as many attacks in a battle as its class gives for its row, the front-row count in the front row and the back-row count in the back, and attacks with its class's attack for that row (spells, codes from $C0, weren't compared). In the battle measured, every combatant attacked once before any attacked a second time, and the battle ended at the enemy's death with attacks left unused.0x1EF5C-0x1EF870x182FE-0x183170x18AB1-0x18AE9Verified
Each attack has one of six elements: fire, cold, lightning, black, physical or white. A code below $A9 carries its element in its bits 2 to 4, numbered in that order from 0 (so codes $10 to $13 are physical, $14 to $17 white, $20 to $23 fire); code $A3 and codes $A9 to $AD are physical, $AE, $AF and $B1 to $BF black, and $B0 lightning. A player's character making a physical attack by Strength (codes $00 to $1F) while holding one of items 1 to 70, from the Sonic Blade to the Battle Bugle, attacks with the item's element instead (ogre-battle-snes-tables/items); one holding item 199 or higher takes, the same way, a byte past the end of that table.0x18B0D-0x18B440x25B32-0x25B58Verified
NINJUTSU (the Ninja's and Ninja Master's) and MAGIC (the Wizard's, Mage's, Sorcerer's and Lich's) take the element their first target's class resists least: NINJUTSU from fire, cold and lightning, MAGIC from those, black and physical, the earlier in that order on a tie. They read the class's resistances (ogre-battle-snes-tables/classes), not a player's character's own. The Ninja's NINJUTSU becomes magic code $21 plus 4 times the element, and the Wizard's MAGIC (and the Sorcerer's front-row one) $20 plus 4 times; the Ninja Master's NINJUTSU becomes $61 plus 4 times, and the Mage's, Lich's and Sorcerer's back-row MAGIC $60 plus 4 times.0x18EEA-0x18F6C0x18F87-0x18F950x18B65-0x18BA7Verified
Some classes' attacks stand for others, chosen as the attack is made. The Cerberus's back-row attack, the front-row attacks of the Wise Man, the Diablos, the Queen, the Hilander, the Princes and the Dandies, and the Geminis' attacks each pick an entry of a list of attack codes at random. The Hilander's and the Princes' back-row attacks and the Generals' 95 to 98 take the entry for the attacks the combatant has left: with 1 left, the list's first entry, which is IAINUKI for the Hilander, an ordinary $10 for the Princes, and BLADE, codes $AF and $B0 (skill-damage) and the Devil's METEOR for Generals 95 to 98. A Gemini's back-row attack with 1 attack left becomes code $AB, which doubles the attack's score (skill-damage). It does so once, setting a battle flag that stops it again until the flag is cleared, and only while neither of the computer's characters 100 and 101 has its dead mark.0x18F6D-0x18FF70x1901E-0x190740x20588-0x2058DVerified
Before a battle's attacks, the combatants are put in order by a priority, highest first, and equal priorities keep their places in the battle's list. The priority is Agility, plus half Luck, plus the class's terrain coefficient for the battlefield times a random 3 to 9. An enemy's Luck is read one row on in the classes table, from the next class: a Fighter counts the Knight's 50 rather than its own 45. A dead, stunned or petrified combatant gets 0, as does one with a fourth status mark not identified here.0x18712-0x18827Verified
A unit moves on the map by the movement type of its heaviest member, by the classes' weight column (ogre-battle-snes-tables/classes); among members of equal weight, by the type that comes first in the grid's order (HIGH SKY first, SLOW last), and a unit with no member heavier than 0 moves as SLOW. A dead member counts with its own class's weight but moves as SLOW, the type of class 33's row. The unit's speed on a terrain is the grid's speed for its type and the terrain (ogre-battle-snes-tables/terrain-movement); terrain codes 20, 21 and 254, past the grid's 20 columns, read the last column (Town), and a place off the map gives a speed of 256, which is the grid's speed on walls for every type but HIGH SKY (1440) and LOW SKY (896).0x2CF72-0x2CFC60x54D0-0x54FDVerified
A stage's shop lists the five items of the stage's row in ogre-battle-snes-tables/stages, each line set up with the item's kind sign, its name and its value (ogre-battle-snes-tables/items) as the price. Buying some number of an item comes to 10 times the number times the value, and the most of an item the player's gold covers is the gold divided by 10 times the value, rounded down; the shop then allows at most 99 (shop-limit).0x29C40-0x29CA70x29D19-0x29DE1Verified
A shop sells at most 99 of an item at once: when the most the player's gold covers (shop-price) is 99 or more, the buy step makes it 99.0x29D4D-0x29D5ECode
For most towns, a town pays more aid the bigger it is, the higher its morale and the nearer its compatibility number to the Lord's, and more as the reputation meter (the Chaos Frame) rises; for the largest it is the other way round. The game works the aid out as the population times 100 less the gap between the two compatibility numbers plus the morale, over 200; then that times the Chaos Frame plus 150, over 200. Each division rounds down, and a dividend of 65,536 or more is halved until it fits in 16 bits and the quotient doubled back as often, so a large result drops to a multiple of 2, 4, 8 or more. A first result of 32,768 or more is taken as a negative number, and the town then pays 65,536 less an amount that grows with the Chaos Frame, so less as the meter rises. Of the tables' towns, this happens to four on Dragon's Haven when the Lord's class is 78 or 80, three when it is 79 and two when it is 81.0x3B84-0x3BFA0x0782-0x07BC0x0803-0x08390x089F-0x08F80x280B0-0x280C3Verified
At the settlement, which the booklets put at noon, the game adds to the player's money the aid (town-aid) of every town the player holds, or nothing once the stage is marked cleared, and takes away the cost of every character in the units on the map, the ten map slots, except dead ones. Money is capped at 99,999,999. When the result would be below 0, the game doesn't store it: it opens a screen and works the settlement out again after it.0x2A7F4-0x2A8210x2B3B5-0x2B4850x2D04E-0x2D0910x2B345-0x2B3720x1C2B1-0x1C2B6Verified
The recruit menu's setup builds a list of classes picked by the unit's leader: by the leader's class, so a Knight leader's list is Fighters, a Witch's Hellhounds, a Cleric's Amazons, a Shaman's Clerics and Angels, a Monk's Knights, Shamans and Cherubim, a Sorcerer's Skeletons and Ghosts and a Dragoner's Dragons and Wyverns; 39 of the 101 classes have a list and the others' entries are empty. Six named characters have lists of their own whatever their class: Tristan's is Knight, Samurai, Mage, Shaman and Mermaid, and Galf's Hellhound and Pumpkin, the list a Witch with a particular flag gets too. Beside the list the setup stores a level, the leader's less 2 and at least 1.0x10967-0x109CB0x10960-0x109660x4ABC2-0x4AD4BVerified
The class-change menu offers the whole class-change list the game builds for the character (ogre-battle-snes-tables/classes): the list's length is the menu's count, and the class picked is the list's entry at the cursor, so a class that comes earlier in a promotion line, such as a Knight's FIGHTER, is offered too. After a yes to a confirmation the class number is written to the character.0x118C6-0x118E30x11943-0x119490x119B5-0x119E20x11A00-0x11A64Code
When the random check of neutral-trigger runs for a unit on the map and finds a neutral for its terrain, the neutral appears with a chance set by the unit leader's Luck less the neutral class's base Luck: 48 or more below gives 0%, 32 to 47 below 1%, 16 to 31 below 3%, 1 to 15 below 5%, 0 to 16 above 10%, 17 to 32 above 15%, 33 to 48 above 20%, and more 25%. The game draws a number below 100 and the neutral appears when it is below the chance.0x2912C-0x2915D0x2920F-0x29260Verified
A routine of the map, whose caller wasn't read, goes on only when a counter of the game's clock is a multiple of 10. It then draws one of the ten map slots at random; if that slot holds a unit that has been given a destination, it reads the terrain under the unit, and for each of the stage's three neutral encounters (ogre-battle-snes-tables/encounters) set on that terrain, in turn, it makes the neutral at its class and level and tries the chance (neutral-chance), leaving the loop when one appears.0x290B3-0x2912B0x2915E-0x291870x3C0E-0x3C21Code
Once the player has picked the character and said yes, equipping an item makes it the character's item, takes one from its stock stack (emptying the slot at the last), and changes the character's six resistances by the item's bonus columns, less those of the item it held, the same for a small character, a large one and the Lord.0x30DF5-0x30E2D0x30E7F-0x30F3BVerified
The opening answers add their four points to four tallies, in the order Ianuki, Phantom, Ice Cloud and Thunder, and the bonus card raises or lowers each of the Lord's seven stats by a random amount from 0 to the card's value. The tallies then rank three Lord types: the winner of the pair Ianuki-Phantom and of the pair Ice Cloud-Thunder, a tie going to the earlier, and a third candidate, ordered by tally with a tie keeping the earlier. For the third candidate the game compares the Ice Cloud-Thunder loser's tally with a byte of scratch memory at the address equal to that tally (for a tally of 10, the byte at $000A), not with the other loser's tally: when the tally is at least that byte it takes that loser, else the Ianuki-Phantom loser. So first is always the type with the most points (on a tie, the earliest), but second can pass over the type with the second most: in a call with tallies 11, 11, 10 and 10 and the scratch bytes set to 0, the ranking was Ianuki, Ice Cloud, Thunder. With a mode byte at 0, as the probe set it, the three types pick the starting rosters: the first type's Lord unit and three units, two of the second type's and one of the third's.0x272C8-0x273240x27614-0x276960x27717-0x277EDVerified
A routine of the battle code takes 1 Charisma from each member of a side's battle list, never below 0, skipping members the battle has flagged with bit $80 or $01. One battle routine calls it when bit 3 of $7E:F931 is clear; when the bit is set it skips the call.0x23B54-0x23B7F0x1DB64-0x1DB8ECode
A routine gives the army an item by chance, with odds set by a unit leader's Luck: 1 in 10 below Luck 11, 2 below 26, 3 below 41, 4 below 51, 5 below 61, 6 below 76, 7 below 91, and 8 from 91. The item is one of the 92 pieces of equipment numbered 8 to 99 (ogre-battle-snes-tables/items), drawn as 8 + (r x 92) / 256 for a byte r of the random pool, so 72 of them come from 3 values of r in 256 and 20 from 2.0x2C01E-0x2C0640x2C065-0x2C0A10x2C456-0x2C459Verified
In the battle measured, the level-up check ran once, after the battle's last attack.0x239E6-0x239FCVerified
A new game starts the Chaos Frame, the reputation meter, at 50. After the hero's name the game asks "Please tell me your sex", with Male and Female to choose from on one line, and keeps the answer as 0 for Male and 1 for Female.0x0395-0x03AB0x26F93-0x26FAF0x8C28E-0x8C2BB0x1835B-0x1836FVerified
The Chaos Frame is a number kept from 0 to 100. Every change is added to it in 8 bits and the result held: a result below 0, or of 128 or more, becomes 0, and one from 101 to 127 becomes 100.0x2872F-0x28742Verified
When a town changes hands, the game runs a routine with the map slot of the unit that took it (ogre-battle-snes/chaos-sources). For a unit in one of the first ten slots (0 to 9) it takes the average alignment of the unit's members, rounded down; subtracts the distance between the town's compatibility number and that of the class of the first member carrying a particular flag, likely the unit's leader; subtracts the town's morale; reads the result as a signed byte, so a total below -128 wraps round to a positive one and one above 127 to a negative one; divides it by 20, rounding toward 0; and adds that to the Chaos Frame, which moves at most 6 either way. For a unit in slot 10 or above the Chaos Frame loses 5. The average has a flaw: once the alignments added so far pass 255, each further member's alignment is read 256 bytes on for every 256 passed, from bytes that aren't alignments.0x28743-0x287E50x29A7C-0x29AA90x0703-0x07300x280B8-0x280C30x28994-0x289980x28A58-0x28A5DVerified
Clearing a stage adds 0 to 5 to the Chaos Frame. The game averages, over the stage's towns the player holds, 100 less the distance between the Lord's compatibility number and the town's; divides that by 20, rounded down; and adds the stage's day goal less the days spent on the stage. With no town held, the towns' part is 0. A total from 0 to 4 is added as it is. Any other total adds 5, a negative one too, so a stage cleared late still adds 5.0x2A4D5-0x2A4FD0x2A78A-0x2A7F30x0101-0x010D0x280E4-0x280ED0x28040-0x28045Verified
The game's day routine adds a day to the days spent on the stage and to the days in all, which stop at 999, and takes 1 off the Chaos Frame when the days on the stage now pass the stage's day goal, or when the stage has already been cleared.0x2B311-0x2B3440x3B69-0x3B830x28436-0x28442Verified
Five tarot cards change the Chaos Frame when drawn: LOVERS and TEMPERANCE add 2, DEATH takes 2 off, DEVIL takes 1 off, and FORTUNE adds or takes off 1, 2 or 3, the amount and the direction drawn from the game's random numbers.0x328DB-0x3291E0x32B1B-0x32B300x32C42-0x32C900x32D3F-0x32D6AVerified
No absolute or long reference to the Chaos Frame in the code lies outside the ways the other claims give: taking a town, an enemy taking one, clearing a stage, each day at noon, five tarot cards, and a command in the event language that adds an amount of its own. No battle routine refers to it: a fight moves it only through the alignments it changes (ogre-battle-snes/alignment-after-kill), which the next town taken averages. Event scripts can also branch on it.0x0000-0x17FFFF0x2C26D-0x2C2730x2C2C4-0x2C2EDWiki
The ending routine picks one of 13 endings, numbered 0 to 12 here. On Dragon's Haven it gives 12, whatever else holds. Otherwise it scores the Lord's alignment plus the Chaos Frame plus how many of 15 treasures the army has: BRUNHILD, GRAIL, ARMBAND and the 12 gems from GARNET to TURQUOISE, each counted once, in the stock or held by any character in the army. From 125 up: all 15 with Rauny and Tristan both in the army give 0; failing that, BRUNHILD, GRAIL and ARMBAND give 1 for a male Lord and 2 for a female; failing that, a male Lord gets 3 with Rauny and 5 without, a female Lord 4 with Tristan and 6 without. From 50 to 124: 7 with Tristan, 8 without. Below 50: 9 with Galf in the army; without him, 10 if the Lord's Charisma is 50 or more and 11 if not.0x2B90D-0x2B9F70x2BA05-0x2BA190x2BA49-0x2BA710x2B8D6-0x2B8E4Verified
The game runs the ending routine when the stage-clear routine finishes Temple Shalina (stage 24), after a closing sequence, or Dragon's Haven (stage 29), straight away.0x2A524-0x2A53B0x2C776-0x2C791Code notes
Each ending's script shows messages from the game's text. Matched by the message numbers in each script, whose commands weren't decoded, ending 0 shows "King Tristan Zenobia", "Queen Rauny Zenobia" and "the Hero and friends headed again for the wilderness". Endings 1 and 2 show "You are now following the Way of Kings", and Prince Fichs Tristoram "a loyal supporter of the new King of Zenobia". Ending 3 shows Tristan saying "I have no need for a kingdom" and "With Rauny taking the throne". Ending 4 shows Tristan saying "Tomorrow is our wedding day". Endings 5 and 6 show Tristan saying "You should become king", the line "My journey is only just beginning", and "long peace under King Tristan". Ending 7 shows "I want you to become the general over my armies" and "As general, you served your king well". Ending 8 shows Tristan saying "we cannot allow you to live" and Lans "Hero! Prepare yourself!". Ending 9 shows Galf saying he will "create an empire of absolute evil". Ending 10 shows "The empire you built" known as the "Black Empire". Ending 11 shows "Liberation Forces led by a young Prince Tristan" that "destroyed you and your army". Ending 12, Dragon's Haven's, shows that the war "was only beginning".0x2B8DF-0x2B9040x2C144-0x2C1530x2BF93-0x2BFB20x29E85-0x29ECB0x3B950-0x3BD42Code notes