Claim set · data/claims/arcana.yaml

Arcana's battle and encounter rules (Arcana (USA), our own disassembly notes)

Game: Arcana.

In a dungeon a step can start a random battle, about 1 step in 11.6 on one class of tile (computed: a draw out of 12 coming up 0, 22 of the 256 values the random byte can take) and 1 step in 4 on a second class (computed: a draw out of 4, 64 of 256); every other tile starts none, except a boss tile. The tile also picks which of the chapter's monster groups appears. A boss tile with an entry in the chapter's boss list starts that entry's battle for certain while the entry's flag is clear; once the flag is set the tile starts nothing. A chest tile opens its chest instead. arcana/encounter-roll

About: Arcana Random encounter

Value: 0x10-0x1 F 22/256 · 0x20-0x2 F 64/256

CodeArcana (USA) · 0x1A457-0x1A478 — $03:A457-$A478: the value is the byte at $7F:FC00 + 32 x row + column, 0 off the gridArcana (USA) · 0x1A494-0x1A4AB — $03:A494-$A4AB: on entering a tile, store its value in $16F5Arcana (USA) · 0x8D00-0x8D0A — $01:8D00-$8D0A, in the dungeon step script: call the chest check at $18:8423, then $18:800B, and if it returns true go to the random battle at $01:8DAEArcana (USA) · 0xC000B-0xC0055 — $18:800B-$8055: on a $70 tile with an entry in the boss list ($18:80F8, which skips an entry whose flag is set), its group is stored in $18E1, and a group below $10 there forces a draw out of 1; otherwise value < $10 or >= $30: no battle; < $20: draw out of 12 (LDX #$000C); else draw out of 4; a draw other than 0: no battleArcana (USA) · 0x9F1-0xA38 — $00:89F1-$8A38, the random routine: a draw out of n is the high byte of n x the generator's low byteArcana ROM map · ROM map, Bank $18 — Data Crystal's label for $18/8044Encounter rate (higher = fewer encounters) (Default $0C)Arcana (USA) · 0xC0135-0xC0144 — $18:8135-$8144, in the boss lookup: test the entry's bit in $18DF (LDA $18DF; AND $008C34,X); if set, return no entry ($18:8133: CLC)Arcana (USA) · 0xC0423-0xC042A — $18:8423-$842A: the chest check runs on a tile of value $80 (CMP #$0080)Arcana (USA) · 0xC0056-0xC007C — $18:8056-$807C: the group is the chapter's list ($18:913D by $18CD) skipped by (value & $0F) entries of (first byte & $0F) + 2 bytesChecked by claude-agent, 2026-11-08 — read the tile lookup, the step script's call and the encounter routine at the pinned ranges, and counted the random bytes that give each draw 0Revised after a check by a second AI model, 2026-11-08.

The tile's encounter value comes from a 32 by 32 grid at $7F:FC00 and is kept in $16F5. Values $10-$1F are the first class, $20-$2F the second; below $10 and from $30 up no battle starts; $70 is a boss tile (the boss list at $18:9101, its flags in $18DF) and $80 a chest. The low four bits pick the group. Data Crystal's rate byte at $18:8044 is the start of the instruction that loads it; the 12 itself is at $18:8045 and governs only the first class, while the second uses the 4 at $18:804A. The counts assume every byte value can come up; which values the generator reaches was not measured.

Cited by: Random encounter

A random battle draws its opening out of 32: 0 gives a first strike and 1 an ambush under the banner "Yikes!!" (8 of the 256 random values each, computed), 2 to 31 an ordinary start under "COMBAT". In an ambush the party sits out the first round: party members are skipped until the first monster acts. A first strike is meant to skip the monsters, but it is cancelled on the first party member taken, before any monster comes up, so those battles play as ordinary ones and show "COMBAT". A scripted battle opens ordinarily, or as an ambush in one scripted case. arcana/battle-opening

About: Arcana Random encounter

Value: first strike 8/256 · ambush 8/256

CodeArcana (USA) · 0xC00BD-0xC00E7 — $18:80BD-$80E7: if $1901: 2 when $18FF = $19, else 3; otherwise draw out of 32, values 2 and up become 2, plus 1, into $1579Arcana (USA) · 0x4905-0x494E — $00:C905-$C94E, the round builder, slot by slot (party slots 0-3 first): skip a fighter whose state is 1 or 2; opening 1 skips monsters, opening 2 skips party members; any fighter taken sets the opening to 3Arcana (USA) · 0x3B645-0x3B68C — $07:B645-$B68C: the banner text for openings 1, 2 and 3, from the pointer tables at $07:B68D, $07:B6B1 and $07:B6D5Arcana (USA) · 0x40EF0-0x40F1C — $08:8EF0, "Yikes!!", and $08:8F0C, "COMBAT"Checked by claude-agent, 2026-11-08 — read the opening draw, the round builder and the banner routine at the pinned rangesRevised after a check by a second AI model, 2026-11-08.

The opening is kept in $1579 (1 first strike, 2 ambush, 3 ordinary). The round builder at $00:C905 takes the party's slots before the monsters'; opening 1 skips monster slots, opening 2 party slots, and any fighter taken sets the opening to 3. A scripted battle is one with $1901 set; the ambush case is $18FF = $19. The banner tables for openings 1 and 3 both point at "COMBAT".

Each round the game draws who acts next, with chances in proportion to a quarter of each fighter's Alertness (at least 1): it sums those weights over the fighters taking part, takes a random number modulo the sum, and picks the first fighter whose running total is above it. arcana/turn-order

About: Arcana Turn order

CodeArcana (USA) · 0x494F-0x49BA — $00:C94F-$C9BA: weight = Alertness ($126B) / 4, at least 1, for each fighter in the round's mask; running totals in $112B; random modulo the total; the first fighter whose total is above it goes next into $1143Checked by claude-agent, 2026-11-08 — read the weighting and the first draw at the pinned rangeRevised after a check by a second AI model, 2026-11-08.

A weapon attack hits when a random number modulo 255 is below the hit chance: the attacker's accuracy less the target's evasion plus 245, capped at 255 (a result below 0 also reads as 255). Accuracy is 3 x (Alertness / 8 + 1) plus 64; one of its two flag bits sets the 64 to 127 and the other to 0. Evasion is the same figure from the target's evasion flags, plus 26 when bit 8 of the target's state is set and a row term of 0, 0, 26, 51 or 76. The same random number makes the hit a critical when it is also below the weapon's critical byte. arcana/hit-chance

About: Arcana Hit chance

CodeArcana (USA) · 0x4055-0x40CA — $00:C055-$C0CA: evasion = C494(target, evasion) + 26 if the target's state has bit 8, + the row term ($00:C16C by C5B1); chance = C494(attacker, accuracy) - evasion + $F5, capped at $FF; r = random mod $FF; r >= chance: miss; r < the critical byte (C6DC): criticalArcana (USA) · 0x4494-0x44C9 — $00:C494-$C4C9: 3 x (Alertness / 8 + 1) plus the buff value ($00:C04F: $80, $FF or 0, by the flags at $12E3) x $80 / 256Arcana (USA) · 0x4585-0x45B0 — $00:C585-$C5B0: the buff index: 2 if one flag bit is set for the stat, 4 if the other, else 0; monsters' flags are the word after the party'sArcana (USA) · 0x467C-0x4689 — $00:C67C-$C689: (Alertness / 8 + 1) x 3Arcana (USA) · 0x404F-0x4054 — $00:C04F: the buff values $80, $FF, 0Arcana (USA) · 0x416C-0x417F — $00:C16C: the row terms 0, 0, $1A, $33, $4C for hitting, then $00:C176: the row damage factors $100, $100, $E1, $C3, $A3Checked by claude-agent, 2026-11-08 — read the hit roll and its subroutines at the pinned rangesRevised after a check by a second AI model, 2026-11-08.

Which flag bit is a raise and which a lowering wasn't read: the handlers of the Impair and Increase spells (effect classes 5 and 8) are unread.

A weapon hit's damage, with each product rounded down to a whole number: attack = power x (Strength figure x share / 256 + buff + 205 - share) / 256, where the Strength figure is Strength x 191 / 256 + 64, share is the weapon's strength-share byte, power is the weapon's power word (10 bare-handed), and buff is 25, or 50 with one of the attack flag bits set and 0 with the other. Defense = armor x 102 / 256 + shield x 51 / 256 + (Endurance x 223 / 256 + 32) x 51 / 256, plus 25, 50 or 0 by its own two flag bits. The damage is attack x (255 - defense) / 256, times the row factor (1, 1, or about 0.88, 0.76 or 0.64), the element factor, the race factor, 0.75 when bit 8 of the target's state is set and 2 on a critical, before the random spread. arcana/physical-damage

About: Arcana Damage formula

CodeArcana (USA) · 0x40CB-0x416B — $00:C0CB-$C16B: attack (C4CA), defense (C526) plus the buff ($00:C04F x $33 / 256); attack x ($FF - defense) / 256; x row factor ($00:C176); x element factor (C30C); x race factor (C431); x $C0 / 256 if the target's state has bit 8; x 2 if critical; then the spread at $00:C2ABArcana (USA) · 0x44CA-0x4525 — $00:C4CA-$C525: share = C6DC(1); (Strength figure x share / 256 + buff x $33 / 256 + $CD - share) x power (C6DC(2)) / 256Arcana (USA) · 0x4526-0x4565 — $00:C526-$C565: armor (C781) x $66 / 256 + accessory (C7D1) x $33 / 256 + Endurance figure x $33 / 256Arcana (USA) · 0x4658-0x467B — $00:C658-$C67B: Strength x $BF / 256 + $40; Endurance x $DF / 256 + $20Arcana (USA) · 0x488B-0x48C1 — $00:C88B-$C8C1: the 8 x 8 and 16 x 8 multipliesChecked by claude-agent, 2026-11-08 — read the damage routine and each figure's subroutine at the pinned rangesRevised after a check by a second AI model, 2026-11-08.

The row factors are $100, $100, $E1, $C3 and $A3 in 256ths (0.879, 0.762, 0.637). Which flag bit raises and which lowers wasn't read. A monster's share is 205 and its armor 16 (arcana-tables/monster-equipment), so its attack is power x (Strength figure x 205 / 256 + buff) / 256 and its defense starts from 6.

Cited by: Damage formula

Healing spells skip the roll to land, and spells of effect class 8 and up (from Dodge All on, arcana-tables/spells) always land; Ruinous Mission and Flee face only the immunity check. Every other spell rolls to land: chance = its accuracy + the caster's magic figure - the target's, where the magic figure is (Intelligence - 55) x 66 / 256 and 0 below 55 Intelligence; Chaos Wind, Entomb and Destroy add 52 to the caster's side when the element factor is 1.6 and to the target's when it is 0.4. It lands when a random number modulo 255 is below the chance (capped at 255; below 0 it misses). A damage spell then deals power x (205 + (Intelligence - 55) x 393 / 256) / 256, times (255 - magic defense) / 256, then add 1, times the element factor, before the random spread; magic defense is the shield's byte plus (Intelligence - 55) x 99 / 256, capped at 255. Healing spells give their power plus a spread of 13/256. arcana/spell-damage

About: Arcana Damage formula

CodeArcana (USA) · 0x4180-0x41CF — $00:C180-$C1CF: by effect class: 7, only the immunity check; 8 and up, always; 2, healing: power with the spread at 13 ($0D); the rest, the immunity check, then the rollArcana (USA) · 0x41D0-0x4255 — $00:C1D0-$C255: class 3: +$34 to the caster for an element factor of $19A, to the target for $66; + the caster's magic figure, the target's on the other side; chance = accuracy + caster - target; below 0: miss; capped at $FF; r = random mod $FF; r >= chance: miss; class 3 and up: the spell landsArcana (USA) · 0x4256-0x42AA — $00:C256-$C2AA: power x (C6A7(caster) + $CD) / 256; x ($FF - C566(target)) / 256, + 1; x element factor (C2EE); spread at $26Arcana (USA) · 0x468A-0x46DB — $00:C68A-$C6DB: (Intelligence - $37) x $42 / 256, x $189 / 256 and x $63 / 256, each 0 below 55Arcana (USA) · 0x4566-0x4584 — $00:C566-$C584: magic defense = C7D1(2) + C6C4, capped at $FFChecked by claude-agent, 2026-11-08 — read the spell dispatch, the landing roll and the damage at the pinned rangesRevised after a check by a second AI model, 2026-11-08.

Damage gets a random spread on top: with S = base x 38 / 256 + 1 (at most 255), the result is the base plus a random number modulo S, then held between 1 and 999. A base of 100 comes out 100 to 114. Healing spells use 13 in place of 38. arcana/damage-spread

About: Arcana Damage modifier

Value: spread 38/256 · heal spread 13/256 · min 1 · max 999

CodeArcana (USA) · 0x42AB-0x42ED — $00:C2AB-$C2ED: S = (base x $26) / 256 + 1, at most $FF; base + random mod S; below 1: 1; 1000 or more: 999Checked by claude-agent, 2026-11-08 — read the spread routine at the pinned rangeChecked by a second AI model, 2026-11-08.

Cited by: Damage formula

The four elements form a cycle: Wind is strong against Earth, Earth against Water, Water against Fire and Fire against Wind (1.6 times), each element is 0.8 times against itself, 1.2 against the element two steps on and 0.4 against the one that beats it. An attack with several elements takes the average of their factors plus 13/256 for each element past the first, so one with all four does about 1.15 times against any element. A target without an element takes 1 times, plus the same 13/256 for each attack element past the first. A target with several elements is judged by the first of Wind, Earth, Water; the attacker's element is its weapon's, else its own. arcana/elements

About: Arcana Elemental weakness

Value
{
 "Wind": {
  "Wind": 0.8,
  "Earth": 1.6,
  "Water": 1.2,
  "Fire": 0.4
 },
 "Earth": {
  "Wind": 0.4,
  "Earth": 0.8,
  "Water": 1.6,
  "Fire": 1.2
 },
 "Water": {
  "Wind": 1.2,
  "Earth": 0.4,
  "Water": 0.8,
  "Fire": 1.6
 },
 "Fire": {
  "Wind": 1.6,
  "Earth": 1.2,
  "Water": 0.4,
  "Fire": 0.8
 }
}
CodeArcana (USA) · 0x42EE-0x43A9 — $00:C2EE-$C3A9: the attack's elements (a spell's word, or the weapon's top four bits, else the attacker's own); the target's column: 0 for Wind, 2 Earth, 4 Water, else 6; sum the factors at $00:C3AA for each attack element; no target element: $100, else the sum / the count; then, either way, + 13 x (count - 1) ($00:C39E)Arcana (USA) · 0x43AA-0x43C9 — $00:C3AA: 16 factor words in 256ths, by attack element and target column: $CC, $19A, $134, $66 ...Arcana (USA) · 0x43CA-0x43F8 — $00:C3CA-$C3F8: the target's element: its own top four bits, else its armor's, else (monsters) the high byte of its race wordChecked by claude-agent, 2026-11-08 — read the element routine and its table at the pinned rangesRevised after a check by a second AI model, 2026-11-08.

The factor words are $CC (0.797), $19A (1.602), $134 (1.203) and $66 (0.398) in 256ths. Fire and no-element targets share column 6, but a target with no element never reaches the table.

Monsters carry race bits (bit 1 marks the undead), and a weapon hit scales by them: when neither side has race bits of its own the factor is 1; otherwise it is 1.2 when the attacker's race bits, its weapon's included, meet the target's, and 0.61 when they don't. A party member has none of its own, so it hits a monster with race bits at 0.61 unless its weapon carries a matching bit, and at 1.2 with one. Against a party member, the target's bits are the ones its armor and shield don't carry, so a monster with race bits hits at 1.2 unless the defender's armor or shield carries all of them. arcana/race-factor

About: Arcana Type effectiveness

Value: match 1.2 · miss 0.61 · neither 1

CodeArcana (USA) · 0x4431-0x4493 — $00:C431-$C493: attacker bits = own | weapon's; target bits = own | armor's | accessory's, inverted when the target has none of its own; no own bits on either side: $100; attacker & target: $133; else $9DChecked by claude-agent, 2026-11-08 — read the race routine at the pinned rangeChecked by a second AI model, 2026-11-08.

$133 is 1.199 and $9D 0.613 in 256ths.

Before a spell rolls, a check turns some away: a target with race bit $10, which all 16 boss monsters carry, ignores every checked spell whose element word lacks bit $10: Chaos Wind, Entomb and Destroy, the ten paralysis, petrify, stop, sleep and confusion spells, Requiem, Emancipation, Final Liberation, Ruinous Mission and Flee, and a spell with bit 1 (Requiem, Emancipation) affects only targets with race bit 1, the undead. arcana/spell-immunity

About: Arcana Boss fight

CodeArcana (USA) · 0x43F9-0x4430 — $00:C3F9-$C430: spell bits & $11 against target bits & $11: target has $10 and the spell lacks it: no effect; spell has 1 and the target lacks it: no effectChecked by claude-agent, 2026-11-08 — read the check at the pinned rangeChecked by a second AI model, 2026-11-08.

A boss in the battle stops running: if any fighter has race bit $10, which all 16 boss monsters carry, the run command prints "But there was no escape." What happens when no boss is present, and whether that path can still fail, was not read. arcana/run

About: Arcana Fleeing

CodeArcana (USA) · 0x3BF3A-0x3BF53 — $07:BF3A-$BF53: any of the 12 fighter slots with bit $10 in its race word: return 0, else 1Arcana (USA) · 0x2F540-0x2F557 — $05:F540-$F557, the run script: call $07:BF3A; if true, go on at $05:F554 (unread); else the text at $08:886CArcana (USA) · 0x4086C-0x40892 — $08:886C: "But there was no escape."Checked by claude-agent, 2026-11-08 — read the check, the run script and its text at the pinned rangesRevised after a check by a second AI model, 2026-11-08.

A monster whose spell byte isn't 0 chooses its spell 1 time in 2 while its HP is above half its maximum, and 3 times in 4 at half or below. arcana/monster-spells

Value: above half 0.5 · at or below half 0.75

CodeArcana (USA) · 0x38272-0x382B2 — $07:8272-$82B2: spell = $05:D235 + monster; 0: none; max HP ($05:CE55) / 2 < HP: cast unless a draw out of 2 is 0; else cast unless a draw out of 4 is 0Checked by claude-agent, 2026-11-08 — read the routine at the pinned rangeRevised after a check by a second AI model, 2026-11-08.

Reaching level 60 gives Rooks +100 HP, +30 MP and +10 in each stat, against +6, +2, +4, +2, +2, +2 at level 59: the level-up adds the row for the new level, and each character's table has rows only for levels 0 to 59, so level 60 adds the next character's starting row (Sylph's, for Rooks); for Axs it is the 12 bytes after the table. Level 60 is the cap, and its experience still needed is cleared. arcana/level-60

CodeArcana (USA) · 0x3B234-0x3B279 — $07:B234-$B279: level up while the level is below 60 and no experience is still needed; the level goes up by oneArcana (USA) · 0x3B335-0x3B40F — $07:B335-$B40F: row = $05:AD52 + character x $2D0 + level x 12, no check against 60Arcana (USA) · 0x90AA-0x90BC — $01:90AA-$90BC, the level-up script: the check, the increase, the new experience still needed, then the rowArcana (USA) · 0x3B410-0x3B43B — $07:B410-$B43B: at level 60 the experience still needed is clearedChecked by claude-agent, 2026-11-08 — read the level-up script and routines at the pinned ranges and decoded row 60 for each characterRevised after a check by a second AI model, 2026-11-08.

The spirit in the party has no experience of its own: its level is set to Rooks' whenever his goes up, the experience routine returns at once for its slot, and its equipment figures come from tables by a quarter of that level (arcana-tables/spirit-equipment). A spirit, Teefa or Axs joining the party takes Rooks' level. arcana/spirit-level

CodeArcana (USA) · 0x3B256-0x3B279 — $07:B256-$B279: the spirit slot (slot 1) is not increased; after Rooks' level goes up, the spirit slot's level ($137D) is set to itArcana (USA) · 0x3B410-0x3B41B — $07:B410-$B41B: the experience subtraction returns at once for slot 1Arcana (USA) · 0x3B2AB-0x3B2E1 — $07:B2AB-$B2E1: a joining character 1 to 5 or 8 (the four spirits, Teefa, Axs) copies Rooks' level ($137B)Checked by claude-agent, 2026-11-08 — read the level routines at the pinned rangesChecked by a second AI model, 2026-11-08.

The spell list has two field spells meant, by their names, to reduce encounters: diminish Encounters (4 MP) and diminish Encounters 2 (8 MP). What they change is unread; the step routine's roll reads only the tile's value. arcana/diminish-encounters

About: Arcana Random encounter

UnsourcedRevised after a check by a second AI model, 2026-11-08.

Both are effect class 13, with Home and the two Way Point spells.

Cited by: Random encounter