Game Internals › Alternate Reality: The Dungeon › Treasure and drops

Treasure and drops

When you win a fight, the game decides what's left on the floor: the monster's own weapon, possibly one or two items from the six treasure lists, and for a few bosses a fixed quest item. This page has the rules and every list with its odds, read from the treasure code on disk 2.

When items drop

  1. The monster's weapon. If it fought with a real weapon (not claws or breath), the weapon is left on the floor. On the way, the code re-rolls attribute byte 15, which is the weapon's minimum skill, to a random value no higher than before. It looks as if this was meant to wear down durability (byte 16), but we confirmed in the emulator that it's the skill requirement that changes. So weapons taken from monsters are often easier to use than the same weapon bought or found.
  2. Your level. At level 0 no treasure items are rolled at all. At level 1 the rolls happen half the time. From level 2, always.
  3. Two rolls. Each monster has a treasure byte (header byte $0B). Its high and low halves name two lists, and each half gets one roll. A roll succeeds with this chance:
chance = ((dungeon level + monsters in the encounter) × 8 + 24) / 256

So a lone monster on level 1 gives each roll 40/256 (16%), and a group of four on level 3 gives 80/256 (31%). The same chance is used for each kind of coin, food and gem the monster carries. A successful roll picks one item from that list using the odds below.

  1. The floor holds 16 items. Everything dropped goes into the next slot of one ring of 16 floor slots shared by the whole dungeon. Whatever was still in that slot is deleted for good. Don't leave loot lying around if you mean to come back for it.

D4E0 weapon drop · DF2E level and treasure byte · D590 chance · D09B list roll · D0F8 floor ring

Which lists each monster uses

Read from the 62 monster records on disk 2. "—" means that half of the byte is 0, so there's no roll. The maximum group size is the most of that monster that can appear at once, which also raises the drop chance. A few monsters are templates the game renames when they appear (the thief also becomes the cutthroat, brigand and master thief) and aren't listed separately.

MonsterFirst rollSecond rollMax group
acolyte6 · potions5 · apparel4
adventurer1 · scrolls6 · potions1
alien sentry——1
apprentice2 · wands6 · potions2
assassin5 · apparel6 · potions1
basiliskBloodstone (quest drop)—1
berserker4 · armour3 · weapons8
big snake2 · wands1 · scrolls1
devourera quest item (see below)—1
doppleganger——1
dwarf1 · scrolls3 · weapons7
F.B.I. Agent——2
flame demon3 · weapons1 · scrolls4
ghost—2 · wands1
ghoul6 · potions6 · potions7
giant rat——6
giant wolf——3
gladiator3 · weapons3 · weapons1
gnome1 · scrolls1 · scrolls5
goblin6 · potions4 · armour2
Goblin LordGoblin Ring Half (quest drop)—1
great bat——8
Great Naga2 · wands1 · scrolls1
Great Wyrm1 · scrolls2 · wands1
gremlin6 · potions6 · potions1
guard3 · weapons4 · armour2
harpy2 · wands4 · armour5
Healer——1
hellhound2 · wands2 · wands3
homunculus1 · scrolls2 · wands7
horned devil2 · wands2 · wands1
ice demon6 · potions1 · scrolls3
imp4 · armour6 · potions1
lich2 · wands2 · wands1
mercenary5 · apparel1 · scrolls4
mold——1
night stalker1 · scrolls1 · scrolls1
novice2 · wands5 · apparel3
orc4 · armour4 · armour3
phoenix2 · wands4 · armour1
sage1 · scrolls1 · scrolls1
salamander1 · scrolls2 · wands1
serpentman4 · armour4 · armour3
skeleton3 · weapons4 · armour8
slime——1
small dragon1 · scrolls2 · wands1
sorceress1 · scrolls2 · wands1
spectre1 · scrolls2 · wands1
storm devil3 · weapons5 · apparel1
troll3 · weapons4 · armour4
Troll TyrantTroll Ring Half (quest drop)—1
Undead Knight1 · scrolls2 · wands1
valkyrie2 · wands4 · armour1
vampire1 · scrolls (stored as 9; the game uses the low 3 bits)1 · scrolls1
warrior4 · armour5 · apparel1
water sprite2 · wands6 · potions1
weapon master3 · weapons5 · apparel1
werewolf1 · scrolls6 · potions1
whirlwind2 · wands5 · apparel1
wizard1 · scrolls2 · wands1
wraith2 · wands4 · armour3
zombie2 · wands2 · wands5

monster header byte $0B; group size header byte $00

The six lists

Each list is a cumulative table: a random byte 0–255 picks the first entry whose threshold is at least the roll. The chances below are exact. We also checked them by running the game's own list code 3,000 times per list in the emulator, and every list matched within sampling noise. An item listed twice (the Gold Horn has two versions) shows its combined chance.

List 1: Scrolls, cards and tomes

List 2: Wands, eyes and horns

ItemChanceOut of 256Bar
Gold Horn24.6%63
Eye of Vulnerabilty9.4%24
Healing Wand9.4%24
Fire Wand6.3%16
Hypnotic Eye6.3%16
Light Wand6.3%16
Paralysis Wand6.3%16
Wizard's Eye6.3%16
Bronze Horn4.7%12
Silver Horn4.7%12
Cold Wand3.5%9
Amber Eye3.1%8
Emerald Eye3.1%8
Ruby Eye3.1%8
Sapphire Eye3.1%8

List 3: Weapons and shields

ItemChanceOut of 256Bar
Dirk15.2%39
Tower Shield12.5%32
Holy Hand Grenade9.4%24
Pike9.4%24
Short Sword9.4%24
Spiked Shield9.4%24
Chaos Club6.3%16
Crossbow [03]6.3%16
Ironwood Boken6.3%16
Quarrels [10]6.3%16
Iron Fan3.1%8
Crystal Shield2.0%5
Shield of Galahad1.6%4
Shield of Mordred1.6%4
Spirit Shield1.6%4

List 4: Armour

List 5: Apparel

List 6: Potions

list pointers $EE7A/$EE80 · thresholds $EF43/$EF49 (treasure file loaded at $D000–$EFFF)

Unidentified potions

When the game creates a potion as treasure, it rolls twice. If the first roll is 64 or more (3 in 4) and the second, halved, is at least your Wisdom, it cuts the name short after "Potion", so you don't know what it is.

P(unidentified) = 3/4 × (128 − Wisdom) / 128

With Wisdom 15 that's about 66%, which matches the 66.5% the emulator produced. At Wisdom 128 or more, found potions are always named. Lucky's Potion Brewery offers to identify potions for silver.

D0D8

Quest drops and special treasure

A few monsters set the first treasure class themselves in their death code, with bit 7 set, instead of using the two rolls. With bit 6 clear, the low bits pick one of eight fixed quest items: Silver Key, Goblin Ring Half, Troll Ring Half, Staff Piece, PAC card, Mirrored Shield, Reforged Ring, Bloodstone. With bit 6 also set, a quest-aware routine chooses instead.

  • Goblin Lord: the Goblin Ring Half. If a particular quest flag is already set, it gives the Reforged Ring instead.
  • Troll Tyrant: the Troll Ring Half, with the same switch to the Reforged Ring.
  • Basilisk: the Bloodstone.
  • Devourer: the quest-aware routine. It checks your quest flags and what you're carrying, and always adds one roll on list 1 (scrolls, cards and tomes).

There are also 32 special treasures, each tied to a fixed spot or event in the dungeon. These are where the unique items come from: The Star (card), Winged Sandals, Potion of Restoration, Morgana's Tiara, Helm of Light, Truesilver coat, Cloak of Levitation, Crystal Breastplate, Page of Cups (card), Junai's Sword, Robin's Hood, Death (card), Iron Palm Salve, Death (card), Sword of The Adept, Razor Ice, Whetstone, Saurian Brandy, Blue Pearl Dagger, Six pack [6], Melvin's Helm, Crossbow [03], Amethyst Rod, Map Stone, Flame Quarrels [10], Thunder Quarrels [10], Staff of Amber, Loadstone, Golden Apple, Gauss Rifle [95], Solar Suit, Beam Weapon [25]. We haven't mapped which spot gives which.

D13A quest logic · $EF4F/$EF57 quest items · $EE86/$EEA6 special treasures

Apple II version 2.1 (Datasoft, 1987). See sources and confidence for how this was worked out. Item names are spelled as they are on the disks.