| Critical hit | | | | |
| Damage formula | - The hero's attack power is Strength plus the weapon's bonus; defense power is half of Agility, rounded down, plus the armor's and shield's bonuses, plus 2 with the Dragon's Scale. Code
PlyrCalcHitDmg takes , the hero's attack power less half the monster's defense byte; if , damage is for a random byte , so from to . Code- When , the hero deals 0 or 1 damage, each half the time. Code
EnCalcHitDmg takes , the monster's attack less half the hero's defense power; if , it uses the hero's normal formula, and otherwise the monster deals , from 0 to about . Code- A monster's HP is its base value less up to a quarter, ; the Dragonlord's final form always has its base HP. Code
- The hero's Hurt deals 5–12 damage and Hurtmore 58–65, whatever the stats on either side; a roll of 0–15 below the high nibble of the monster's resistance byte blocks the spell instead. Code
- A monster's Hurt deals 3–10 damage and Hurtmore 30–45; Magic Armor or Erdrick's Armor cuts either to . Code
- Measured in the ROM over all 65,536 generator states, attack power 60 against a defense byte of 40 deals 10–20 damage, each of 10 to 19 in 25 of 256 rolls and 20 in 6; attack power 20 deals 0 or 1, half each. Verified
- Measured the same way, a monster's attack of 90 against defense power 60 deals 15–30 damage, and an attack of 20 against defense power 40 deals 0–4, mostly 1–3. Verified
| - In Dragon Warrior II (NA NES), a hero's attack takes , attack power less half the monster's defense; if is under 2 the hit deals 0 or 1, and otherwise , where is 8 plus the sum of sixteen random 0–15 rolls (8 to 248, centered on 128), so about half of ; a hero under Surround deals 0 one time in 4. Code
- 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, , where Dragon Warrior quarters the product. Code
| | |
| Fleeing | TryRun lets the hero escape when Agility × a random byte is at least the monster's defense byte × a roll whose range grows with the monster: 0–63 from Slime to Druinlord, 0–94 from Drollmagi to Werewolf, 0–127 from Green Dragon to Blue Dragon, and 0–255 from Stoneman on. Running from a sleeping monster always works. Code- Measured in the ROM over all 65,536 generator states, with Agility 40 against a defense byte of 40, the hero escapes 87.70% of the time from the first group, 81.64% from the second, 75.20% from the third, and 50.20% from the fourth; the hero takes the first turn 87.70% of the time. Verified
- At the start of a battle and before each monster turn,
CheckEnRun gives the monster a 1-in-4 chance to flee when half the hero's Strength is at least the monster's attack. Code - A failed run prints "But was blocked in front" and passes the turn to the monster. Code
- The NES manual advises running away when the hero's HP is close to 0, calling it “a very important ‘fighting’ technique”. Manual
- The NES manual says Agility helps the hero escape: "This means that you can more easily avoid the enemy or run away." Manual
| | - In Dragon Warrior III (NA NES), running never works in a special battle; it always works when the party leader's level less a level the encounter setup stores at $5F (zeromus reads it as the enemies') is 10 or more, or when bit 3 of the battle-state byte $0566 is set, and otherwise it fails when a random byte is below 128, 128, 64, or 0 for the first, second, third, and fourth try, so the fourth try always escapes. Code
| |
| Hit chance | - Zero damage from the hero ends the turn as a failed attack, before any dodge check. Code
- After the damage is set, an awake monster dodges when a roll of 0–63 falls below , the low nibble of its resistance byte, a chance of ; a sleeping monster never dodges, and spells skip the check. Code
- The dodge nibble of the 40 monsters (each dodges of the hero's attacks, dodge) is 1 or 2 for 27 of them; the Demon Knight's is 15, the Werewolf's 7, the Poltergeist's and Drakeema's 6, six monsters' 4, and the Golem's and both Dragonlord forms' 0. Code
- The high nibble of the same byte blocks Hurt and Hurtmore of the time (hero-spells); it is 0 for 26 of the 40 monsters and 15 for seven, the Metal Slime, Golem, Demon Knight, Wizard, Red Dragon, and both Dragonlord forms. Code
- Each fight picks one of its zone's five monster slots with equal chance; zone 0, around Tantegel Castle, holds three Slime slots and two Red Slime slots, and zone 1 adds a Drakee, all with dodge 1. Code
- The Demon Knight, the hardest monster to hit at 15/64, fills one of the five slots in overworld zones 10, 11, and 12; the Werewolf, at 7/64, fills one in zone 12 and in zone 13, which Hauksness also uses, and one on the Dragonlord's castle ground floor. Code
- The Dragonlord's castle's six sublevels draw from three rows, Werewolf, Green Dragon, Starwyvern, Wizard, and Axe Knight on the first; Wizard, Axe Knight, two Blue Dragons, and Stoneman on the next three; and Wizard, Stoneman, two Armored Knights, and Red Dragon on the last two and the bottom floor. Apart from the Werewolf's 7, their dodge nibbles are 1 or 2. Code
| | | |
| Password and battery save | - Dragon Warrior saves the hero as a 32-byte record in battery-backed cartridge RAM; bytes 0-1 hold experience, 2-3 gold, 4-7 the inventory, 8 the magic keys (capped at 6), 9 the herbs, 10 the equipment, 11-13 spell, player, and story flags, 14-21 the name, 22 the message speed, 23 HP, 24 MP, 25 whether HP and MP are refilled at the start, 26-29 the filler byte $C8, and 30-31 a check value. Code
- Dragon Warrior's check value is a 16-bit CRC of the record's first 30 bytes, read from byte 29 down to byte 0, one bit at a time from the top, with the polynomial $1021 and both bytes seeded with $1D. Code
- Dragon Warrior writes each save 10 times, one record after another, into its slot's 320 bytes; loading checks the copies in order, counts each one whose CRC fails, loads the first that passes, and rewrites all 10 from it, and if none passes the game marks the slot invalid (clearing its valid flag and mask bit, not its data) and says no deeds were recorded. Code
- Dragon Warrior marks its battery RAM as initialized with the 10 ASCII bytes KEN MASUTA, written both before and after the three save slots; before showing the saved games it checks the copy after the slots and then the one before, and only if neither matches does it erase all three slots, then rewrites both copies. Code
| uses | uses | |
| Random encounter | - Each step on the map draws a byte and starts a fight when its masked bits are all 0: 1 in 8 on sand and hills, 1 in 16 in swamp, forest, brick, and barrier squares, and on other terrain 1 in 32 where the X and Y coordinates are both even or both odd, 1 in 16 elsewhere. Code
- On the overworld's zone 0, the slime-only region around Tantegel Castle, a second byte lets only half of those fights through, and a quarter on hills. Code
- The NES manual describes encounters as meeting a monster on the map: "If you happen to bump into one of them, the game will automatically enter the fight mode." Manual
- The NES manual's terrain guide says fewer monsters live on plains, more lurk in forests, and mountains bring "many enemies". Manual
| | - In Dragon Warrior III (the North American NES release), each step reads the area's encounter class: classes 0–2 first pass a roll of 16, 64, or 128 in 256 and then use a multiplier of 1, and classes 3–7 use 1, 2, 4, 8, or 16. The multiplier times the terrain's odds, capped at 100, is then compared with a random byte; the overworld's odds rise at night (grass 10 by day and 13 by night, forest 18 and 22, hills 25 and 31, and 4 and 5 aboard the ship, which uses terrain 0), and carrying the Golden Claw sets them to 100. Code
| |
| Random number generator | | | | |
| Time of day | | | uses | |
| Turn order | | | | |