Digging

From NetHackWiki
Revision as of 23:33, 11 September 2024 by Umbire the Phantom (talk | contribs) (formatting + copyedit pass)
Jump to navigation Jump to search

In NetHack, digging is the act of tunnelling through the walls or floor of the dungeon level.

Description

There are multiple methods of digging:

Digging with a pick-axe or dwarvish mattock takes several turns, while the spell of dig and wand of digging generally take a single turn.

The hero and monsters can dig in any of the eight directions, and the hero can also dig downwards using a tool, the wand or the spell - attempting to dig upwards only works with the wand or spell, and will only cause a rock to fall on the hero's head. Tunneling monsters can dig in eight directions, but monsters can only dig downward with the wand.

Digging downwards with a digging tool will eventually create a pit in the floor; digging downwards with a tool while in a pit will turn the pit into a hole, causing the hero to fall through it immediately unless they have flying. Digging downwards when standing on a sink will turn it into a non-magical fountain, and digging downwards when standing on a fountain will most likely create several pools of water.

Zapping the wand of digging or spell of dig downwards instantly creates a hole beneath the hero in most circumstances, causing them to immediately fall through unless they have flying or levitation. Monsters will only zap a wand of digging when trying to escape the hero, and will always aim downward to create a hole that they will fall through; a monster that can fly will immediately swoop through the hole instead.

Undiggable levels

The ground or the walls of certain levels or sections of a level can be set as non-diggable (or informally "undiggable"), which prevents them from being completely dug through: a non-diggable wall completely blocks digging tools and stops rays from the wand of digging and spell of dig, while a non-diggable floor prevents holes from being made in them by any means (i.e. wands and spells will always fail, though pits can still be created using digging tools). Some walls can also restrict digging by limiting the effects of digging rays to one square per charge or casting - this is mostly applied for maze levels, particularly those found in Gehennom. Iron bars on a non-diggable level or section cannot be dissolved by acid.

The following levels have non-diggable walls and/or floors:

  • Sokoban has non-diggable walls, and the bottom level also has a non-diggable floor.
  • The ground at the bottom of several dungeon branches is typically non-diggable.
  • The Castle has non-diggable walls between its maze sections.
  • The Wizard's Tower is surrounded by non-diggable walls that separate it from the rest of the Gehennom levels surrounding them.

Digging speed

The following discussion of digging speed only applies to digging with pick-axes and dwarvish mattocks, as digging with a wand of digging or the dig spell always takes exactly one action.

Summary of factors

A pick-axe or mattock takes roughly 5 turns to dig horizontally, and 20 turns to dig through the floor. However, the actual time varies depending on a number of factors.

The following things impact the speed of digging:

  • Having high dexterity and strength makes digging faster.
  • Being a dwarf makes digging faster.
  • Enchanting the pick-axe or mattock and/or wearing a ring of increase damage with positive enchantment makes digging with them faster, while a pick-axe or mattock with negative enchantment and/or erosion, or wearing a negatively enchanted ring of increase damage, slows digging with them.[1]
  • Having intrinsic or extrinsic speed indirectly speeds up digging, since the digging actions will be complete in fewer turns

The following things have no impact on digging speed, although they might be expected to:

  • Having higher pick-axe skill
  • Using a dwarvish mattock rather than a pick-axe
  • having higher luck

Full explanation and calculations

You can dig up rocks, boulders, and statues with a pick-axe or a dwarvish mattock, and chop down non-petrified trees with an axe.

Each move you spend digging, you generate

9 + d5 + strength & dexterity bonuses + enchantment - erosion  + increase damage bonus

points of digging effort, with the result doubled if you are a starting race dwarf.[1] The strength & dexterity bonuses are the same as those used in attacks.[2] The pick-axe skill does not play a role. Player speed proportionally speeds up digging, since you get more actions per turn.

Terrain type Digging effort needed Examples: expected turns
STR=11, DEX=11 and thoroughly rusty STR=18, DEX=18 and +3 mattock
through an existing pit 251 21.4 28.3 15.2 13.0
other floor, fountain, sink, any non-pit trap 51 4.8 6.1 3.4 3.0
statue, boulder, wall, solid rock, (secret) door; chop down tree 101 8.9 11.7 6.3 5.6

There is no speed difference between a pick-axe and a mattock; however, mattocks are heavier, two-handed, and can be generated enchanted.

Wielding a digging tool by applying it does not take time only if you consent to actually dig at the confirmation prompt.[3][4][5]

Shop doors and walls will cause the warning message "This door/wall seems too hard to dig." to interrupt you, but will not take any longer to destroy if you persist. Digging through the walls or door is costly, but the floor is free. Shopkeepers have a rough idea how long this takes and will move to prevent theft.

Special cases: Fumbling causes bad effects instead (33% chance). Digging down on an altar is impossible, but would incur the god's wrath and anger any attending priest. On the Plane of Earth, earth elementals can form, and your passage may collapse.

Digging monsters are not covered in this discussion.

Strategy

You can escape by digging downwards and making a hole. You will generally need a one-action method to dig, such as a wand or spell. Remember that this will deepen your dungeon level, and you might find yourself in a worse position. Monsters which follow you on stairs will also follow you when you do this. Monsters will also use this escape technique when they possess a wand of digging, which can be aggravating.

If you do not have a way to cross water, you can access Medusa's island by digging down then taking the upstair from the level below. You should be prepared to kill Medusa. Also, make sure you're not standing next to water, since your hole will fill with water, and you may drown.

You must cross solid rock to access the portal on the Plane of Earth. Digging is usually the most convenient method. Fortunately, several digging methods are provided for you on the plane itself, although it pays to go prepared.

It is frequently convenient to dig through the walls of mazes, to make shortcuts between the stairs and minimize the chances that the Wizard of Yendor will show up when you're racing to the upstairs. Similar shortcuts can also make it more feasible to carry sacrifices to altars from adjacent levels.

Digging is an essential part of the metastrategy digging for victory.

You can identify undiggable levels by attempting to make a hole by digging. If you can't make more than a pit, it is an undiggable level. This is particularly useful for identifying the deepest level of Gehennom, where the vibrating square is located; this level otherwise looks like another level of Gehennom. If you don't want to move deeper when the level is diggable, you can levitate and zap a wand of digging or cast the spell downward.

Frequently, digging out of or into a room can be easier (and sometimes faster in game time) than searching for a secret door.

Some areas, such as vaults and the luckstone in the Gnomish King's Wine Cellar, can be most easily accessed by digging.

Messages

You start digging downward. You dig a pit in the floor.
You dug downward with a digging tool.

References

  1. 1.0 1.1 src/dig.c in NetHack 3.6.7, line 300: note that 10 + rn2(5) is 9 + d5
  2. src/weapon.c in NetHack 3.6.7, line 885
  3. src/dig.c in NetHack 3.6.7, line 972: res is set to 1 if you wielded the pick
  4. src/dig.c in NetHack 3.6.7, line 1016: res is returned if you declined to specify a direction
  5. src/dig.c in NetHack 3.6.7, line 1018: The value of res is discarded before timing calculations, so the rest of the code doesn't know whether you wielded the pick at that point