May 2003

Nethack Weapon Skills

This document describes in painful detail, the weapons and weapon skills system used in Nethack 3.2.2. I can't comment on it's accuracy with respect to later versions.

Starting with version 3.1.x, nethack added in a weapon skill system, where you are penalized for lack of skill with weapons, and can gain skill in some weapons as you play. The skills penalty/bonus is added to your other to-hit factors to affect the odds of hitting your opponent. Another penalty/bonus is added to the damage you inflict.

An explanation of Nethack battle odds

There are two basic steps in a Nethack battle. First, with each individual weapon attack, you may or may not hit your opponent. The odds of hitting are called the "to-hit" value. Second, once you have hit your opponent, the damage you do is calculated.

The first part, the "to-hit" value is based on a large and complicated number of different factors, but they are all turned into a single number, x, which is the number of chances in 20 of hitting your opponent.

This number is calculated as follows - your experience level, your luck, and your opponent's armor class are all added together, along with one free point. There are many other factors that somtimes come into play, but this is the heart of the calculation.

Also added in is the enchantment of your weapon, and its intrinsic to-hit value (the dwarvish mattock is "clumsy" with a -1 to-hit, whereas a crysknife is easy to use with a builtin +3 to-hit, but most weapons are +0). There are penalties if you are weak or lack dexterity, and bonuses if you are strong or you have good dexterity. There are also penalties if you are stunned, trapped, sick, etc. And similarly, there are bonuses if the monster you are attacking is asleep, fleeing, scared, trapped, etc.

Added to this mix is your weapon skill for your current weapon.

The skill system assigns four skill levels to different types of weapons, Unskilled gives you a -4 to-hit penalty. Basic give no penalty or bonus. Skilled gives a +2 to-hit bonus, and Expert gives a +3 bonus. So if everything else adds up to 10 to-hit points, the skill system can change this down to 6 chances in 20, or up to 13 chances in 20 to hit.

Once you do hit your opponent, the damage (hit points) done is calculated. Again, there are several factors involved, although it is less complicated that to-hit values. Damage is based on weapon type, which gives a range of possible damages based on different equations for each weapon, and is modified by some special bonuses and penalties specific to your weapon and your character and your alignment and your opponent.

The skill system also modifies the damage you do. If you hit the monster, you lose 2 damage points if you are Unskilled, you gain 1 point if you are Skilled, and 2 points if you are Expert.

So?

For each character class, you have natural talent for different weapons (and talent is NOT skill). Many weapons will be restricted - there is (almost) no way to get rid of the -4 Unskilled penalty for these weapons. For other weapons, the you may be limited to Basic or Skilled. You will only be able to become Expert in a few weapons. (A table of maximum skills for each character is at the end of this article).

This means that weapon selection can lead you to very different choices than prior to the skill system. And these choices can vary, depending on your experience and luck.

Using the Skill System

Use the #-enhance command to see all of the skills for your class that aren't restricted. Everything will be listed as Unskilled, except for your starting weapons for which you have basic skill to start.

To advance with any weapon, you need to practice. Use the weapon a lot. and a + will show up in the list of weapon skills when you can advance. You have to manually advance the weapons you've practiced with. There's a very important reason why this doesn't happen automatically. The reason is "skill slots". The skill slots are designed to keep you from mastering all of your possible weapons. If you have no available slots, it doesn't matter how much you practice, you still can't advance.

The number of slots you have is identical to your experience level. However, you use one slot to reach Basic (except for starting weapons), two MORE slots to reach Skilled, and three MORE slots to reach Expert. So by experience level 12 you can only become Expert in two weapon types.

Using Restricted Weapons

If you pray alot, and are granted a restricted weapon by crowning, the weapon will be unrestricted, with maximum skill set to Basic. The same applies to any weapon granted by offering. But if you wish for a restricted weapon, it will remain restricted. If you happen to find one, it will also be restricted.

Summary

What is the Best Weapon?

Based on an estimate of your base to-hit value, and your current skill, and the damage, you can actually figure out which weapon is best for any given character at any given time. By multiplying the average damage per hit of a weapon times its to-hit percentage, you can calculate the average damage per hit attempt.

The results are as interesting as they are complicated. A weapon that is great for one class may be worthless for another. Even artifacts are affected by this system, although it is hard to figure in artifacts with special features.

Because it is so complicated you can't really use a table to lookup the best weapon. I have a damage calculator, which will rank all of the weapons, based on your character, and base "to-hit" value (remember this is 1 plus experience level + opponent's armor class + your luck). You can then select weapons for advancement and see how their ranking changes. One important caveat - the program ranks artifacts as if they were doing their special damage. Most artifacts only do special damage against a small subset of monsters, so this is a bad measure. For more information on artifacts, see my article What is the best artifact weapon?.

I have used this calculator (and a little actual gameplay) to come up with some recommendations for some of the characters: Healer, Samurai, Archaeologist, Knight, Elf, and Tourist.

An Example

Before I figured this out, I was playing as a healer, and had a halberd, which is a quite powerful weapon. I had advanced to Basic (the maximum for a Healer with a Polearm). I dropped the halberd for a dwarvish mattock, which is both more powerful and lighter. What I didn't know was that there was no way to advance with the mattock, so I was stuck with the -4 Unskilled and also the -1 that is intrinsic to dwarvish mattocks. A -5 to hit made me pretty vulnerable (took too long to kill monsters).

I was better off with the halberd, the best (if heavy) polearm, and Basic skills (no bonus or penalty). But what are the ideal choices? A healer can be an expert on four weapons: Knife (e.g. scalpal), quarterstaff, darts, and unicorn horns. Darts and quarterstaffs are pretty wimpy, but unicorn horns are powerful, and have magical properties to boot. Knives gives you access to the crysknife. The crysknife is not quite as powerful as a unicorn horn, but it has a +3 intrinsic to hit which will combine nicely with Expert skills (also +3).

Even being granted an artifact through offering (and getting basic skills) may not be such a great deal. Just to make my point, lets compare the Vorpal Blade, the crysknife, and the unicorn horn.
Weapon intrinsic to hit skills maximum to hit artifact to hit small monster damage large monster damage skill damage bonus weight
Vorpal Blade +0 +0 if sacrifice gift +1 to +5 8+1 12+1 0 40
unicorn horn +1 * +3 +0 12 12 2 20
crysknife +3 +3 +0 10 10 2 20
Because artifact to-hit bonuses are random from 1 to n, the average to-hit bonus for the Vorpal blade will be 3, whereas (at maximum skill) the to-hit bonus for the unicorn horn is +4, and +6 for the crysknife. Both weapons will do more damage to small animals than the Vorpal Blade, and The unicorn horn is better than the Vorpal Blade for large animals too. Did I mention that the Vorpal Blade weighs more, and it can rust? Of course, just to make things complicated, Vorpal Blade sometimes decapitates its victims, but this is only 1 in 20 hits.
(* yes the unicorn horn is +1 to-hit. This is disguised in the code by reusing the same value (PIERCE == 1) for typ and hitbon; see src/objects.c)

Maximum Weapon Skills by Class

(Adapted from the document by Petri Heinil available at a spoilers web site near you)

- restricted (unskilled)
b basic
s skilled
E expert

Weapon Type A B C E H K P R S T V W
broad sword-s-E-s-ssbs-
long sword-s-s-E-sEbE-
2-handed sword-E-b-s-bEbE-
short swordbb-Ess-EEEsb
scimitarss-s-b-sbsb-
saberEb-s-b-sbsb-
polearms--s-bssbsbss
spear-bEEbssbbbsb
javelin--sbbss-bbbb
lance-----Eb-sbs-
trident-ss-bbs--bbb
clubssE-sbEs---s
mace-sE-bsEs-b-b
morning star-sb--sEb-b--
flail-bs--bEbsb--
hammer-Es--bEb-bE-
quarterstaffsbE-E-E-bbbE
whipE--------b--
daggerbbbEsb-EbEEE
knifeb-ssEb-Ess-s
axe-Es--s---bEs
bow-bEE-bb-Eb--
slings-sbs-b--bbs
crossbow---b-sbE-b--
dartb---E-bE-E-E
shuriken---bs-bsEb-b
boomerangE-E---b--b--
unicorn horns-b-E-s--s--
pick axeEEb--b---bs-
two weapon c.bb-b-s-EEss-
martial arts---2--?-6---
bare-handed c.466-24-2-442
(Two weapon combat implementation is not complete)

Links

Damage Calculator
What's the Best Artifact?
What were Nethack's Polearms Really Like?
Weapon Recommendations for:
  • Healer
  • Samurai
  • Archaeologist
  • Knight
  • Elf
  • Tourist
    My Nethack Font for X11

    Tom Fine's Home
    Send Me Email