Wizardry #1-2-3
Game Code Calculations and Formulas
Wizardry 1-2-3 Game Code Calculations and Formulas
--------------------------------------------------
By: Snafaru
Email: snafaru@zimlab.com
Web site: http://www.zimlab.com/wizardry
Created: 2013/09/22.
Updated: 2016/10/24.
Updated: 2017/02/09.
Updated: 2019/12/26 (Di, Kadorto, Haman, Mahaman).
Updated: 2022/11/16 Added more to identify and disarm traps. Began Section 6 Miscellaneous.
Updated: 2023/03/04 Updated Initiative.
Source codes:
- 1. From the Pascal (and assembler) source code files and generated listings for Wizardry_I, Proving Grounds of the Mad Overlord, made by Thomas William Ewers on June 15th, 2014, and available on the Asimov site at ftp://ftp.apple.asimov.net/pub/apple_II/images/games/rpg/wizardry/wizardry_I/
- 2. From the Pascal (and assembler) source code files and generated listings for Wizardry3, Legacy of Llylgamyn, made by Thomas William Ewers on March 27, 2012, and available on the Asimov site at ftp://ftp.apple.asimov.net/pub/apple_II/images/games/rpg/wizardry/wizardry_III/
Note: The information below is what you will not already find in the game manual.
Section 1: Character Statistics/Attributes
Section 2: Combat
Section 3: Spells
Section 4: Monsters
Section 5: Experience, Treasures and Traps
Section 1: Character Statistics/Attributes
------------------------------------------
*Your characters' names can be between 1 to 15 characters long.
*The available points to distribute between your Statistics/Attributes when creating your character goes as follows:
- It is (7 + (RANDOM 0 to 3)) with a 10% chance to add another 10 points as long as your total points are below 20, therefore the maximum points is 29.
*The younger you are the more chances you will gain attributes when leveling up (Strength, I.Q., Piety, Vitality, Agility, and Luck) when leveling up (ex: 86% at age 18). Here is how it works:
- First, there is a 75% chance your attribute will be modified.
- Then, if your age is lower than a random roll up to 130 (that is 0 to 129), then if your attribute is 18 you have an 83.3% chance nothing will happen, if your attribute is less than 18 then you lose 1 attribute point, if your Vitality drops to 2, your are dead.
- If your age is higher than the random roll mentioned in the previous line, then you gain 1 attribute point up to 18 maximum.
*If you change class, your character ages by ((52 * (RANDOM 0 to 2)) + 252) weeks.
*The higher your I.Q. (Mage Spells) and Piety (Priest Spells), the higher your chance to learn spells. Your chance to learn each unknown spell at the level you are allowed to is if your ability (I.Q. or Piety respectively > (RANDOM 0 to 29)).
*Your characters' Vitality has an effect on how many hit points are gained per level:
- Vitality 3: -2 hit points per level.
- Vitality 4, 5: -1 hit points per level.
- Vitality 16: +1 hit points per level.
- Vitality 17: +2 hit points per level.
- Vitality 18: +3 hit points per level.
*Also, the higher your Vitality the higher the chances you will survive a resurrection attempt, see the spells section.
*The following are the starting hit points per class:
- Fighter, Lord is (50% chance of (10 + Vitality Modifier)) or (50% chance of (9 * (10 + Vitality Modifier) / 10))).
- Priest is (50% chance of (8 + Vitality Modifier)) or (50% chance of (9 * (8 + Vitality Modifier) / 10))).
- Thief, Bishop, Ninja is (50% chance of (6 + Vitality Modifier)) or (50% chance of (9 * (6 + Vitality Modifier) / 10))).
- Mage is (50% chance of (4 + Vitality Modifier)) or (50% chance of (9 * (4 + Vitality Modifier) / 10))).
- Samurai is (50% chance of (16 + Vitality Modifier)) or (50% chance of (9 * (16 + Vitality Modifier) / 10))).
In all cases, the minimum is 2.
*The following are the base hit points gained per level per class, which is then modified by your Vitality (Minimum 1 after Vitality modifier):
- Fighter, Lord gain 1 to 10 base hit points per level on average.
- Priest, Samurai gain 1 to 8 base hit points per level on average.
- Thief, Bishop, Ninja gain 1 to 6 base hit points per level on average.
- Mage gain 1 to 4 base hit points per level on average.
*Each character starts at ((18 * 52) + (RANDOM 0 to 299)) weeks old.
*Each character starts with (90 + (RANDOM 0 to 99)) gold.
*At the Temple of Cant, the resurrect chance is (50 + (3 * Vitality)% if dead or (40 + (3 * Vitality)% if ashes. The character Ages by 1 to 52 weeks.
*At the Temple of Cant, it costs you to cure your characters' condition:
- Paralyzed: (100 * Character Level) gold.
- Stoned: (200 * Character Level) gold.
- Dead: (250 * Character Level) gold.
- Ashes: (500 * Character Level) gold.
Section 2: Combat
-----------------
*Initiative, or if you prefer who goes first in a battle. The lower the better.
For each of your characters it is ((RANDOM 0 to 9) + Agility Modifier), minimum 1, so between 1 and 5 through 11:
- Agility 3: +3 Initiative
- Agility 4, 5: +2 Initiative
- Agility 6, 7: +1 Initiative
- Agility 15: -1 Initiative
- Agility 16: -2 Initiative
- Agility 17: -3 Initiative
- Agility 18: -4 Initiative
For each of the monsters it is a random number of ((RANDOM 0 to 7) + 2), so 2 to 9.
On equality, characters go before monsters.
*The Fighter, Samurai, and Lord get 1 extra attack for every 5 levels. The Ninja has one extra swing on top of that which means a Level 1 Ninja starts with 2 swings. Other classes have only one swing at all levels. Some weapons inherently provide more swings; this is why getting a Long Sword + 2 early for example is so great because it gives 3 swings by default. The number of swings is the maximum between your weapon's inherent characteristics or what your characters' level provide, consequently they indeed do not add up together. The overall maximum number of swings is 10.
*Fighter, Priest, Samurai, Lord, Ninja have a naturally higher hit probability than other classes. Here is the code, HPCALCMD means Hit Probability Calculation Modifier:
IF (CLASS = PRIEST) OR
(CLASS = FIGHTER) OR
(CLASS >= SAMURAI) THEN
HPCALCMD := 2 + CHARLEV DIV 3
ELSE
HPCALCMD := CHARLEV DIV 5;
*All unarmed character classes do (1d2 + 1d2) damage per swing except the Ninja whom does (1d4 + 1d4) per swing plus the Strength bonus or penalty. For example an unarmed level 1 Ninja with 18 Strength would have 2 swings doing ( (1d4 + 1d4) + 3 ) damage each for a potential of 22 damage total per round.
*If unarmed, the Ninja's AC (Amour Class) = (10 - ( Ninja Level / 3 ) - 2). The ( Ninja Level / 3 ) part is rounded down. The -2 here is a good thing.
*If a Ninja hits with damage, then the Ninja has ( 2 * Level )% chance up to a maximum of 50% chance to score a Critical Hit. Then the monster has ((Monster Level + 10) < (RANDOM 0 to 34)) chance to avoid it, which means a monster over Level 23 cannot be Critically Hit.
*Your characters' Strength has an effect on the hit chance probability and damage per swing:
- Strength 3: -15% chance to hit, -3 damage per swing
- Strength 4: -10% chance to hit, -2 damage per swing
- Strength 5: - 5% chance to hit, -1 damage per swing
- Strength 16: + 5% chance to hit, +1 damage per swing
- Strength 17: +10% chance to hit, +2 damage per swing
- Strength 18: +15% chance to hit, +3 damage per swing
So, for example, for each combat turn your Level 10 Ninja with a Strength of 18 can do 12 extra damage points total with his 4 swings, all of it with 15% more chance to hit, this is significant.
*If a character or monster is sleeping or held then they take double damage!
*When your weapon is purposed vs. a certain type of monster you do double damage to it!
*Priests, Bishops and Lords have the ability to dispel undead monsters back to their plane:
- They have ((50 + (5 * Character Level)) - (10 * Monster Level))% chance to succeed on each monster of a group.
- The Bishop has this ability beginning at level 4 but with 20% less chance to succeed.
- The Lord has this ability beginning at level 9 but with 40% less chance to succeed.
*Resistances:
- Vs. Poison & Paralysis & Critical Hit: Fighter 15%, Samurai 10%, Lord 10%, Ninja 15%, and if race is Human 5%.
- Vs. Stoning: Priest 15%, Bishop 10%, Lord 10%, Ninja 10%, and if race is Gnome 10%.
- Vs. Breath Attacks: Bishop 10%, Ninja 20%, and if race is Elf 10% to reduce the Breath damage by half.
- Vs. Poison Gas chest trap: Thief 15%, Ninja 15%, and if race is Dwarf 20%.
- Vs. Anti-Mage and Anti-Priest chest trap and Silence: Mage 15%, Bishop 10%, Samurai 10%, Ninja 10%, and if the race is Hobbit 15%.
- Vs. all of the above: add 5% for every 5 Levels of your character.
- Vs. all of the above: add 5% if your Luck is 6, 10% if your Luck is 12, and 15% if your Luck is 18.
The overall maximum resistance is 95%.
*Once a character is poisoned, there is 25% chance each round during combat or each maze movement that the poison will take effect.
*If a character does not resist a Critical Hit (see Resistances above), then the character still has another (Character Level * 2)% chance up to a maximum of 50% chance to avoid being Critically Hit.
*In Wizardry 1, there is a 1 in 2000 chance a good character will turn evil if the party fights a group of Friendly monsters.
*In Wizardry 1, an evil party never encounters Friendly monsters.
*In Wizardry 3, there is a 5% chance a good character will turn evil if the party fights a group of Friendly monsters.
*In Wizardry 3, there is a 5% chance an evil character will turn good if the party does not fight a group of Friendly monsters.
*Each round each character has (I.Q. + Piety + Level)% chance of identifying one group of monsters correctly.
Section 3: Spells
-----------------
PRIEST SPELLS
*MILWA: Light for (15 + (RANDOM 0-14)) turns.
*MANIFO: A character or monster has (50 + (10 * Level))% chance to resist Manifo (Hold).
*MONTINO: A monster has (10 * Monster Level)% chance to resist Montino (Silence).
*LOMILWA: Light for 32,000 turns.
*CALFO: 95% chance to identify a chest trap.
*DI: The resurrection works on Dead characters only. The character is resurrected with 1 hit point. If your character is in Ashes, you need to use Kadorto instead.
*DI or KADORTO: The resurrect chance is (4 x Vitality)% of the recipient. The recipient permanently loses 1 Vitality point. If the recipient has only 3 Vitality points when the spell is cast then the recipient character is Lost forever.
*KADORTO: The resurrection works on Ashes or Dead characters only. The character is resurrected with full hit points.
*BADI: A character or monster has (10 * Level)% chance to avoid being slain.
*LOKTOFEIT: Has (2 * Character Level)% chance of succeeding (Teleport back to Castle during combat).
MAGE SPELLS
*KATINO: A character or monster has (20 * Level)% chance of not being slept.
*MAKANITO: Undead are unaffected. Monsters level 8 or above are unaffected.
*LAKANITO: Each monster has (6 * Level)% chance of not being smothered.
*ZILWAN: Does (10d200) damages to an Undead monster. In other words that is adding 10 rolls of a random number between 1 and 200 damages.
*TILTOWAIT: Does (10d15) damages to all monsters (the game manual wrongly lists it as (10d10) damages). In other words that is adding 10 rolls of a random number between 1 and 15 damages.
*HAMAN and MAHAMAN: On a roll of (RANDOM 0 to Character Level) = 5 the caster will unlearn some spells. The following message will be displayed "But his spell books are mangled!"
*HAMAN for Wizardry 1 has 3 possible effects:
1. "DIALKO'S PARTY 3 TIMES" - cures Afraid, Asleep, Paralysis, Stoning, Silence, and Heals each character for (9 * ((RANDOM 0 to 7) +1)) Hit points.
2. "ZAPS MONSTER MAGIC RESISTANCE!" - the first 3 groups of monsters become non-resistant against damaging magic (0% chance saving throw against magic) and they are thereafter treated as being Level 1 for other calculations regarding the effects of spells.
3. "HEALS PARTY!" - cures Afraid, Asleep, Paralysis, Stoning, Silence, and restores all Hit Points, except for those that are Dead or in Ashes.
*MAHAMAN for Wizardry 1 has 3 possible effects:
1. "DIALKO'S PARTY 3 TIMES" - cures Afraid, Asleep, Paralysis, Stoning, Silence, and Heals each character for (9 * ((RANDOM 0 to 7) +1)) Hit points.
2. "SILENCES MONSTERS!" - silences the first 3 groups of monsters for ((5 + (RANDOM 0 to 4)) rounds.
3. "DESTROYS MONSTERS!" - all monsters' Status=Dead and Hit Points=0.
*HAMAN and MAHAMAN for Wizardry 1 had 2 more possible effects in the programming code but due to what seems to be a programming error (CASE RANDOM (MOD 3) * MAHAMFLG) instead of (CASE RANDOM MOD (3 * MAHAMFLG)) they are never showing up in the game:
- "SHIELDS PARTY" - each character's AC=-10 unless it is even better (lower).
- "RESSURECTS AND HEALS PARTY!" - cures Afraid, Asleep, Paralysis, Stoning, Death, Ashes conditions and restores all Hit Points.
*HAMAN for Wizardry 3 has 5 possible effects:
1. "CURE THE PARTY" - cures Afraid, Asleep, Paralysis, Stoning conditions.
2. "SILENCE THE MONSTERS" - silences the first 3 groups of monsters for ((5 + (RANDOM 0 to 4)) rounds.
3. "MAKE MAGIC MORE EFFECTIVE" - the first 3 groups of monsters cannot make a saving throw against damaging spells and are thereafter treated as being Level 1 for other calculations regarding the spells.
4. "TELEPORT THE MONSTERS" - all monsters' Status=Dead and Hit Points=0.
5. "HEAL THE PARTY" - restores all Hit Points.
*MAHAMAN for Wizardry 3 has all of the HAMAN effects above plus 2 new possible effects:
6. "PROTECT THE PARTY" - each character's AC=-10 unless it is even better (lower).
7. "REANIMATE CORPSES!" - cures Afraid, Asleep, Paralysis, Stoning, Death, Ashes conditions and restores all Hit Points.
RECUPERATION FROM SPELL EFFECTS
*Monsters have (20 * Monster Level)% or up to 50% maximum chance to recuperate from sleep spells.
*Monsters have (10 * Monster Level)% or up to 50% maximum chance to recuperate from fear spells.
*Monsters have (7 * Monster Level)% or up to 50% maximum chance to recuperate from paralyzing (hold) spells.
*Characters have (10 * Character Level)% or up to 50% maximum chance to recuperate from sleep spells.
*Characters have (5 * Character Level)% or up to 50% maximum chance to recuperate from fear spells.
Section 4: Monsters
-------------------
*You will encounter a maximum of 2 monster groups on maze level 1, a maximum of 3 on level 2, and up to 4 on level 4 and beyond.
*You will encounter a maximum of 5 monsters per monster group on level 1, 6 on level 2, 7 on level 3, 8 on level 4, and 9 beyond.
*Each character has (IQ + Piety + Level)% chance to identify monsters correctly.
*When an encounter occurs you have a 20% of surprising the monsters, if you have not surprised them, then the monsters get a 20% chance of surprising you.
*Some monsters have the capability to call for help. The ones that do so have a 75% chance to call for help if their group count drops below 5. Then, if ((RANDOM 0 to 199) > (10 * Monster Level)) no help will come.
*Some monsters have a breath weapon. The ones that do so have a 60% chance of using it.
If you resist (see Resistances above), your character takes 1/2 damage. If you have equipment that protects you from breath weapons then your character takes 1/2 damage.
*The monsters' magic resistance against damaging spells is a saving throw versus their Magic Resistance % attribute, which is for most a low number.
*The monsters that have resistances to FIRE and COLD elements take only 1/2 damage when hit from such damaging spells.
*Spell casting monsters have a 75% chance to do so during their turn.
Section 5: Experience, Treasures and Traps
------------------------------------------
*To inspect or disarm a trap your character's status has to be "OK".
*The Thief has ((RANDOM 0 to 99) < (6 * Agility)) chance to identify a trap, the Ninja has ((RANDOM 0 to 99) < (4 * Agility)) chance, both up to a maximum of 95%. Other classes have ((RANDOM 0 to 99) < (1 * Agility)) chance. Calfo has 95% chance.
*If your character fails to identify a trap there is a ((RANDOM 0 to 19) > Agility) chance they will activate the trap, if not, then a random trap identification is displayed.
*The Thief or Ninja's chance to disarm a trap is ((RANDOM 0 to 69) < (Character Level - Maze Level + 50)). Other classes have ((RANDOM 0 to 69) < (Character Level - Maze Level)).
*If your character fails to disarm a trap there is a (Agility < (RANDOM 0 to 19)) chance they will be given another opportunity to disarm it, otherwise, they have just set it off!
*Here is the breakdown of the effects of traps:
- POISON NEEDLE : The character popping the trap is Poisoned.
- GAS BOMB : Each character does a saving throw against their Poison Resistance or else is Poisoned.
- CROSSBOW BOLT : The character popping the trap is hit for ((Maze Level)d8) damages.
- EXPLODING BOX : Each character has 50% chance of taking ((Maze Level)d8) damages.
- SPLINTERS : Each character has 70% chance of taking ((Maze Level)d6) damages.
- BLADES : Each character has 30% chance of taking ((Maze Level)d12) damages.
- STUNNER : The character popping the trap is Paralyzed.
- TELEPORTER : The entire party is teleported to a random location and direction on the same maze level.
- ANTI-MAGE : Each Mage and Samurai does a saving throw against their Anti-Mage Resistance. If it fails, the Samurai is Paralyzed. If it fails, the Mage is Paralyzed, and if the Mage is already Paralyzed, then the Mage is turned into Stone.
- ANTI-PRIEST : Each Priest and Bishop does a saving throw against their Anti-Priest Resistance. If it fails, the Bishop is Paralyzed. If it fails, the Priest is Paralyzed, and if the Priest is already Paralyzed, then the Priest is turned into Stone.
- ALARM : The party must immediately face another encounter.
*If you fail to disarm at trap you still have a ((RANDOM 0 to 19) < Agility) chance to avoid activating it, thus giving you another opportunity to disarm it.
*The Bishop has (10 + (5 * Character Level))% chance to identify an item correctly. Then there is a (35 - (3 * Character Level))% chance your Bishop will accidentally equip a cursed item whether identification was successful or not.
*Each character gets experience points after a fight only if their status is "OK".
*You do not get experience points for monsters that have been dispelled or have ran away.
*In Wizardry 1, you can invoke the Special Powers of some items you find. Using an item's Special Power may destroy it:
- MURASAMA BLADE : Strength + 1.
- SHURIKEN : Maximum Hit Points + 1.
- THIEVES DAGGER : Change Class to Ninja.
- LORDS GARB : Heals all Hit Points of all characters.
- WERDNA'S AMULET : Heals all Hit Points of all characters.
//Note that in Wizardry 1 other Special Powers were possible but never used, they are:
- If your Age > 20 years old then you get younger by 1 year.
- Get older by 1 year.
- Change Class to Samurai.
- Change Class to Lord.
- Add 50,000 Gold.
- Add 50,000 Experience.
- Change Status to Lost.
- Change Status to OK, cure all Hit Points, and cure Poison.
Section 6: Miscellaneous
------------------------
*While in the maze you can adjust the T)ime delay between messages that appear on the screen. The range is 1 to 5000. The default is 2000.
*The poison amount affecting your characters does not stack even if they are poisoned repeatedly except in the case where you set off the "Poison Needle" trap, those stack, but goes back down to 1 stack if poisoned in another manner.
*Dead characters do not get gold nor experience points rewards when the party defeats monsters.