User:Tungtn/Physical damage analysis

From NetHackWiki
< User:Tungtn
Revision as of 11:17, 25 October 2014 by Tungtn (talk | contribs) (Combat changes made by Variants: New sub-headings "Reduce influence of Luck on To-Hit" and "Player combat makes noise")
Jump to navigation Jump to search

There are a number of complaints that tend to pop up with respect to late game NetHack, such as:

  • Late game is too easy/dull/boring/grindy/repetitive.
    • "grind" in this sense means to do the same thing over and over whilst advancing, not in order to build up power.
  • Gehennom "is a bit of a clobber-or-cast-fest".
  • Ascension kit is too rigid/not enough equipment variety.
  • Every game post-Castle feels the same.

I wanted to look at one factor that contributes to these feelings: late game physical damage.

I have two main hypotheses that damage has unwanted impacts on how late game NetHack plays:

  1. It is possible to inflict so much damage that all monsters can be trivially dealt with by killing them, denying opportunities for alternative tactics, e.g. zapping, kiting, falling back to chokepoints, teleporting them away, teleporting yourself, exploiting monster AI, etc. This also leads to anti-climatic confrontations, e.g. killing the Wizard of Yendor or Riders in 2 or 3 hits.
  2. Certain equipment choices and tactics (e.g. #twoweapon) do so much more damage relative to their alternatives that they are almost always chosen, independent of race and role, leading to different characters making the same decisions and therefore playing very similarly.

The following notes cover NetHack, DynaHack (since I'm the DynaHack maintainer and I have a vested interest in improving it), and also a bit of UnNetHack, SporkHack and dNetHack.

Aims

NetHack has been seen for a long time as broken, imbalanced and forever unfixable. I'd like to see if that's really the case.

More specifically, here's what I'd like to come from all of this:

  • Increase reliance on moment-to-moment tactics in late game NetHack to reduce boredom.
  • Make equipment choices and tactics more role-dependent, making different roles feel less samey.
  • Make adjustments to damage that are big enough to be noticed, but don't go so far as to invalidate other mechanics.
  • Build a foundation to eventually make accuracy relevant in the late game of NetHack, like in the early and mid game.

Related factors and assumptions

These notes don't cover the concepts of to-hit or speed, so I'll touch on them here.

To-hit

To-hit is NetHack's way of simulating combat accuracy. The way it works is that a target number is added together from all factors that would affect whether or not an attempted physical attack lands, like your experience level, your skill, your luck, the weapon's to-hit bonus, the weapon's enchantment, the monster's AC and armor, and a bunch of other things. If that target number is greater than a d20 roll, you get the hit, otherwise you miss. This system has a few outcomes:

  1. If the target number is 21 or higher, you will always hit.
  2. If the target number is 1 or lower, you will always miss.
  3. Target numbers from 2 to 20 inclusive give a chance to hit from 5% to 95%, in 5% increments.

For the purpose of looking at late game damage, I'm assuming that every hit lands, which seems to be the case in most games. I suspect the biggest contributing factors to this are:

  • Experience level - +15 to hit at level 15; there's a one-to-one relationship here for all characters.
  • Luck - +13 to hit: +10 is the natural maximum luck, and +3 comes from having more not-cursed luck sources than cursed ones.
  • Weapon enchantment - +6 or +7; that is, +1 to hit for every +1 enchantment.

This sums to about +34 or +35 (before dexterity: 18 dex adds +4 to this, 25 dex adds +11). For perspective, monster AC values are pulled directly from Source:monst.c (only modified by worn armor which most monsters don't have; consult Source:worn.c#find_mac) and vary from 10 (gnomes and gnome lords) to -10 (Master Kaen). In other words, the worst target number for a hit with standard late game strategy is +24, which means that normal late game hits will never miss!

Other notable monster AC values:

  • -8 AC for the Wizard of Yendor.
  • -5 AC for the Riders (Death, Pestilence and Famine).
  • -2 to -8 AC for the demon princes:
    • -2 AC - Dispater
    • -3 AC - Geryon
    • -5 AC - Yeenoghu and Baalzebub
    • -6 AC - Orcus
    • -7 AC - Juiblex and Asmodeus
    • -8 AC - Demogorgon
  • 9 AC for lichens and other fungi (yes, sessile fungi have better AC than gnomes).
  • 10 AC for the Yendorian Army (soldiers, sergeants, lieutenants, captains) and the watch (watchmen, watch captains), but they spawn with armor randomly selected to approximate target AC values; see Source:makemon.c#m_initinv.

Interesting quote from MetaFilter about experience level in to-hit in D&D (from John Harris, writer of the now-defunct roguelike column @Play):

http://www.metafilter.com/143037/But-waityour-medallion-begins-to-glow#5751697

I had a thought a little while ago. One of the complaints, and it's one that I agree with, about the game is that, while the early game demands a variety of approached depending on role, the late game tends to be about smacking things until they die, whether you're a barbarian, archeologist, wizard, tourist or healer. I think I've figured out a major part of the reason for that. It's that, unlike D&D, all the characters advance in their to-hit rate at the same speed, which is the same as that of the classic D&D Fighter: +1 to hit per level.
If non-combat-wombats had less than a bucketfull of to-hit, it'd force them towards using alternative means of killing monsters. It'd make some classes much more difficult unless special care were taken to balance though. Maybe different to-hit tracks for melee and missile weapons, so Rangers could uniquely excel with missile weapons.

Speed

The wiki page on speed covers the nitty gritty technical details, but I'll summarize what assumptions I'm working off of.

In general, speed affects how many actions you get per turn:

  • action - a player input that leads to in-game consequences.
  • turn - a fixed unit of in-game time, the same way you might think of "seconds" or "minutes" in the real world.

There are three speed levels relevant to standard strategy: normal (100%), fast (133%) and very fast (166%). There are three sources of very fast speed: speed boots, potions of speed and the haste self spell. Out of these options, speed boots are the only permanent (read: won't run out) source of very fast speed, so naturally they form part of the standard ascension kit.

An important thing to note is that speed affects all actions equally, whether you choose to move, use an item, or most importantly attack.

From all this, it's safe to assume that players that enter Gehennom are:

  1. permanently very fast (due to speed boots), and
  2. can attack 66% more often than monsters that move at normal speed

These notes on damage DO NOT account for speed, so if you see a damage number and you're fighting a monster that is normal speed, you need to increase that damage number by 66% to get damage-per-turn, rather than damage-per-player-action.

Sources of damage

The main sources of damage are:

  • weapon base damage: one-handed weapons tend to do between d2 and d12 damage
  • weapon enchantment: directly added to damage, so e.g. a +7 weapon grants +7 bonus damage
  • artifact bonus damage: adds either fixed damage or double damage, usually applied conditionally
    • fixed damage is used if the artifact bonus damage value is non-zero (see artilist.h), ranges from +d6 (Cleaver) to +d10 (Excalibur), with +d24 from Mjollnir as an outlier
    • double damage is used if the artifact bonus damage value is zero; doubling applies to weapon base damage, enchantment and rogue backstab
  • artifact special effects: things like d8 life draining from Stormbringer, double damage vs. large from Tsurugi of Muramasa, and extra damage and effects for Magicbane (yes, this is done after artifact damage doubling, e.g. Staff of Aesculapius)
  • strength: -1 to +6 damage
  • skill damage modifier
    • -2 to +2 for most hits
    • -3 to +1 for two-weapon hits
    • +1 to +3 for bare-handed combat
    • +3 to +9 for martial arts
    • +0 to +2 for riding (stacks)

Strength

Strength Damage Notes
3-5 -1
6-15 +0 common start bonus
16-17 +1
18 +2 elf max
18/01-18/75 +3 gnome and orc max
18/76-18/90 +4
18/91-18/99 +5
18/**-25 +6 human and dwarf max

DynaHack, UnNetHack and SporkHack go further:

Strength Damage Notes
18/** +6 vampire max (DynaHack and UnNetHack only)
25 +7 DynaHack, UnNetHack and SporkHack

Skill

Damage modifiers come from one of normal weapon skills, two-weapon skill, bare-handed combat and martial arts.

On top of this, riding skill stacks its own bonus on top of one of those four skill tables.

Normal weapon skills

Weapon skill level Damage
restricted and unskilled -2
basic +0
skilled +1
expert +2

DynaHack and dNetHack go further:

Skill level Damage Notes
restricted -5 DynaHack and dNetHack only
expert +3 DynaHack and dNetHack only

Two-weapon skill

Two-weapon is handled in a peculiar way: for each hit, you take the lesser of the skill of the hitting weapon and the two-weapon skill, then use the damage table in this section instead of the weapon skill table.

Two-weapon skill level Damage
restricted and unskilled -3
basic -1
skilled +0
expert +1

DynaHack and dNetHack go further:

Two-weapon skill level Damage Notes
expert +2 DynaHack and dNetHack only

Bare-handed combat

Bare-handed skill Damage Notes
unskilled +0
basic and skilled +1
expert and master +2
grand master +3 N/A; no role can reach this

Martial arts

Martial arts is bare-handed combat special-cased to Samurai and Monks, with higher damage and perks like staggering blows.

Martial arts skill Damage Notes
unskilled +1 N/A; martial arts roles always start at basic
basic +3
skilled +4
expert +6
master +7 Samurai max
grand master +9 Monk max

Special note: If the base damage rolled for a weapon and its enchantment does 1 damage (the minimum), it won't train the skill, but more importantly it won't get bonus damage from skill either. For most skill damage tables this distinction is negligible, but martial arts is treated like a d4 weapon, meaning 1-in-4 martial arts hits don't get the skill damage bonus. I account for this difference for Monk martial arts, but I omit it elsewhere.

DynaHack and UnNetHack always grant the skill damage bonus, in contrast to NetHack.

Riding skill

Unlike the other skill damage tables, this one stacks with the others.

Riding skill Damage
unskilled and basic +0
skilled +1
expert +2

DynaHack and dNetHack go further:

Riding skill Damage Notes
skilled +2 DynaHack and dNetHack only
expert +5 DynaHack and dNetHack only

Dealing with dice

The values that I've calculated express damage from D notation (or dice notation) give three values: minimum, average (mean) and maximum, like so:

   d6 = 1 / 3.5 / 6

That is, a single 6-sided die rolls a minimum of 1, an average of 3.5 and a maximum of 6.

The way to calculate the average of dice in the form of xdy is x * (y + 1) / 2, e.g. the average of 3d5 is 3 * (5 + 1) / 2 = 9.

hmon_hitmon and valid_weapon_attack

hmon_hitmon() is the core function where damage done by the player to a monster is calculated and ultimately inflicted. It pulls together the base damage done by a weapon from dmgval() (or rolls a d4 itself for bare-handed combat or martial arts), calls artifact_hit() for bonus damage and effects for artifact weapons, then stacks on your increase damage bonus, your strength damage bonus, your skill damage bonus, poison damage or instakill, silver damage and many other potential effects on hit.

Apart from the damage itself (tmp), the valid_weapon_attack flag is the most important variable of the whole function. In short, it determines whether the skill damage bonus is applied to the final damage, as well as whether the skill relevant to the attack (if any) is trained. The way valid_weapon_attack is set and used can be seen in this cut-down reproduction of the hmon_hitmon() function:

/* Note: rnd(x) returns a number from 1 to x inclusive. */

boolean hmon_hitmon(mon, obj, thrown)
{
    int tmp;
    boolean valid_weapon_attack = FALSE;

    if (!obj) { /* attack with bare hands */
        if (/* martial arts role */) {
            tmp = rnd(4);
        } else {
            tmp = rnd(2);
        }
        valid_weapon_attack = (tmp > 1);
    } else {
        if (/* potentially a proper weapon */) {
            if (/* invalid method of attack, e.g. hitting with a bow */) {
                tmp = rnd(2);
            } else {
                /* valid method of attack with a proper weapon */
                tmp = dmgval(obj, mon); /* <-- WEAPON BASE DAMAGE ROLLED HERE */
                valid_weapon_attack = (tmp > 1);

                /* Rogue backstab and some other stuff here... */

                /* artifact_hit() does bonus damage and effects */
                if (/* obj is an artifact */ && artifact_hit(...)) {
                    if (/* monster was killed by the artifact alone */) {
                        return FALSE;
                    } else if (/* artifact was ineffective against monster */) {
                        return TRUE;
                    }
                }
            }
        } else {
            /* handle non-weapons with tons of special cases */
        }
    }

    /* Add ring/intrinsic bonus damage and (conditionally) strength bonus here... */

    if (valid_weapon_attack) {
        tmp += weapon_dam_bonus(...); /* <-- SKILL DAMAGE BONUS ADDED HERE */
        use_skill(..., 1); /* TRAIN SKILL BY +1 POINT HERE */
    }

    /* Tons of special cases here... */

    /* Inflict damage, print hit messages here... */

    return destroyed ? FALSE : TRUE;
}

Note the two places where valid_weapon_attack = (tmp > 1), i.e. valid_weapon_attack is only true if the basic damage roll does 2 or more damage. In the case of a valid weapon attack with a proper weapon, here's a cut-down summary of the dmgval() function:

int dmgval(otmp, mon)
{
    int tmp = 0;

    /* WEAPON DAMAGE ROLL */
    if (/* mon is large */) {
        if (/* otmp base weapon type has non-zero damage specified vs. large */)
            tmp = /* base weapon type damage vs. large set in objects.c */;
        /* Add rest of large damage to tmp that should be in objects.c but doesn't fit. */
    } else {
        /* Do the same thing for small as for large above, but for damage vs. small instead. */
    }

    if (/* otmp is a proper weapon */) {
        tmp += otmp->spe; /* ADD/SUBTRACT WEAPON ENCHANTMENT */
        if (tmp < 0) tmp = 0; /* prevent negative damage */
    }

    if (/* otmp is made of leather */ && /* mon is thick-skinned */) {
        tmp = 0;
    }

    if (/* mon is a shade */ && /* otmp is not made of silver */) {
        tmp = 0;
    }

    if (/* a per-monster-and-object special case may apply */) {
        int bonus = 0;

        /* add to bonus for blessed otmp vs. undead mon */
        /* add to bonus for axe otmp vs. wooden mon */
        /* add to bonus for silver otmp vs. silver-hating mon */

        if (/* damage will ultimately be doubled due to otmp doing artifact damage */) {
            bonus = (bonus + 1) / 2; /* <-- halve bonus in anticipation of damage doubling */
        }
    }

    if (tmp > 0) {
        tmp -= greatest_erosion(otmp); /* <-- deduct damage for rust/rot/corrosion/etc. */
        if (tmp < 0) tmp = 0;
    }

    return tmp;
}

The most important parts here are the weapon roll at the very top, and where enchantment is directly included in damage.

Pulling all this knowledge together reveals that a +0 weapon that rolls a 1 will not inflict bonus damage for skill, nor will it train the relevant skill. This means that low damage weapons train slower that high damage ones. Note also that a +1 weapon will always include skill bonus damage and train skill, and a negatively enchanted weapon will roll 1 much more often and therefore will makes skill bonus damage and skill training much less likely per hit.

The skill bonus damage granted by NetHack is usually around +2 even at expert skill, so valid_weapon_attack makes very little difference in many cases, but for martial arts it makes quite a bit of difference, where grand master skill grants +9 damage. Recall that the martial arts damage roll in hmon_hitmon() is a d4:

Martial arts base damage and bonus
  Unconditional bonus Bonus considering valid_weapon_attack
Damage roll (d4) Skill bonus Total (before strength) Skill bonus Total (before strength)
1 9 10 0 1
2 9 11 9 11
3 9 12 9 12
4 9 13 9 13

If valid_weapon_attack is ignored, the average damage of martial arts considering the base damage roll and skill bonus damage is (10 + 11 + 12 + 13) / 4 = 11.5. However, if valid_weapon_attack is considered, the true average damage becomes (1 + 11 + 12 + 13) / 4 = 9.25, which is nearly a 20% damage reduction from what it otherwise could be. For simplicity, most of the damage calculations done here ignore this mechanic, except for martial arts.

DynaHack and UnNetHack change the valid_weapon_attack condition from (tmp > 1) to (tmp > 0), removing these biases for when to grant skill bonus damage and train skills from +0 weapons and martial arts entirely.

Common weapon and artifact reference tables

The common tables linked below ignore skill and enchantment. The tables for long swords and Grayswandir consider enchantments and different skill levels for quick comparison to final damage figures for different roles.

Damage profiles

I had two choices in calculating physical damage: be comprehensive, or only cover common cases. Being comprehensive would have involved hundreds more calculations than only covering common cases, so common cases is what I went with for the sake of practicality.

To that end, I divide the game into three phases, and make assumptions accordingly:

  • Early game
    • start str: +0 damage
    • basic skill for starting weapons, unskilled otherwise
    • enchantments: +0, unless it's a starting weapon with a guaranteed enchantment
  • Mid game
    • 18 str: +2 damage
    • expert skill, or the role's max skill(s) for the weapon(s)
    • enchantments: +0, most players don't enchant weapons until ready to enter Gehennom
  • Late game
    • 18/** str: +6 damage
      • for simplicity, 18/** is the only strength considered
      • only reachable by humans, dwarves and gauntlets of power
      • gnomes, orcs: 18/75 max strength = +3 damage
      • elves: 18 max strength = +2 damage
    • expert skill, or the role's max skill(s) for the weapon(s)
    • enchantments: +7

Common damage values by role

Each role page consists of the damage of various physical damage options in the early, mid and late game phases, followed by specific damage breakdown for selected late game physical damage options.

The values below are the average damage inflicted by various damage options available to each role in the late game. Check the role page links for damage breakdown and damage at other phases of the game.

  • User:tungtn/Physical damage analysis/Archeologist
    • +7 Grayswandir
      • non-silver: 31
      • silver: 41.5
    • two-weapon +7 Grayswandir, +7 silver saber
      • non-silver: 48.5
      • silver: 69.5
  • User:tungtn/Physical damage analysis/Barbarian
    • +7 Cleaver
      • 25.5/27
    • two-weapon +7 Frost Brand, +7 silver saber
      • resist cold non-silver: 33/35
      • resist cold silver: 43.5/45.5
      • cold non-silver: 44.5/48.5
      • cold silver: 55/59
  • User:tungtn/Physical damage analysis/Caveman
    • +7 Sceptre of Might
      • co-aligned: 15.5/14.5
      • cross-aligned: 27/25
  • User:tungtn/Physical damage analysis/Healer
    • +7 poisoned darts
      • resist poison: 22/21
      • poison: 29/28
    • +7 Grayswandir
      • non-silver: 29
      • silver: 39.5
    • +7 Staff of Aesculapius
      • non-drain: 18.5
      • drain: 33.5
    • +2 Magicbane
      • non-stun: 13.57/13.07
      • stun: 16.48/15.98
  • User:tungtn/Physical damage analysis/Knight
    • +7 lance (riding)
      • 29.3/30.3
    • two-weapon +7 lance, +7 long sword (riding)
      • 32.9/34.7
    • two-weapon +7 Excalibur, +7 long sword
      • 40.5/44.5
    • two-weapon +7 Frost Brand, +7 long sword
      • cold resist: 35/39
      • cold: 46.5/52.5
  • User:tungtn/Physical damage analysis/Monk
    • martial arts (grand master)
      • 18/17.5
    • +7 Excalibur (lawful crowning)
      • 23/25
  • User:tungtn/Physical damage analysis/Priest
    • +7 Grayswandir
      • non-silver: 29
      • silver: 39.5
    • +7 unicorn horn
      • 20.5
  • User:tungtn/Physical damage analysis/Ranger
    • +7 poisoned silver arrows
      • resist poison non-silver: 31.25
      • resist poison silver: 57.5
      • poison non-silver: 40
      • poison silver: 66.25
    • +7 Stormbringer
      • resist drain: 18/17.5
      • drain: 24/23.5
    • +7 Grayswandir
      • non-silver: 27
      • silver: 37.5
  • User:tungtn/Physical damage analysis/Rogue
    • +7 Stormbringer
      • resist drain (XL15 backstab): 19/18.5 (27/26.5)
      • drain (XL15 backstab): 25/24.5 (33/32.5)
    • +7 Grayswandir
      • non-silver (XL15 backstab): 30 (46)
      • silver (XL15 backstab): 40.5 (56.5)
    • two-weapon +7 Stormbringer, +7 crysknife
      • resist drain: 37.5/37
      • drain: 43.5/43
    • two-weapon +7 Grayswandir, +7 crysknife
      • non-silver: 48.5
      • silver: 59
    • +7 silver daggers
      • non-silver (XL15 backstab): 28.75/27.5 (48.75/47.5)
      • silver (XL15 backstab): 55/53.75 (75/73.75)
  • User:tungtn/Physical damage analysis/Samurai
    • +7 ya (fired from a yumi)
      • 35
    • +7 Tsurugi of Muramasa
      • 28.775/31.925
    • two-weapon +7 Excalibur, +7 katana
      • 43.5/46.5
    • two-weapon +7 Grayswandir, +7 silver saber
      • non-silver: 44.5
      • silver: 65.5
  • User:tungtn/Physical damage analysis/Tourist
    • +7 unicorn horn
      • 20.5
    • +7 poisoned darts
      • resist poison: 22/21
      • poison: 29/28
    • two-weapon +7 Grayswandir, +7 silver saber
      • non-silver: 46.5
      • silver: 67.5
  • User:tungtn/Physical damage analysis/Valkyrie
    • two-weapon +7 Excalibur, +7 long sword
      • 40.5/44.5
    • two-weapon +7 Grayswandir, +7 silver saber
      • non-silver: 44.5
      • silver: 65.5
  • User:tungtn/Physical damage analysis/Wizard
    • +7 silver daggers
      • non-silver: 23/22
      • silver: 44/43
    • +2 Magicbane
      • non-stun: 10.57/10.07
      • stun: 13.48/12.98
    • +7 Staff of Aesculapius
      • resist drain: 14.5
      • drain: 29.5
    • +7 Frost Brand
      • resist cold: 13.5/15.5
      • cold: 25/29
    • +7 Grayswandir
      • non-silver: 23
      • silver: 33.5

All of these calculations were done manually, and with the sheer volume of calculations it's almost certain that small errors exist, so keep that in mind when reading the raw damage values.

Monster hit point examples

To put these damage numbers in perspective, it helps to know the maximum hit points of certain monsters. See Hit points#Monster for the exact details.

Monster hit points are generally based on a monster's level: d8 per level. A monster's level is based on its intended level listed in monst.c, which is then modified by the current difficulty level (+1 for every 5 points of difference) and hero experience level (+1 for every 4 points of difference) in adj_lev().

Knowing these rules, you can approximate likely initial hit points of monsters by predicting the level, then:

  • minimum HP = level * 1
  • average HP = level * 4.5
  • maximum HP = level * 8

For example, a level 5 soldier ant has 5 min / 22.5 avg / 40 max initial hit points.

Hit points of notable monsters, most of which have special rules for their starting hit points:

  • Riders - 10 min / 45 avg / 80 max - Riders are hard-coded to have 10d8 hit points in makemon().
  • Demon princes:
    • Juiblex - 88 exactly
      • Note that zapping a wand of digging while engulfed will reduce Juiblex to 1 hit point!
    • Yeenoghu - 100 exactly
    • Orcus - 120 exactly
    • Geryon - 132 exactly
    • Dispater - 144 exactly
    • Baalzebub - 166 exactly
    • Asmodeus - 198 exactly
    • Demogorgon - 200 exactly
  • Wizard of Yendor (killed 0 times) - 30 min / 135 avg / 240 max - 30d8 from standard hit point rules, since the Wizard starts at level 30.

Taking the initial hit points of a monster and dividing it by damage gives a rough idea of how tough a monster is in combat.

Observations

Sources of damage from player attacks can be broadly divided into flat bonuses and multipliers. The main flat bonuses are, in rough descending order of impact:

  • silver - Against a silver-hating monster, any silver object does +d20 damage from an average of +10.5 damage per hit, which is more than any artifact weapon effect. Notably, this applies to demons and thus demon princes.
  • Rogue backstab - Exact impact scales based on the Rogue's experience level, since it does +d(XL) bonus damage to fleeing monsters.
  • enchantment - e.g. a +7 weapon does +7 damage. Two-weaponing with two +7 weapons grants +14 damage before considering anything else.
  • strength - Maximum strength grants +6 damage to melee hits, but not ranged ones. Two-weaponing pushes this up to +12 damage.
  • weapon base damage - The damage in dice notation that's listed next to weapons in their wiki pages. Non-two-handed weapons have dice ranging from d2 to d12, averaging 1.5 to 6.5 damage per hit.
  • weapon skill - Almost meaningless in terms of damage, despite needing multiple tables to describe earlier. More impactful in the early game where its to-hit modifiers make a difference.

Except for silver and a handful of other tiny factors, these flat bonuses are modified by what I loosely refer to as multipliers, which amplify or diminish the flat bonuses to determine the final damage inflicted to monsters. The main multipliers are, in rough descending order of impact:

  • speed - Going from normal speed (100%) to very fast (166%) adds +66% to damage per turn on average, and going from fast (133%) to very fast (166%) adds about +25% to damage per turn on average. It is the only multiplier that applies to all flat bonuses, and it stacks with other multipliers here! All characters with speed boots effectively get this bonus permanently.
  • two-weapon - Effectively almost x2 damage for melee for the 6 out of 13 roles that have any skill in it. Late game two-weapon does 35 average damage minimum per round; the best non-two-weapon non-Grayswandir alternatives do 25 average damage maximum (Grayswandir does around 30). Much of its damage comes from allowing two enchantable weapons (+7 each for +14 total, the corollary of the Monk adage: "You can't enchant your fists") and applying strength bonus to both hits (+6 each for +12 total).
  • artifact weapon double damage - Applies to certain artifact weapons, and only to the damage done by the artifact itself, though it does stack with two-weapon if the artifact is one-handed. Most double damage artifact weapons are the Banes, notable exceptions are:
    • Grayswandir - vs. all, also does silver damage, which is not doubled
    • Frost Brand and Fire Brand - vs. non-cold and non-fire resistant respectively
    • Sceptre of Might - vs. cross-aligned (i.e. monsters whose alignment differs from yours)
    • Staff of Aesculapius - vs. non-drain resistant, also does d8 bonus draining which is not doubled
  • multishot - Applies only to ranged attacks. Expert multishot grants d3 shots and grants x2 average damage, the special role/weapon bonuses for Ranger, Rogue and Samurai push this up to d4 shots for x2.5 average damage, and race/weapon can push this up to d5 shots for x3 average damage.

The damage inflicted by characters in late-game NetHack is a combination of all of these factors.

One-weapon melee vs. Two-weapon vs. Ranged Damage

Minimum, maximum and average late game damage. Damage for each combat option has been normalized by taking the average small/large damage, then the average of all distinct damage cases.

  • One-weapon melee
    • Minimum: 11.75 for Wizard with +2 Magicbane.
      • Ignoring Magicbane, minimum is 17.75 for Monk martial arts at grand master.
      • Considering only "proper" weapons, minimum is 20.5, a tie between Caveman +7 Sceptre of Might and Priest/Tourist +7 unicorn horn.
    • Maximum: 36.25 for Archeologist +7 Grayswandir.
    • Average: 25.71, keeping in mind that some of the weaker roles had multiple options due to lack of obviously powerful options.
  • Two-weapon
    • Minimum: 33.8 for Knight two-weapon +7 lance, +7 long sword.
      • If the main hand lance knocks the monster backwards, the second hit won't land. Swapping lance and long sword hands reduces joust damage from +2d10 to +2d3.
    • Maximum: 59 for Archeologist two-weapon +7 Grayswandir, +7 silver saber.
    • Average: 47.69.
  • Ranged
    • Minimum: 25 for Healer/Tourist +7 poisoned darts.
    • Maximum: 51.25 for Rogue +7 silver daggers.
    • Average: 36.33.

Qualitative mapping of damage to Gehennom experiences

Just looking at the late game damage options and how people on IRC talk about their experiences of Gehennom and what weapons they're using, you can get a rough idea of what people consider good damage and bad damage.

The minimum damage that people are still comfortable fighting monsters in Gehennom is around 20 per hit (or 33 per turn with "Very Fast" speed), which is about the average damage done by +7 Stormbringer. Martial arts at grand master skill is considered weak, doing around 18 damage on average per hit (or 30 per turn with "Very Fast" speed).

The point where combat starts to become trivial in Gehennom is around 35 damage per hit (or 58 per turn with "Very Fast" speed), which is about the average damage done by two-weapon +7 Frost Brand, +7 long sword in the worst case of a cold-resistant monster.

Impact of skill on overall damage

Just how much do combat skills contribute to late game damage?

One-weapon combat

As a reminder, this is the bonus damage granted to attacks by skill level:

Normal weapon skills
Weapon skill level Damage
restricted and unskilled -2
basic +0
skilled +1
expert +2

This applies once for one-weapon combat for +2 damage at expert skill. Recall that one-weapon combat (with actual weapons) ranges from 20.5 minimum, 36.25 maximum and 25.71 average. Skill for one-weapon combat in this case therefore comprises 5.5-9.7%, average 7.8% of its late game damage.

Martial arts

Martial arts is a skill exclusive to monks and samurai, both of whom start with it at basic skill. Samurai can advance the skill to master, while monks can advance all the way to grand master. Martial arts for samurai is vastly inferior damage-wise to any of their other combat options, so this section will only consider monks.

Martial arts
Skill level Bonus damage
basic +3
skilled +4
expert +6
master +7
grand master +9

It's probably easier to illustrate how martial arts skill contributes to final damage by simply showing how the damage breaks down, since the valid_weapon_attack mechanic affects it. Assuming 18/** strength and grand master skill:

Martial arts damage breakdowns
Damage roll (d4) Skill damage (% of total) Strength damage Total
1 +0 (0%) +6 7
2 +9 (53%) +6 17
3 +9 (50%) +6 18
4 +9 (47%) +6 19

Two-weapon combat

The two-weapon bonus damage table is identical to one-weapon skills, but -1 at all levels.

Two-weapon skill damage
Skill level Bonus damage
unskilled -3
basic -1
skilled +0
expert +1

This applies twice, once for each weapon hit for a total of +2 damage at expert skill. Recall that two-weapon combat damage ranges from 33.8 minimum, 59 maximum and 47.69 average. Skill for two-weapon combat therefore comprises 3.3-5.9%, average 4.1% of its late game damage.

Ranged combat

Ranged combat uses the same skill-to-damage table as one-weapon combat, but also permit multishot (at least for all ranged weapons that matter): the ability to fire/throw 1-to-n projectiles in a single attack round. The maximum multishot limit is determined as follows:

  • Base multishot count from skill:
    • 1 at basic skill
    • 2 at skilled
    • 3 at expert skill
  • +1 if one of the following role bonuses apply:
    • Ranger using any ranged weapon.
    • Rogue throwing daggers of any kind.
    • Samurai firing ya from a yumi.
  • +1 if one of the following race bonuses apply:
    • Elf firing elven arrows from an elven bow.
    • Orc firing orcish arrows from an orcish bow.

In other words, expert multishot alone launches d3 projectiles for an average of 2, and stacking an extra bonus shot launches d4 projectiles for an average of 2.5. Getting to d5 projectiles for an average of 3 is only possible as an elven or orcish ranger with the right bow and arrows.

Returning to bonus damage from skill, the +2 damage applies to each projectile that hits, which is an average of 2 to 3 times, leading to +4 to +6 damage per volley. Recall the bounds of ranged damage in the late game is 25 to 51.25 damage. Skill for ranged attacks therefore comprises 11.7-16% of its late game damage.

Combat option selection

The fact that skill matters so little would imply would imply that almost all late game characters would gravitate towards the same weapons, regardless of role. If that's so, why do all of the role pages in these notes have such different combat options?

The combat options for each of the roles was mostly based on advice given in these wiki pages. There a couple of factors that explain this. The first is that players don't like to use weapons outside of their role's skill set, even going into the late game, as a habit carried from the early game where skills in fact do matter, due to their to-hit bonuses being noticeable/relevant in the early game. The other factor is availability/convenience, e.g. random sacrifice gifts, and Excalibur for lawful characters since they either start with or can get a long sword from a barrow wight and dip it into a fountain.

Also note that due the high damage done by late game characters in general, there's no compelling need to get the most damaging weapon(s)/combat options. This is a specific instance of a more general pattern in NetHack gameplay, where players fall into old habits game after game because the mechanics put no pressure to push players out of their comfort zone and into variety. This is the result of NetHack being designed more around the idea of enabling actions than restricting them, but the idea of coercing players out of habit and into variety is fertile ground for variants.

Grayswandir damage

Fire Brand vs. Frost Brand

Combat changes made by Variants

Double damage for two-handed weapons (SporkHack, UnNetHack, DynaHack)

+1 bonus damage for expert skill (dNetHack, DynaHack)

-5 damage for restricted skill (dNetHack, DynaHack)

Reduce influence of Luck on To-Hit

Player combat makes noise

Brainstorm of possible improvements

TODO