Claim set · data/claims/dw2.yaml

Dragon Warrior II (Nathan-R-Og/dq2)

Game: Dragon Warrior II.

In Dragon Warrior II (the North American NES release), each step draws a random byte from 1 to 255 and starts a fight when the terrain's rate is at least that byte: on the world map 10 on grass, 16 in forest, desert, and swamp, 25 on mountains, and 4 at sea; 8 on maps numbered $2B and up and in Moonbrooke, while the other maps below $2B have none. dw2/encounter-rate

About: Dragon Warrior II Random encounter

Value
{
 "rates": {
  "grass": 10,
  "forestDesert": 16,
  "swamp": 16,
  "mountain": 25,
  "sea": 4,
  "dungeon": 8
 },
 "of": 255,
 "noEncountersBelowMap": 43
}
Codedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L54-L58B04_802D: jsr B0F_C3AB ; generate a random number and store it in $32-$33 (two passes) … beq B04_802D ; keep cycling through random numbers until $32 is not #$00dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L62-L69 cmp #$01 ; Map ID #$01: World Map … cmp #$09 ; Map ID #$09: Moonbrooke beq @B04_8066 ; override terrain ID to Terrain ID #$02: Dungeon, Lava, Tower, Castle … sbc #$2B ; aside from the world map and Moonbrooke, map IDs < #$2B do not have random encounters bcc B04_806D ; no encounterdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L159-L163 lda B04_832C, x ; per-terrain encounter rates cmp $32 ; RNG byte 0; compare to previously generated non-zero number bcc B04_806D ; no encounter; encounter rate < RNG => no encounterdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L648-L656B04_832C: .byte $0A ; Terrain ID #$00: Grass … .byte $08 ; Terrain ID #$02: Dungeon, Lava, Tower, Castle .byte $04 ; Terrain ID #$03: Sea .byte $10 ; Terrain ID #$04: Forest, Desert .byte $19 ; Terrain ID #$05: Mountain .byte $10 ; Terrain ID #$06: SwampDragon Warrior II (USA) · 0x1033C-0x10343 — bank 4 $832C, the eight rates as the ROM has themChecked by claude-agent, 2026-10-21 — read the three ranges and the table's bytes in the ROM; the step handlers in the fixed bank (constant.asm) jump to $C87F, which calls this routine

Cited by: Dragon Warrior II, Random encounter

In Dragon Warrior II (NA NES), a hero's attack takes X=A−⌊D/2⌋, attack power less half the monster's defense; if X is under 2 the hit deals 0 or 1, and otherwise ⌊Xr/256⌋, where r is 8 plus the sum of sixteen random 0–15 rolls (8 to 248, centered on 128), so about half of X; a hero under Surround deals 0 one time in 4. dw2/hero-damage

About: Dragon Warrior II Damage formula

Value
{
 "defenseDivisor": 2,
 "spread": [
  8,
  248
 ],
 "centre": 128,
 "of": 256
}
Codedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L6284-L6290B04_A624: ldy #$0B lda ($B9), y sta $99 ldy #$06 lda ($B7), y sta $9Bdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L9138-L9142 — the battle record's byte 6 is a copy of the monster's Defense Power, stat byte 6B04_B6AB: ldy #$06 lda ($BB), y ldy #$06 sta ($B7), ydq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L5098-L5126B04_9F45: lsr $9C ror $9B jsr B04_A0E3 ; 16-bit subtraction: ($99-$9A) = ($99-$9A) - ($9B-$9C) … cmp #$02 … jsr B04_9FFB ; set $9B to a random number tightly distributed around #$80 and $9C to #$00 jsr B04_A05B ; 16-bit multiplication: ($99-$9A) = ($99-$9A) * ($9B) … B04_9F67: lda #$02 …dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L6299-L6309 ldy #$00 lda ($B9), y and #$02 beq B04_A656 lda #$04 jsr B04_A020 … bne B04_A656 lda #$00 sta $B0 sta $B1dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3025-L3025Midenhall status (80 = Alive, 40 = Sleep, 20 = Poison, 10 = ?, 08 = ?, 04 = In Party, 02 = Surround, 01 = Silence)dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L5214-L5240B04_9FFB: lda #$0F ; sum up random 4-bit numbers … lda #$88 sta $9B B04_A003: ldx #$10 ; 16 loops of summing random N-bit number … and $9F clc adc $9B … …Checked by claude-agent, 2026-10-21 — read the attack handler's load of attack power (hero byte $0B, labelled Midenhall Attack Power at $0638) and the monster's defense, then the subtraction, the under-2 branch, the bell roll ($88 plus sixteen masked bytes less $80), and the multiply whose upper bytes are kept, as B04_AE8C's comment "tightly distributed around A / 2" says, then the Surround check on the attacker's status byte (bit $02 in the status legend)

Cited by: Damage formula, Dragon Warrior II

In Dragon Warrior II (NA NES), a hero's attack is "a tremendous blow" on a roll of 1 in 64, or 1 in 8 with the Sword of Destruction equipped, except against Malroth; with the Sword of Destruction (or Gremlin's Armor or the Evil Shield) a roll of 1 in 4 first freezes the hero under the curse and the attack is lost. A tremendous blow deals half the attack power plus ⌊Ar/256⌋ with the same 8–248 roll, ignores defense, and skips the monster's dodge. dw2/tremendous-blow

About: Dragon Warrior II Critical hit

Value
{
 "chance": [
  1,
  64
 ],
 "swordOfDestruction": [
  1,
  8
 ]
}
Codedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L6241-L6282B04_A5E3: lda #$08 sta $A6 lda #$4C ; Item ID #$4C: Sword of Destruction (equipped) … lda #$40 sta $A6 … B04_A600: lda #$04 jsr B04_A020 … …dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L6334-L6335lda #$42 ; String ID #$0042: No movement was possible, for the curse had frozen [name]'s body.dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L2926-L2926Monster ID #$52: Malrothdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L6529-L6542B04_A7A1: sta $99 lsr sta $A6 lda $99 jsr B04_AE8C ; $B0 = random number tightly distributed around A / 2, $B1 = #$00 lda $A6 clc adc $B0dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L5244-L5279 — the roll redraws until it is below the argument, so B04_A020 with $40 is 0–63 and with 8 is 0–7B04_A020: sta $99 … and $9F cmp $99 bcs B04_A044Checked by claude-agent, 2026-10-21 — read the hero's attack handler from the Sword of Destruction check, through the 1-in-4 curse roll at B04_A600 that jumps to the frozen message at B04_A679, to the jump past the dodge check at B04_A656, the tremendous-blow damage at B04_A7A1, and the redraw loop of B04_A020

The curse check runs before the critical roll, so with the Sword of Destruction the hero attacks 3 times in 4 and each of those is a tremendous blow 1 time in 8.

Cited by: Critical hit, Dragon Warrior II

In Dragon Warrior II (NA NES), after a hero's normal hit is rolled, a monster that isn't asleep dodges when a roll of 0–63 falls below the high nibble of its second stat byte, which the disassembly calls its "evade chance / 64"; heroes dodge a monster's attack 1 time in 64, and the Clothes Hiding adds a second chance of 1 in 8. dw2/monster-dodge

About: Dragon Warrior II Hit chance

Value
{
 "monster": "e/64",
 "hero": [
  1,
  64
 ],
 "clothesHiding": [
  1,
  8
 ]
}
Codedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L6310-L6329B04_A656: ldy #$00 lda ($B7), y bmi B04_A676 ldy #$01 lda ($BB), y lsr lsr lsr lsr sta $A6 lda #$40 …dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L5079-L5079Enemy Stats (Max HP, [4-bit evade chance / 64, 4-bit unused]dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L6180-L6199 — Sleep sets the record's top bit; resistance 1 is the Sleep field of stat byte 7 (B04_A74A)B04_A580: lda #$80 sta $A1 lda #$01 … jsr B04_A74A ldy #$00 lda ($B7), y and $A1dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L6935-L6958B04_A9D3: and #$40 bne B04_A9FF lda #$40 jsr B04_A020 … beq B04_A9EE … lda #$52 ; Item ID #$52: Clothes Hiding (equipped) … jsr B04_B007 bcs B04_A9FF …dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L8011-L8015B04_B007: lda #$08 jsr B04_A020 … cmp #$01 ; 1/8 Heroic Attack, DefeatChecked by claude-agent, 2026-10-21 — read the hero attack's dodge check, the stat-table layout comment, the Sleep handler that sets bit 7, and the monster attack handler's dodge for a hero

Cited by: Dragon Warrior II, Hit chance

In Dragon Warrior II (NA NES), each round every living hero and monster gets a key of half its agility, rounded down, plus a random byte plus a random 0 or 1, capped at 255, and a selection sort sets the order from the highest key down. dw2/turn-order

About: Dragon Warrior II Turn order

Codedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L9168-L9210B04_B6DC: … sta $06C7, x ldy #$0A lda ($B9), y jsr B04_B790 … sta $06C7, x ldy #$04 lda ($BB), y jsr B04_B790dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L4814-L4823 — a hero's agility is byte $0A of its record; a monster's is stat byte 4 (the Enemy Stats comment at L5079) ldy #$09 ; offset for STR … iny lda $9A ; current AGI … sta ($C3), y ; update hero's current AGIdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L732-L760B0F_C3B6: ldy #$08 … asl bcc B0F_C3D1 … B0F_C3D1: dey bne B0F_C3B8 rtsdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L9235-L9250B04_B74E: ldx #$00 B04_B750: lda $06D2, x … B04_B75A: lda $A8 cmp $06D2, y bcs B04_B768dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L9274-L9286B04_B790: lsr sta $99 jsr B0F_C3AB … adc $99 bcc B04_B79E lda #$FFChecked by claude-agent, 2026-10-21 — read the order builder (heroes' byte $0A, monsters' stat byte 4), the key at B04_B790, and the descending selection sort; the jsr to B0F_C3AB between the lsr and the adc leaves the carry from the generator's last shift (constant.asm L733-L760), so the adc adds a random 0 or 1

Cited by: Dragon Warrior II, Turn order

In Dragon Warrior II (NA NES), a battle opens with a roll of 0–31: on 0 the monsters "did not see" the party and lose their first round, and on 1 they attack "before [the hero] was set for battle" and the heroes lose theirs. dw2/surprise

About: Dragon Warrior II Turn order

Value
{
 "partyFirst": [
  1,
  32
 ],
 "monstersFirst": [
  1,
  32
 ]
}
Codedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3120-L3146 lda #$20 jsr B04_A020 … sta $06DD cmp #$01 bcc B04_957D bne B04_9585 lda #$03 ; String ID #$0003: [name] attacked![end-FC] … lda #$04 ; String ID #$0004: Before [name] was set for battle.[end-FC] … B04_957D: …dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3241-L3258 lda $06C7, x cmp #$18 bcs B04_963C cmp #$03 bcc B04_962E and #$07 ldy $06DD cpy #$00 beq B04_963C … B04_962E: ldy $06DD …dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3298-L3299 lda #$FF sta $06DDChecked by claude-agent, 2026-10-21 — read the opening roll, the action loop that skips monsters (keys $10 and up) when the flag is 0 and heroes when it is 1, and the reset to $FF after the round

Cited by: Dragon Warrior II, Turn order

In Dragon Warrior II (NA NES), the party runs when the first hero chooses to; it never escapes a boss (monster $4E and up) or one fixed fight in the Sea Cave, always escapes in the round the monsters "did not see" it, and otherwise fails 1 time in 3. dw2/run

About: Dragon Warrior II Fleeing

Value
{
 "chance": [
  2,
  3
 ]
}
Codedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3152-L3200 lda $062F ; Midenhall Battle Command cmp #$32 beq B04_9595 … lda #$0F ; String ID #$000F: [name] broke away and ran.[end-FC] … cmp #$4E ; bosses start at #$4E … bcs B04_95D2 ; can't run away from bosses … beq B04_95D2 ; can't run away from this fixed combat either … …Checked by claude-agent, 2026-10-21 — read the round's run check from Midenhall's command to the escape flag; the surprise flag $06DD is 0 only in a round the party opened (dw2/surprise)

Cited by: Dragon Warrior II, Fleeing

In Dragon Warrior II (NA NES), as in Dragon Warrior, each monster starts a fight with its base HP less up to a quarter; the order changes, as Dragon Warrior II quarters the base HP before multiplying by a random byte, H−⌊⌊H/4⌋r/256⌋, where Dragon Warrior quarters the product. dw2/monster-hp

About: Dragon Warrior II Damage formula

Codedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L9138-L9162B04_B6AB: … ldy #$00 lda ($BB), y sta $99 lsr $99 lsr $99 … lda $32 ; RNG byte 0 … sta $9B jsr B04_A05B …dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L6614-L6652LE599: LDA EnBaseHP ;Prepare to multiply enemy HP by random number(0 to 255). … LE5B0: LSR ;Take upper byte of result and divide it by 4. … LE5B8: SBC MultRsltLB ;Checked by claude-agent, 2026-10-21 — read both setups; Dragon Warrior II quarters the max HP byte before multiplying by the random byte, Dragon Warrior quarters the product's upper byte

Cited by: Dragon Warrior II

Dragon Warrior II (NA NES) changes Dragon Warrior's battle rules: the hero's 1-in-32 "excellent move" becomes a 1-in-64 "tremendous blow", the fixed alternation of hero and monster becomes a round order sorted by half the agility plus a roll, and running no longer weighs the hero's Agility against the monster. dw2/changes-dw1

About: Dragon Warrior II Turn order

Codedragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L6724-L6759LE624: AND #$1F ;Did player get an excellent move(1/32 chance)?dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L6249-L6250 lda #$40 sta $A6dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L6803-L6807LE691: JMP StartEnemyTurn ;($EB1B)It's the enemy's turn to attack.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7772-L7777LEBE6: JMP StartPlayerTurn ;($E5CE)It's the player's turn to attack.dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L9274-L9286B04_B790: lsr sta $99dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L8290-L8325LEEE6: LDA DisplayedAgi ;dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3191-L3197B04_95BF: lda $06DD beq B04_95CB lda #$03 jsr B04_A020Checked by claude-agent, 2026-10-21 — read each pair; dw2/tremendous-blow, dw2/turn-order, and dw2/run give the Dragon Warrior II sides in full, dw1/excellent-move, dw1/turns-alternate, and dw1/run the Dragon Warrior ones

Cited by: Critical hit, Dragon Warrior, Dragon Warrior II, Fleeing, Turn order