Armor class

From NetHackWiki
(Redirected from Damage reduction)
Jump to navigation Jump to search

Armor class, or AC, is a concept in NetHack that represents your defenses against attacks from monsters, and is borrowed from older editions of Dungeons & Dragons.

A user has suggested improving this page or section as follows:

"Discuss monster and pet AC at some point, among other tasks."

Description

Lower values of AC signify a better ability to avoid attacks and take less damage from them. A character with no worn armor or protection has AC 10, and wearing a piece of armor subtracts its total AC from your current AC. The total AC of a piece of worn armor is the sum of its base AC value and any enchantment on that armor - a +0 leather armor lowers your AC value by 2, while that same armor at +3 lowers it by 5, and the same armor at -3 would increase your AC value by 1.

Your current total AC is the total value of all worn armor plus any intrinsic and extrinsic protection you possess, which is then subtracted from your base AC; e.g., a player character with -10 AC has 20 points of AC from armor and/or protection. Any AC value of -128 or lower is fixed to -128, making it the lowest value possible; similarly, any AC value of 127 or higher is fixed to 127, making it the highest value possible.[1]

Armor class and accuracy

When a monster attacks you, the chances of that monst hitting successfully are determined by a relatively simple formula:[2][3]


10 + AC + XL

If your AC is less than 0, the formula for the target number is instead:


10 + R\in\{-1,\dots,\text{AC}\}, + XL

AC represents the target's current armor class value, and XL represents the attacker's level (i.e., the number of hit dice they have). R∈{-1,...,AC} signifies a random number from -1 to your current AC value. A d20 is rolled against the number produced by this formula, and rolling lower than that target number results in a hit. As an example, a level 1 goblin attacking your starting Valkyrie (which has 6 AC due to their +3 small shield) must roll lower than 10 + 6 + 1 = 17 to hit, giving them a 1620 chance (or 80%).

After the total is computed, additional penalties are applied that add to or subtract from the chance of hitting in the following order:

  1. Subtract 2 for an attacker that cannot see, and subtract 2 for an attacker that is trapped.
  2. Add 4 if the target is paralyzed or otherwise prevented from moving.
  3. If the final target number would be less than or equal to zero, set it to 1.
  4. If the monster is using a weapon, apply its to-hit bonuses or penalties.
  5. If the monster gets multiple attacks, the die used for each subsequent roll adds an extra side (e.g. a monster with three attacks would roll d20, then d21, then d22.

Due to this method of calculation, the effects of lower AC on damage reduction and accuracy of monster attacks diminishes with lower AC values, and no AC value can confer 100% complete protection from damage.[4] To provide an example of a "complex" calculation involving negative AC, if the level 1 goblin from the previous example attacks a better-armored Valkyrie with -5 AC, that chance is reduced to 10 - R\in\{-1,\dots,\text{-5}\}, + 1, or any value from to 6 to 10; this produces a chance between 30% at lowest and 50% at highest that the goblin will hit, depending on the target number for the roll.

Other examples of "complex" cases are listed below:

  1. Your AC is -5. Since it is a negative number, a number between -5 and -1 is chosen at random. In this case, it is -3. 10 is added to that, giving 7. The monster has a level of 4, and it has two attacks. Added together, that gives us 11. On the first attack, the random number chosen is 10. The monster hits. On the second attack, the random number chosen is 12 (out of a possible 21). The monster misses.
  2. Your AC is -20. A number between -20 and -1 is chosen at random. In this case, -17 is chosen. 10 is added to that, giving -7. The monster has a level of 1. Added together, that gives -6. Since -6 is less than 0, it is set to 1. On the first attack, the random number chosen is 1. The monster misses, with a special attack message (it "just misses", rather than "misses").
  3. Your AC is -20. A number between -20 and -1 is chosen at random. In this case, -4 is chosen. 10 is added to that, giving 6. The monster has a level of 1. Added together, that gives 7. On the first attack, the random number chosen is 5. 7 is greater than 5, so the monster hits.

Damage reduction

In addition to determining the accuracy of attacks, AC values that are less than 0 also decrease the damage you take attacks that do hit.[5][6] To return to example 3:

Your AC is -20. A number between -20 and -1 is chosen at random. In this case, -4 is chosen. 10 is added to that, giving 6. The monster has a level of 1. Added together, that gives 7. On the first attack, the random number chosen is 5. 7 is greater than 5, so the monster hits.

In this example, the monster hits and deals 5 points of base damage. The damage is then reduced by a random number between 1 and the absolute value of your AC, which in this case would be any value from 1 to 20. If this produces a value lower than 1, it is set to 1 so that the monster will always do at least 1 point of damage if it hits. If you have half physical damage, the property is applied after this reduction.

Strategy

Improving your armor class is the first priority for almost any starting character, from a Knight or Samurai looking for something lighter and just as protective as their initial body armor, to an Archeologist or Tourist trying to find anything to replace their meager leather jacket or cover their Hawaiian shirt. However, armor class is only one portion of a player (or player character's) kit, and a good AC alone is not enough to protect from some attacks with additional effects, particularly elemental ones - in addition to improving your AC, you will also need to obtain resistances and other properties such as reflection to increase your odds of survival. Even -50 AC will eventually fail if you have no other protection against poisonous stings or even a wand of death.

An armor class of 0 is often a decent beginning goal, though this does not guarantee safety against some deadly early monsters such as jaguars, unicorns and soldier ants (all with a monster difficulty of 6). While you will eventually want to push towards -10 AC for taking on most early and mid-game monsters such as these, you will also want to refine and adapt your tactics accordingly - one of the best defenses is usually a good offense. Keep in mind as well that slower monsters can be just as threatening as fast ones, if not more so: mimics, mumakil and some monsters that can wield strong weapons (e.g. dwarves wielding mattocks) can deal considerable melee damage, making it vital to leverage your better speed against them.

Armor class and ascension

An ascension kit may feature armor and other forms of protection that bring AC anywhere from -15 to as low as -40, combined with various vital resistances and other properties. Just as important for ascension is having a variety of attack options, being mindful of movement and other tactics that decrease reliance on good AC to bail you out constantly: Keep ray-based wands for monsters that are skittish or have low MR score; draw monsters into hallways to line them up for your wands and ranged attacks; use slow monster and sleep on much quicker threats; funnel groups through narrows passages to control how many you fight at once; and if all else fails, scare monsters to put some distance between you and them.

With the above and other similar tactics, even a character with poor AC can survive against and possibly kill much stronger opponents. Many polymorph forms also have a base armor class better than 10, allowing players with polymorph control to take advantage of them for similar purposes, whether bolstering a weaker character to ensure survival or further strengthening an already-complete build to advance quicker towards ascension. For an idea of how much AC is 'necessary' to ascend, see the section below.

Armor class and damage averages

The following table shows the mean damage some monsters can inflict at various armor classes, with poison damage being ignored. The damage is calculated "per turn" of a normal speed player (12), so the chart shows the cumulative damage of 1.8 bites from a giant bat, or 3 pummels from an air elemental. The air elemental damage assumes a 100% hit rate (i.e., that the elemental has already engulfed the player).

Mean Damage Taken Per Turn of a Normal Speed Adventurer
AC Jackal Giant Bat Rothe Jaguar Soldier Ant (poison resistant) Unicorn Leocrotta Air Elemental (Engulfing) Minotaur
10 1.4 6.4 6.4 11.9 18.8 20.0 31.5 16.5 52.5
9 1.4 6.4 6.4 11.9 18.8 20.0 31.5 16.5 52.5
8 1.3 6.1 6.4 11.6 18.2 20.0 31.5 16.5 52.5
7 1.2 5.8 6.2 11.2 17.3 19.7 31.5 16.5 52.5
6 1.1 5.5 6.0 10.7 16.4 18.7 31.0 16.5 52.5
5 1.0 5.1 5.7 10.1 15.5 17.7 30.0 16.5 52.5
4 1.0 4.8 5.4 9.5 14.6 16.7 28.5 16.5 52.5
3 0.9 4.5 5.1 9.0 13.7 15.7 27.0 16.5 52.5
2 0.8 4.2 4.8 8.4 12.8 14.8 25.5 16.5 52.5
1 0.8 3.9 4.5 7.9 11.8 13.8 24.0 16.5 52.5
0 0.7 3.5 4.2 7.3 10.9 12.8 22.5 16.5 52.5
-1 0.4 2.4 2.9 6.3 8.4 9.7 18.0 13.8 48.8
-2 0.4 2.0 2.5 6.5 7.3 8.5 16.0 12.6 46.9
-3 0.3 1.7 2.2 5.4 6.3 7.4 14.1 11.5 44.9
-4 0.3 1.4 1.9 4.6 5.4 6.5 12.4 10.5 42.7
-5 0.3 1.2 1.7 3.9 4.6 5.7 10.8 9.6 40.3
-6 0.3 1.1 1.6 3.4 3.9 5.0 9.4 8.8 37.9
-7 0.3 0.9 1.4 3.0 3.4 4.4 8.3 8.1 35.5
-8 0.2 0.8 1.3 2.6 2.9 3.9 7.3 7.5 33.2
-9 0.2 0.8 1.2 2.4 2.5 3.5 6.4 7.0 31.0
-10 0.2 0.7 1.1 2.1 2.2 3.1 5.7 6.6 28.9
-15 0.1 0.4 0.8 1.3 1.2 1.8 3.3 5.4 20.0
-20 0.1 0.3 0.5 0.9 0.8 1.2 2.1 4.8 13.7
-25 0.1 0.2 0.4 0.7 0.6 0.9 1.5 4.4 9.4
-30 0.1 0.2 0.4 0.6 0.5 0.7 1.2 4.2 6.8
-35 0.1 0.2 0.3 0.5 0.4 0.6 1.0 4.0 5.2
-40 0.0 0.1 0.3 0.4 0.3 0.5 0.8 3.9 4.1

How much is enough?

The data for the following table comes from 500,000 simulated minotaur attacks (claw 3d10, claw 3d10, butt 2d8). Minotaurs appear often in the later game, hit hard, and ignore Elbereth, making them the biggest physical damage threat in the late game and a natural choice of benchmark.

The percentage entries indicate how likely you are to take less than a certain amount of damage. For example, if your armor class is -15, 50% of the time a minotaur's three attacks will do less than 16 damage total. And if your armor class is -25, you will take no damage 25% of the time.

Armor class Mean damage per round 25% less than 50% less than 95% less than 99% less than
-10 23.1 17 24 40 47
-15 16 9 16 35 42
-20 11 3 11 30 37
-25 7.5 1 5 26 34
-30 5.4 1 3 23 31

In the notes for the MIT NetHack course, Raxvulpine recommends a reasonable guideline AC of -20 as the baseline for an ascension kit. While 11 damage per enemy turn is manageable with with smart play, as shown above you can still be hit for 31 damage or more in one round by a minotaur, even if your armor class is -30.

Best possible armor class

As another form of thought exercise, the best armor class possible is detailed below:

Armor piece Protection With enchantment
Any dragon scale mail 9 14
Cloak of protection 3 8
Elven leather helm 1 8
Elven shield 2 9
Elven boots 1 8
Gloves, any type 1 6
Hawaiian shirt or T-shirt 0 5

Assuming nine points of protection, an enchantment of +5 for each set of armor (or +7 for elven armor), this gives a total of 67 points, or -57 AC. There is no limit to how much intrinsic protection you can have, but donating to priests will rarely grant more than nine points without significant luck; further protection can be granted by rings of protection or prayer, or temporarily by the protection spell.

Generally speaking, however, obtaining the lowest AC possible usually requires several charges from magic markers to write scrolls of enchant armor, then bless them before reading. Naturally, this makes it a very rare AC value to see in practice: there are other means of ensuring survival beyond high AC as discussed earlier, and for almost all ascension kits AC from armor is somewhat less important than additional properties that the armor provides (e.g., shield of reflection and jumping or speed boots), all quite dependent on the player's build of choice.

For example, while the cloak of protection grants the highest AC, it can easily be superseded by a robe, cloak of magic resistance or cloak of displacement; conversely, if no spellcasting boosts are needed and magic resistance is covered by other means, the cloak of protection becomes more viable as a source of MC3. Many players also forgo shields in favor of twoweaponing for extra damage where possible. Marker charges in particular can be spent on other options: the scroll of genocide for especially annoying or problematic monsters; the scroll of gold detection for confused reading to find portals and traps; and the scroll of remove curse to uncurse your inventory.

History

Armor class as a concept has been used since Jay Fenlason's Hack.

Integer overflow

In NetHack 3.4.3 and earlier versions, including some variants based on those versions, positive AC behaved differently from negative AC: it will wrap around from 127 to -128, which is generally only possible by eating several negatively enchanted rings of protection.[7] This bug was fixed in NetHack 3.6.0.

Variants

SLASH'EM

In SLASH'EM, dexterity grants bonuses to AC:

Dexterity AC
3< +3
4-5 +2
6-7 +1
8-14 0
15 -1
16 -2
17 -3
18 -4
19 -5
20-21 -6
22-23 -7
24> -8

Doppelgangers and Monks have additional conditions for their dexterity bonuses: Doppelgangers get the bonus for not wearing any armor, and Monks get the bonus for not wearing a shield, not wielding a weapon, and not wearing body armor other than cloaks and robes.

SporkHack

In SporkHack, monsters gain a bonus to their base AC dependent on their monster level: higher-level foes are generally much harder to hit and deal damage to, while higher-level pets have better odds of survival.

dNetHack

In dNetHack, AC and damage reduction (or DR) are applied and calculated separately, as well as differently - each piece of armor now has an AC value and a DR value.

AC values determine whether or not the attack is blocked by your armor/protection; DR is applied on a per-slot basis for each individual attack, with each piece of armor applying its DR value to attacks targeting one or more slots: feet/legs, lower torso, upper torso, hands, and head. A slot that a target monster does not possess is ignored. For DR values of more than 10, damage done by a given attack targeting a certain slot is reduced by 10 + d(DR - 10), e.g. attacks against a slot with 18 DR effectively have their damage reduced by 10 + d8 (or 11-18) on each hit

There are three categories for a monster's AC: their natural base AC, their "dodge" AC (which represents the ability to dodge attacks, and is unrelated to the dexterity stat), and any "protection" AC from other forms of defense (such as divine protection or force fields). "Dodge" AC can be nullified by immobilizing the monster in question, e.g., trapping or paralyzing them; "protection" AC can be nullified with cancellation. Similarly, DR comes in two forms: natural DR which represents physical toughness, and DR from "protection" as with AC (which can similarly be nullified by cancellation). AC and DR from physically-worn armor are generally considered to be its own category; most attacks roll against total AC and DR from all applicable sources, while touch attacks exclude AC and DR from physical armor.

notdNetHack

notdNetHack also calculates and applies AC and damage reduction separately, and does so similarly to dNetHack.

Encyclopedia entry

See the encyclopedia entry for armor.

References