Saturday, August 31, 2019

The treasury of Wizardry



In my last post, I briefly described the treasure system of Wizardry, where one of two treasure values are selected to determine your reward. This value involves another table system, but it is very badly designed, with bugs, irrelevant values, and a lot of noise in the data files, which I’ve left out of these tables.

Reward types

Rewards #0 through #9 are loose gold dropped by monsters who aren't guarding treasure chests.

Rewards #10 through #19 are the standard treasure chests.

Reward #20 is Werdna's stash on level 10.

Reward #21 is the LVL 7 Fighters' stash on level 4.

To use an example, Lvl 1 Mages have a [Reward 1] value of 1 and a [Reward 2] value of 11. Here’s the treasure sub-table representing Reward 1, which you will get if you fight a Lvl 1 Mage in a random encounter.


1

Percent Reward

100% [4d5] * 10 gold

This is fairly straightforward. It’s just a random amount of loose gold, with a minimum of 40 and a maximum of 200. It's doubled if the encounter happened in a treasure room, but there wasn't a treasure chest. The amount will be evenly distributed among all party members who are in a condition to collect gold.

It’s the Reward 2 values, which are used when you kill an enemy in a treasure room that had a treasure chest, where things get interesting, complicated, and buggy. The Lvl 1 Mage has a Reward 2 value of 11. The sub-table for reward 11 looks like this:

11 Chest [Trapless|Poison needle|Gas bomb|Type3]

Percent Reward

100% [4d5] * 10 gold

20% Item 3-17

10% Item 19-33

So first of all, this comes in a chest, as Reward2 treasures almost always do. The chest can be trapless, or have a poison needle trap, or gas bomb, or “Type3” trap, and there is an equal chance of each outcome. If “Type3” is selected, then it will either be a crossbow bolt, exploding box, splinters, blades, or stunner trap, with a 20% chance for each subtype.

Inside the chest, there are three possible treasures. The chest may contain one of them, or two of them, or all of them.

The first treasure is a gold pile, and there is a 100% chance of receiving it.

You have a 20% chance of receiving the second treasure, which will be a randomly chosen item with an index value from 3-17.

You have a 10% chance of receiving the third treasure, which will be a randomly chosen item with an index value from 19-33. Receiving it is not contingent on the outcome of the second treasure; you may receive both items, or one or the other, or you may only find the gold.

Note that whenever you receive an item, it will be randomly given to one of your conscious party members. If that character’s inventory is full, then the item will be discarded, and the game won’t even tell you that you would have gotten something! Therefore, never let any party member’s inventory get full when you are treasure hunting.

The range values are almost certainly bugged. I am almost positive that Sir-Tech meant for the ranges here to be 1-16 and 17-32. But, a badly designed range selector function causes the minimum range to be two points higher than intended, and the maximum to be one point higher than intended. Consequently, there are gaps in the treasure table, leaving some items that never appear as treasure.

In fact, every item-based treasure sub-table is similarly bugged, except for Werdna’s Amulet (treasure 20) and the treasures dropped by the Lvl 7 Fighters (treasure 21), and this is only because another bug keeps the selector function from even reaching the part of the code with the first bug.

The treasure chest system also has some variables called “MFactor,” “MaxTimes,” and “PercBigr.” But these are only used by treasures 22 and 23, which are not dropped by any monster in the game, so I have left this out.

Here’s the full treasure lookup table.

0

Percent Reward

100% [2d5] * 10 gold
1

Percent Reward

100% [4d5] * 10 gold
2

Percent Reward

100% [6d5] * 10 gold
4

Percent Reward

100% [8d5] * 10 gold
5

Percent Reward

100% [12d5] * 10 gold
6

Percent Reward

100% [10d10] * 10 gold
7

Percent Reward

100% [10d10] * [1d2] * 10 gold
8

Percent Reward

100% [10d10] * [1d4] * 10 gold
9

Percent Reward

100% [10d10] * [1d8] * 10 gold
10 Chest [Trapless|Poison needle|Type3]

Percent Reward

100% [2d5] * 10 gold

10% Item 3-17
11 Chest [Trapless|Poison needle|Gas bomb|Type3]

Percent Reward

100% [4d5] * 10 gold

20% Item 3-17

10% Item 19-33
12 Chest [Trapless|Poison needle|Type3|Teleporter]

Percent Reward

100% [6d5] * 10 gold

30% Item 3-17

15% Item 19-33
13 Chest [Trapless|Poison needle|Gas bomb|Type3|Teleporter]

Percent Reward

100% [8d5] * 10 gold

40% Item 3-17

20% Item 19-33
14 Chest [Trapless|Poison needle|Gas bomb|Type3|AntiMage]

Percent Reward

100% [10d5] * 10 gold

50% Item 3-17

30% Item 19-33

10% Item 35-52
15 Chest [Trapless|Poison needle|Gas bomb|Type3|Alarm]

Percent Reward

100% [12d5] * 10 gold

100% Item 3-17

50% Item 19-33

20% Item 35-52
16 Chest [Trapless|Type3|Teleporter|AntiMage|AntiPriest]

Percent Reward

100% [10d10] * 10 gold

75% Item 19-33

25% Item 35-52

10% Item 54-80
17 Chest [Trapless|Poison needle|Gas bomb|Teleporter|Alarm]

Percent Reward

100% [10d10] * [1d2] * 10 gold

100% Item 19-33

50% Item 35-52

15% Item 54-80
18 Chest [Poison needle|Gas bomb|AntiMage|AntiPriest]

Percent Reward

100% [10d10] * [1d4] * 10 gold

70% Item 35-52

25% Item 54-80

5% Item 81-93
19 Chest [Trapless|Poison needle|Gas bomb|Type3|Teleporter|AntiMage|AntiPriest|Alarm]

Percent Reward

100% [10d10] * [1d8] * 10 gold

100% Item 35-52

50% Item 54-80

10% Item 80-92
20

Percent Reward

100% Werdna's amulet
21 Chest [Poison needle|Gas bomb|Type3|Teleporter|Alarm]

Percent Reward

100% Latumofis pot.

100% Deadly ring

100% Rod of flame

To go with the treasure table, here’s a simple item list, with only the items that can drop in chests (or were meant to). More detailed tables on what the items actually do await further below.

1 LONG SWORD Weapon
2 SHORT SWORD Weapon
3 ANOINTED MACE Weapon
4 ANOINTED FLAIL Weapon
5 STAFF Weapon
6 DAGGER Weapon
7 SMALL SHIELD Armor
8 LARGE SHIELD Armor
9 ROBES Armor
10 LEATHER ARMOR Armor
11 CHAIN MAIL Armor
12 BREAST PLATE Armor
13 PLATE MAIL Armor
14 HELM Armor
15 DIOS POTION Consumable
16 LATUMOFIS POT. Consumable
17 LONG SWORD+1 Weapon
18 SHORT SWORD+1 Weapon
19 MACE+1 Weapon
20 STAFF OF MOGREF Weapon
21 SCROLL/KANTINO Consumable
22 LEATHER + 1 Armor
23 CHAIN MAIL + 1 Armor
24 PLATE MAIL + 1 Armor
25 SHIELD + 1 Armor
26 BREAST PLATE +1 Armor
27 SCROLL/BADIOS Consumable
28 SCROLL/HALITO Consumable
29 LONG SWORD -1 Weapon
30 SHORT SWORD -1 Weapon
31 MACE -1 Weapon
32 STAFF +2 Weapon
33 DRAGON SLAYER Weapon
34 HELM + 1 Armor
35 LEATHER -1 Armor
36 CHAIN -1 Armor
37 BREAST PLATE-1 Armor
38 SHIELD -1 Armor
39 JEWELED AMULET Misc
40 SCROLL/BADIOS Consumable
41 POTION OF SOPIC Consumable
42 LONG SWORD + 2 Weapon
43 SHORT SWORD +2 Weapon
44 MACE + 2 Weapon
45 SCROLL/LOMILWA Consumable
46 SCROLL/DILTO Consumable
47 COPPER GLOVES Armor
48 LEATHER + 2 Armor
49 CHAIN + 2 Armor
50 PLATE MAIL + 2 Armor
51 SHIELD + 2 Armor
52 HELM +2 (EVIL) Armor
53 POTION OF DIAL Consumable
54 RING OF PORFIC Misc
55 WERE SLAYER Weapon
56 MAGE MASHER Weapon
57 MACE PRO POISON Weapon
58 STAFF/MONTINO Weapon
59 BLADE CUSINART' Weapon
60 AMULET/MANIFO Misc
61 ROD OF FLAME Misc
62 EVIL CHAIN + 2 Armor
63 NEUT P-MAIL + 2 Armor
64 EVIL SHIELD +3 Armor
65 AMULET/MAKANITO Misc
66 DIADEM OF MALOR Armor
67 SCROLL/BADIAL Consumable
68 SHORT SWORD -2 Weapon
69 DAGGER + 2 Weapon
70 MACE -2 Weapon
71 STAFF -2 Weapon
72 DAGGER OF SPEED Weapon
73 CURSED ROBE Armor
74 LEATHER -2 Armor
75 CHAIN -2 Armor
76 BREAST PLATE -2 Armor
77 SHIELD - 2 Armor
78 CURSED HELMET Armor
79 BREAST PLATE +2 Armor
80 SILVER GLOVES Armor
81 EVIL SWORD + 3 Weapon
82 EVIL SSWORD + 3 Weapon
83 THIEVES DAGGER Weapon
84 BREAST PLATE +3 Armor
85 LORDS GARB Armor
86 MURASAMA BLADE Weapon
87 SHURIKEN Weapon
88 CHAIN PRO FIRE Armor
89 EVIL PLATE + 3 Armor
90 SHIELD + 3 Armor
91 RING OF HEALING Misc
92 RING PRO UNDEAD Misc
93 DEADLY RING Misc

Common item properties

Here’s an overview of some of the item properties that are common to multiple item types, but aren’t self-explanatory.

Boltac

How much of this item Boltac’s has in stock at the start. This decreases when you buy one, and increases when you sell one, but Boltac’s will never sell you cursed items, even if he has them in stock. They persist from game to game; if you sell Boltac’s a Lord’s Garb, then delete every character from the roster and roll a new party, Boltac’s will still have that Lord’s Garb in stock until somebody buys it.

These numbers represent the values in my copy of the game, and not the copies floating around on Asimov. I believe that the copies on Asimov are all based on a pirate copy that has already been played, and I have restored these values to the numbers found in the PC and NES versions, which I believe accurately represent the Apple II version’s out-of-the-box stock.

AC

Equipping this item lowers your AC by this much. Negative values raise it, which is bad. A few non-armor items have this property.

Special: Casts

You can use the item to cast a spell. Sometimes this comes with a chance of depleting the item, which will cause it to transform into a different item. For instance, Staff of Mogref has [Casts: MOGREF, 25% BROKEN ITEM], which means it can cast Mogref, but has a 25% chance of turning into a Broken item when you do. Items without this second designation will never be depleted.

Special: Invoke

Like casting, except that you invoke the item during a camping session and the effect is unique. Every invokable item except for Werdna’s Amulet can be depleted.

Special: Critical hits

Equipping this allows you to critical hit like a ninja. Pointless, because the Shuriken is the only weapon with this ability, and only ninjas can equip it.
 

Special: Heal X

Carrying this (you don't need to equip it) gives you a 25% chance of healing X points each step and each round of combat. If you have multiple healing items, only the one with the largest value takes. The Ring of Healing and Lord’s Garb heal 1, and Werdna's Amulet heals 5. The Deadly Ring is supposed to hurt you 3 points, but doesn't in this version because the game logic selects the "bigger" default value of 0 over the Deadly Ring's value of -3.

Protection: Class protection

When monsters of the protected type(s) target you, there's a 50% chance that it silently fails, causing them to lose their turn. Note that all monster actions, including breath attacks, party-hitting spells, and actions without obvious targets like running or calling, always target a random living party member. Class protection will not protect you from breath attacks or group spells that targeted a non-protected character.
 
Melee attacks are a special case, due to some strange programming. Melee attacks technically target  two party members - the first can be any living member, and the second is someone in the first three ranks. This means two separate class protection checks, and either one may nullify the attack. It's possible for the same party member to be targeted both times, in which case if they have protection there is a 75% chance of nullifying it.

Protection: 2x damage

Your melee strikes do double damage against monsters of the targeted classes.

Protection: Elemental protection

Breath attacks and group-targeting spells of the indicated element(s) do half damage. In addition,
  • Physical – You are immune to paralysis effects from hits. You will also never suffer critical hits.
  • Poison – You are immune to poison effects from hits.
  • Drain – You are immune to level drain.
  • Stone – You are immune to stone effects from hits.
  • Magic – When a monster targets you with any spell, the spell is silently nullified. Note that spells cast by monsters always target a randomly chosen living character, even if it's a group-affecting spell like Mahalito. Magic protection will not protect you if a group-affecting spell targets a non-protected character.

Weapons

Two tables. The first describes general properties of all weapons, and the second describes special properties of magic weapons. Magic weapons are bolded.

Id Name Name Unknown Price Bolcac Classes HitMod HitDam SwingCount
1 LONG SWORD SWORD 25 Infinite FSLN 4 1d8 0
2 SHORT SWORD SWORD 15 Infinite FTSLN 3 1d6 0
3 ANOINTED MACE KNOBBED STICK 30 Infinite FPBSLN 2 2d3 0
4 ANOINTED FLAIL STICK W/CHAIN 150 Infinite FPSLN 3 1d7 0
5 STAFF STICK 10 Infinite FMPTBSLN 0 1d5 0
6 DAGGER DAGGER 5 Infinite FMTSLN 1 1d4 0
17 LONG SWORD+1 SWORD 10000 0 FSLN 5 1d8 +1 2
18 SHORT SWORD+1 SWORD 15000 2 FTSLN 4 1d6 +1 2
19 MACE+1 KNOBBED STICK 12500 0 FPBSLN 3 2d4 +1 2
20 STAFF OF MOGREF STAFF 3000 1 MB 1 1d6 0
29 LONG SWORD -1 SWORD 1000 0 FSLN -1 1d8 0
30 SHORT SWORD -1 SWORD 1000 2 FTSLN -1 1d6 1
31 MACE -1 KNOBBED STICK 1000 0 FPBSLN -1 2d3 1
32 STAFF +2 STICK 2500 Infinite FMPTBSLN 2 1d4 +2 1
33 DRAGON SLAYER SWORD 10000 0 FSLN 1 1d10 +1 1
42 LONG SWORD + 2 SWORD 4000 0 FSLN 6 1d10 +2 3
43 SHORT SWORD +2 SWORD 4000 0 FTSLN 5 1d6 +2 3
44 MACE + 2 KNOBBED STICK 4000 0 FPBSLN 4 1d8 +2 2
55 WERE SLAYER SWORD 10000 0 FSLN 5 1d10 +1 2
56 MAGE MASHER SWORD 10000 0 FTSLN 5 1d6 +1 2
57 MACE PRO POISON KNOBBED STICK 10000 0 FPBSLN 3 1d8 2
58 STAFF/MONTINO STAFF 15000 0 FMPTBSLN 1 1d5 +1 1
59 BLADE CUSINART' SWORD 15000 0 FSLN 6 1d3 +9 4
68 SHORT SWORD -2 SWORD 8000 0 FTSLN 1 1d6 1
69 DAGGER + 2 DAGGER 8000 0 FMTSLN 3 1d4 +2 2
70 MACE -2 KNOBBED STICK 8000 0 FPBSLN 0 1d8 0
71 STAFF -2 STICK 8000 0 FMPTBSLN -2 1d4 1
72 DAGGER OF SPEED DAGGER 30000 0 MN -1 1d4 7
81 EVIL SWORD + 3 SWORD 50000 0 FSLN 7 1d10 +3 4
82 EVIL SSWORD + 3 SWORD 50000 0 FTSLN 6 1d6 4
83 THIEVES DAGGER DAGGER 50000 0 TN 5 1d6 4
86 MURASAMA BLADE WEAPON 1000000 0 S 8 10d5 3
87 SHURIKEN WEAPON 50000 0 N 7 1d5 +10 3

HitMod

Increase your character’s HitMod by this much, allowing you to hit more often. Negative values decrease it.

HitDam

The weapon’s base damage, per successful hit.

SwingCount

The number of strikes per turn. This does not stack with the number of swings your character would normally get. The higher value is the one that takes.

A SwingCount of 0 is essentially equivalent to a SwingCount of 1, since all characters are guaranteed at least 1 swing at any level.


Id Name Special Protection
20 STAFF OF MOGREF [Casts: MOGREF, 25% BROKEN ITEM]
29 LONG SWORD -1 [Cursed]
30 SHORT SWORD -1 [Cursed]
31 MACE -1 [Cursed]
33 DRAGON SLAYER
[Class protection: Dragon ]
[2x damage: Dragon ]
55 WERE SLAYER
[Class protection: Were ]
[2x damage: Were ]
56 MAGE MASHER
[Class protection: Mage ]
[2x damage: Mage ]
57 MACE PRO POISON
[Class protection: Insect ]
[Elemental protection: Poison ]
58 STAFF/MONTINO [Casts: MONTINO, 10% STAFF]
68 SHORT SWORD -2 [Cursed]
70 MACE -2 [Cursed]
71 STAFF -2 [Cursed]
72 DAGGER OF SPEED [AC: -3]
81 EVIL SWORD + 3 [Alignment: Evil]
83 THIEVES DAGGER [Invoke: Become a ninja, 100% BROKEN ITEM]
86 MURASAMA BLADE [Invoke: Increase strength by 1, 50% BROKEN ITEM]
87 SHURIKEN [Alignment: Evil]
[Invoke: Increase MaxHP by 1, 50% BROKEN ITEM]
[Critical hits]
[Elemental protection: Poison Drain ]


The Dagger of Speed is the only weapon with an AC modifier. It's negative, which is bad. This might be an error, but on the other hand, this weapon swings an amazing 7 times per round, so perhaps this is a deliberate tradeoff.

Armor

Once again, two tables. One for the general properties of all armor, and one for special properties of magic armor. Magic armor is bolded.

Id Name Name Unknown Type Price Boltac Classes AC
7 SMALL SHIELD SHIELD Shield 20 Infinite FPTBSLN 2
8 LARGE SHIELD SHIELD Shield 40 Infinite FPSLN 3
9 ROBES CLOTHING Armor 15 Infinite FMPTBSLN 1
10 LEATHER ARMOR ARMOR Armor 50 Infinite FPTBSLN 2
11 CHAIN MAIL ARMOR Armor 90 Infinite FPSLN 3
12 BREAST PLATE ARMOR Armor 200 Infinite FPSLN 4
13 PLATE MAIL ARMOR Armor 750 Infinite FSLN 5
14 HELM HELM Helmet 100 Infinite FSLN 1
22 LEATHER + 1 ARMOR Armor 1500 Infinite FPTBSLN 3
23 CHAIN MAIL + 1 ARMOR Armor 1500 Infinite FPSLN 4
24 PLATE MAIL + 1 ARMOR Armor 1500 1 FSLN 6
25 SHIELD + 1 SHIELD Shield 1500 Infinite FPTSLN 4
26 BREAST PLATE +1 ARMOR Armor 1500 Infinite FPSLN 5
34 HELM + 1 HELM Helmet 3000 0 FSLN 2
35 LEATHER -1 ARMOR Armor 1500 0 FPTBSL 1
36 CHAIN -1 ARMOR Armor 1500 0 FPSLN 2
37 BREAST PLATE-1 ARMOR Armor 1500 0 FPSLN 3
38 SHIELD -1 SHIELD Shield 1500 0 FPTSL -1
47 COPPER GLOVES GLOVES Gauntlet 6000 Infinite FSLN 1
48 LEATHER + 2 ARMOR Armor 6000 0 FPTBSLN 4
49 CHAIN + 2 ARMOR Armor 6000 0 FPSLN 5
50 PLATE MAIL + 2 ARMOR Armor 6000 0 FPSLN 7
51 SHIELD + 2 SHIELD Shield 7000 0 FPTSLN 5
52 HELM +2 (EVIL) HELM Helmet 8000 0 FSLN 3
62 EVIL CHAIN + 2 CHAIN Armor 8000 0 FPSLN 5
63 NEUT P-MAIL + 2 PLATE ARMOR Armor 8000 0 FPSLN 7
64 EVIL SHIELD +3 SHIELD Shield 25000 0 FPTSLN 5
66 DIADEM OF MALOR DIADEM Helmet 25000 0 FMPTBSLN 2
73 CURSED ROBE ROBE Armor 8000 0 FMPTBSLN -2
74 LEATHER -2 ARMOR Armor 8000 0 FPTBSLN 0
75 CHAIN -2 ARMOR Armor 8000 0 FPSLN 1
76 BREAST PLATE -2 ARMOR Armor 8000 0 FPSLN 2
77 SHIELD - 2 SHIELD Shield 8000 0 FPTSLN 0
78 CURSED HELMET HELM Helmet 50000 0 FSLN -2
79 BREAST PLATE +2 ARMOR Armor 10000 0 FPSLN 6
80 SILVER GLOVES GAUNTLETS Gauntlet 60000 0 FSLN 3
84 BREAST PLATE +3 ARMOR Armor 100000 0 FPSLN 7
85 LORDS GARB ARMOR Armor 1000000 0 L 10
88 CHAIN PRO FIRE ARMOR Armor 150000 0 FPSLN 6
89 EVIL PLATE + 3 PLATE ARMOR Armor 150000 0 FPSLN 9
90 SHIELD + 3 SHIELD Shield 250000 0 FPTSLN 6



Id Name Special Protection
35 LEATHER -1 [Cursed]
36 CHAIN -1 [Cursed]
37 BREAST PLATE-1 [Cursed]
52 HELM +2 (EVIL) [Alignment: Evil]
[Casts: BADIOS]

62 EVIL CHAIN + 2 [Alignment: Evil]
63 NEUT P-MAIL + 2 [Alignment: Neutral]
64 EVIL SHIELD +3 [Alignment: Evil]
66 DIADEM OF MALOR [Casts: MALOR, 100% HELM]
73 CURSED ROBE [Cursed]
[HitMod: -2]

74 LEATHER -2 [Cursed]
75 CHAIN -2 [Cursed]
76 BREAST PLATE -2 [Cursed]
77 SHIELD - 2 [Cursed]
78 CURSED HELMET [Cursed]
[HitMod: -2]

85 LORDS GARB [Invoke: Restores entire party's HP, 50% BROKEN ITEM]
[Heal: 1]
[Class protection: Mythical Dragon ]
88 CHAIN PRO FIRE
[Elemental protection: Flame]
89 EVIL PLATE + 3 [Alignment: Evil]


The cursed robe and cursed helm decrease your HitMod by 2, which is bad.

The Lords Garb is flagged to grant critical hits and 2x damage toward were monsters, undead, and demons, but these flags in effect don't do anything. The game logic only checks for these flags on weapons. An oversight?


Consumables

These items all cast a spell when used, and then turn into BROKEN ITEM. Any class can use any consumable.

Id Name Name Unknown Price Boltac Casts
15 DIOS POTION POTION 500 Infinite DIOS
16 LATUMOFIS POT. POTION 300 Infinite LATUMOFIS
21 SCROLL/KANTINO SCROLL 500 1 KATINO
27 SCROLL/BADIOS PAPER 500 Infinite BADIOS
28 SCROLL/HALITO SCROLL 500 25 HALITO
40 SCROLL/BADIOS SCROLL 500 0 BADIOS
41 POTION OF SOPIC POTION 1500 1 SOPIC
45 SCROLL/LOMILWA SCROLL 2500 0 LOMILWA
46 SCROLL/DILTO SCROLL 2500 0 DILTO
53 POTION OF DIAL POTION 5000 0 DIAL
67 SCROLL/BADIAL SCROLL 8000 0 BADIAL


Misc items

Miscellaneous equippable items.

Id Name Name Unknown Price Classes Special Protection
0 BROKEN ITEM BROKEN ITEM 0


39 JEWELED AMULET AMULET 5000 All [Casts: DUMAPIC]
54 RING OF PORFIC RING 10000 All [Casts: PORFIC,
5% BROKEN ITEM]

60 AMULET/MANIFO AMULET 15000 P [Casts: MANIFO,
10% BROKEN ITEM]

61 ROD OF FLAME ROD 25000 MBS [Casts: MAHALITO,
10% BROKEN ITEM]
[Elemental protection: Flame]
65 AMULET/MAKANITO AMULET 20000 All [Casts: MAKANITO,
5% BROKEN ITEM]

91 RING OF HEALING RING 300000 All [Heal: 1]
92 RING PRO UNDEAD RING 500000 All
[Class protection: Undead]
93 DEADLY RING RING 500000 All [Cursed]
[Heal: -3]

94 WERDNA'S AMULET AMULET 999999999999 All [Alignment: Evil]
[Cursed]
[Invoke:
Restores entire party's HP]
[Casts: MALOR]
[Heal: 5]
[AC: 10]
[Class protection: All ]
[Elemental protection: All ]


Keys


Id Name
95 STATUETTE/BEAR
96 STATUETTE/FROG
97 BRONZE KEY
98 SILVER KEY
99 GOLD KEY
100 BLUE RIBBON

14 comments:

  1. You mentioned that bugs mean that "some items that never appear as treasure." Do you happen to know which items those are?

    ReplyDelete
    Replies
    1. The item ID gaps in the tables are 1,2,18,34, and 53. These correspond to long sword, short sword, short sword+1, helm + 1, and potion of dial. Of these, Boltac's sells the first three, but not the last two, so they will never be obtainable.

      Delete
  2. What would the bug-fixed treasure tables look like?

    You said that:
    3-17 = 1-16
    19-33 = 17-32

    So extrapolating from there it's this? Or does the bug compound itself somehow as the numbers get bigger?
    35-52 = 33-51
    54-80 = 52-79
    81-93 = 80-92

    And since it's bugged does that really mean there's a chance of getting another Deadly Ring out of a treasure type 18 encounter?

    I also find it interesting how inconsistently defined the items are. It's like two different people decided what -1 items and -2 items do. -1 items are almost universally worse than their -2 counterpart.

    ReplyDelete
    Replies
    1. I believe the reward steps were intended to look like this:
      1-16
      17-32
      33-51
      52-79
      80-93

      That's a guess, but this series leaves no gaps and has no overlap. It's mainly from this that I'm assuming there's a bug (+2 to minID, +1 to maxID), but the actual code looks like it was coded clumsily too. I'll get to that in a bit.

      The actual values seen in the reward tables look like this:
      1,15
      17,15
      33,18
      52,27
      79,13 (Reward 18-4)
      78,13 (Reward 19-4)

      Curiously, reward 18-4 and 19-4 are slightly different, which I believe is a data entry error. The tables had been pretty consistent with odd rewards being the same as the preceding even rewards, just with better odds. I think they are both wrong; the first number should be 80, in order to match the pattern from the previous steps.

      I am pretty sure that value A is supposed to represent the starting index of item drops, and B represents the range of item drops, so that A+B is the maximum index. This calculation would have given these results:
      1d(B+1) + (A-1)

      Not pretty, but necessary to make the intended data schema match the 1dX function and give the desired results.

      The calculation actually performed looks more like this:
      A + (1dB + 1)

      Delete
    2. Bug-fixed reward steps, using the data as entered, would look like this:
      1-16
      17-32
      33-51
      52-79
      79-92 (Reward 18-4)
      78-91 (Reward 19-4)

      That looks perfectly logical until we get to the last two, which look different from each other and also don't fit the pattern. So I think they were entered incorrectly, and were meant to be 80-93.

      Delete
    3. Here's another bit of speculation. Perhaps originally the last reward tier was entered as 80,13. But when playtesting revealed that Werdna's Amulet was sometimes dropping in high-level treasure chests, they hastily changed the data, rather than fix the underlying code issue.

      Delete
  3. Hi Ahab. Excuse me for commenting on a single game repeatedly.

    I found out today that LORDS GARB does not deal x2 damage to Undead(tested with VAMPIRE and MURPHYS GHOST) and Demon(tested with GREATER DEMON). I have not tested against the were class.

    I am not sure if this is only for LORDS GARB. As for me, I have never witnessed the x2 damage with other weapons either.

    I am not sure if I have seen critical hits with LORDS GARB. I am paying attention to that right now.

    ReplyDelete
    Replies
    1. How odd! You are right, and I appreciate your diligence.

      Long story short, it looks like critical hits and 2x damage properties only apply to weapons. The Pascal code specifically asks "is this a weapon" before conferring those properties, which robs the Lords Garb of some usefulness. I will update the Treasury post with this finding.

      As for other weapons, I did a test. I hacked myself an 18 strength fighter with a Dragon Slayer, which means 1d10 +4 per hit. I went to level 4 and fought some Dragon Flies. Round 1 he hit twice for 32 damage. Round 2 hit twice for 30 damage. Round 3 hit three times for 54 damage. So I think that confirms 2x damage works.

      Delete
    2. Thank you for the explanation!! With this bug confirmed, my Ninja got promoted to the frontline and my Lord got demoted to the rear.

      But even with this bug I thought it was kind of cool that the Lord can get +2 heal points from the Garb and the Healing Ring . . .

      but I noticed today that the heal points were not stacking up. I was checking my Lord's HP every step, but it never increases by 2 points . . .

      Delete
    3. Yep, I double-checked this, and healing doesn't stack. The logic seems to be that whichever healing item has the largest value is the one that takes. And consequently the Deadly Ring doesn't hurt you, because the default value of 0 is larger than -3. This (and the other Lords Garb bug) also affects Wizardry II. Possibly not Wizardry III though - I am completely certain that in later ports, which are based off the Wiz3 codebase, the Deadly Ring saps your HP just by carrying it.

      Will update pages accordingly, and revisit this behavior when I get around to Wiz3.

      Delete
  4. The full workings of class protection are somewhat weirder and more convoluted than what you describe here, though I wouldn't blame you for trying to simplify things. The trouble is that, first, ENATTACK, the setup procedure for monster attacks, always tests class protection by calling CANATTCK whenever a monster tries to perform *any* action during a combat round. This includes the actions of running away and calling for help, as well as casting a spell, breathing, and attacking physically. The monster will have already selected a character as a "target" (CHARX), even for actions like running away for which the idea of a target should be meaningless. If the character has class protection and the monster fails the 50% chance in CANATTCK, ATTCKTYP will remain set to 0, and the monster won't get to do *anything* that round, including a spell, breath attack, call for help, or attempt to flee.

    But if the monster passes CANATTCK, then what? Well, if its action is anything other than a direct physical attack ("melee"), that's it. But if it decides on a physical assault (assuming it passes the peculiar checks further down based on its group number and number within its group, which are a story of their own), then it will change its target if the target it originally selected is not one of the "front 3" characters. Whether or not it changes its target, *it calls CANATTCK again*. This means there is another chance to fail! If before it had checked a "rear rank" character and is now checking a "front ranker", it again might fail if the front ranker has appropriate class protection. If the character it checked before was a front ranker and had class protection, then it will check the same character again and will again have to pass this class protection. So I think this changes the odds, making them more complex.

    ReplyDelete
  5. You should check the IBM PC version of Wizardry, since I think I remember, back in the 1980s, getting from chests some of the items which the bug would make unavailable (Leather + 1 and the Potion of Dial). In short, the bug might have been fixed for the PC release. I don't know how get a copy of that (has anyone imaged the 5.25 inch disks for the PC?) let alone disassemble it, though.

    ReplyDelete
    Replies
    1. Two PC versions are available here:
      http://retrograde.inf.ua/sir-tech.htm

      The newer one appears to be based on the "Window Wizardry" engine introduced in Wiz3.

      Delete

Most popular posts