Digging

From NetHackWiki
(Redirected from Dig)
Jump to navigation Jump to search

In NetHack, digging is the act of using a pick-axe, a dwarvish mattock, a wand of digging, or the spell of dig to tunnel through the walls or floor. You can also dig if you polymorph into a creature that does not need a pick to use the tunnel attribute (r rock mole, r woodchuck or U umber hulk).

Pick-axes and dwarvish mattocks are generally referred to as digging tools, and take several turns to dig with. The spell of dig and wand of digging have the same effect, and generally take a single turn.

You can dig in any of the eight directions, and can also attempt to dig upwards and downwards if you use a tool, wand or spell. You can only dig upwards using a spell or wand, and doing so will just loosen a rock from the ceiling and have it fall on your head.

If you dig downwards with a pick-axe or mattock, you will usually create a pit. To create a pit, you need to apply the tool once. ("You start digging downward. You dig a pit in the floor"). If you dig downwards in a pit, you will create a hole and fall through. Zapping a wand of digging downwards instantly creates a hole under normal circumstances. Digging downward when standing on a sink will turn it into a (non-magical) fountain, and when standing on a fountain will most likely create several pools of water.

The ground or the walls in some levels are undiggable. These include the walls of Sokoban, the ground at the bottom of several dungeon branches, walls of the Castle and the Wizard's Tower, and the like. If the floor is undiggable, digging downwards can create a pit but not a hole. The walls of Gehennom are diggable, but the wand and the spell only dig one wall per casting. (The game internally refers to walls that can't be dug as "non-diggable", not "undiggable".) Iron bars can also be undiggable, preventing them from being dissolved by various acidic means.

Digging speed

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

Summary of factors

Generally 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 speed up digging:

  • having high dexterity and strength
  • being a dwarf
  • enchanting the pick-axe or wearing a ring of increase damage with positive enchantment (conversely, a negative damage bonus or an eroded pick-axe will slow digging)
  • having intrinsic or extrinsic speed - this does not reduce the number of actions, but because the player gets more actions per turn, the digging will complete in fewer turns

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

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. This is 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.


This page may need to be updated for the current version of NetHack.

It may contain text specific to NetHack 3.4.3. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-343}} tag to the current version's tag or {{noversion}} as appropriate.

References

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