Digging
In NetHack, digging is the act of tunneling through the solid rock walls or floor of the dungeon level. There are multiple methods of digging:
- Using a pick-axe or a dwarvish mattock, which are considered digging tools
- Zapping a wand of digging, whose ray can either blast through walls or create a hole in the floor
- Casting the spell of dig, whose ray has the same effect as the wand
- Being any one of the tunneling monsters that does not need digging tools, including becoming one via polymorph:
- r rock mole
- r woodchuck
- U umber hulk
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 - see the section below on the speed of digging actions for details.
A user has suggested improving this page or section as follows:
"List more undiggable levels, including particulars of the Castle; cover digging sideways while within pits; mention what other dungeon features can and cannot be dug through; consider adjusting the digging speed table's cells; and add citations where necessary, among other things"
Description
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 through a door with a tool or magic will destroy it, while digging through a boulder with a tool will shatter it into several rocks - the spell of dig and wand of digging cannot destroy boulders.
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. Stairways and altars cannot be dug through.
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.
Digging in shops
For the hero, shop doors and walls will print a message when digging through them with a digging tool in order to interrupt them and discourage them from possibly angering the shopkeeper - the spell of dig and wand of digging work instantly as normal, including instantly angering the shopkeeper. Shopkeepers will demand 400 gold in compensation from the hero if they destroy their shop's walls or doors. Any damage done by the hero or a monster to a shop's door and walls will be magically repaired by the shopkeeper within a few turns.
Strangely, digging into a shop's floor does not anger the shopkeeper or cause them to repair it, though they will warn you about falling through the floor if you create a pit or admonish you if you create a hole.[1] However, they will become angry if items belonging to the shop fall through any holes that you create. Shopkeepers have a rough idea of how long digging takes as well:[2] attempting to leave a shop by digging down through a pit inside the room while you have unpaid items or debts will anger them, and they will try to reach you and grab the backpack containing your inventory.[3] Knights that damage the shop's door, floor or walls incur penalties to alignment record.
The following information pertains to an upcoming version (3.7.0). If this version is now released, please verify that it is still accurate, then update the page to incorporate this information.
Per commit 075844b4, shopkeepers will magically repair pits and holes in their shop as they do damaged walls and doors.Non-diggable 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 have no effect, but digging tools can still create pits).
Non-diggable floors and walls can affect other dungeon features in the area: Iron bars on a non-diggable level or section cannot be dissolved by acid, and trees on a non-diggable level or section cannot be chopped down with any axe weapon. Doors can still be destroyed by digging through them even if the walls are non-diggable.
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 floors at the bottom of several dungeon branches are typically non-diggable.
- The Castle has non-diggable walls between its maze sections.
- The Valley of the Dead has non-diggable floors and walls.
- The Wizard's Tower is surrounded by non-diggable walls that separate it from the rest of the Gehennom levels surrounding them.
- The level containing the vibrating square has non-diggable floors.
- Moloch's Sanctum has non-diggable floors and walls.
- The Elemental Planes have non-diggable floors, and the Astral Plane has non-diggable floors and walls.
The following information pertains to an upcoming version (3.7.0). If this version is now released, please verify that it is still accurate, then update the page to incorporate this information.
Zapping a wand of digging or spell of digging at a non-diggable floor will create a pit instead of having no effect. Per commit 82f0b1e8, this also applies to monsters, who will fall into the pit they create this way unless they are flying.Digging-resistant walls
A related mechanic is a special type of wall that can restrict digging by limiting the effects of digging rays to one square per charge or casting - tunneling and digging via tools are unaffected. This type of wall is mostly emloyed for maze levels, particularly those found in Gehennom, though it can also be seen well before that point, e.g. in the Gnome King's wine cellar variant of Mines' End.
Digging on the Plane of Earth
On the Plane of Earth, digging with a pick-axe or dwarvish mattock has a 1⁄3 chance of generating earth elementals and xorns.[4] Separately, digging with blessed tools has a 1⁄3 chance of a 3x3 area of rock immediately clearing around the hero.[5] Digging with non-blessed tools has an independent 1⁄6 chance of a cave-in creating walls in that same area if the tool is uncursed, and a 1⁄4 chance of doing so if the tool is cursed.
Digging speed
While digging with a wand of digging or the dig spell always takes exactly one action, a pick-axe or mattock takes roughly 5 turns to dig horizontally through solid rock, and 20 turns to dig through the floor - the exact amount of actions required to dig using digging tools depends on a number of variables:
- Having high dexterity and strength makes digging faster, applying the same bonuses as they do to to-hit.
- Being a dwarf makes digging faster.
- Wielding a digging tool by applying it does not use up any time, but only if the player selects a direction to dig in when prompted to.[6][7][8]
- A positively enchanted pick-axe or mattock and/or a worn ring of increase damage with positive enchantment makes digging with the tools faster, while a negatively enchanted or eroded pick-axe or mattock, or a worn ring of increase damage with negative enchantment, slows digging with those tools.[9]
- Note that pick-axes are lower in weight and are always generated at +0, while the heavier mattocks have a base to-hit penalty and can be generated with either positive or negative enchantment.
- Having intrinsic or extrinsic speed indirectly speeds up digging, since the digging actions will be complete in fewer turns.
- Fumbling can slow digging with tools by causing the process to fail 1⁄3 of the time, including causing the hero to hit themselves or else drop the tool.
- Digging on the Plane of Earth with a digging tool can interrupt the process by generating monsters, cause cave-ins, or even instantly clear out room as described above.
The following traits and actions have no impact on digging speed, although they might be expected to:
- Having a higher pick-axe skill has no effect.
- Using a dwarvish mattock rather than a pick-axe has no effect, though it can indirectly influence other factors (e.g. encumbrance slowing the hero).
- Having higher luck has no effect.
- If digging through shop doors or walls, the game will constantly print messages to interrupt the hero, but the process itself does not take any longer.
- Digging down on an altar would anger that altar's god and any attendant aligned priest, but this never occurs since digging through an altar is impossible.
Each move that the hero spends digging up rock walls, boulders and statues with a pick-axe or a dwarvish mattock, or else chopping down non-petrified trees with an axe, generates a certain amount of "digging effort" - this is calculated with the equation below, and the result is doubled if the character started the game as a dwarf:[9]
9 + d5 + STR and DEX to-hit bonuses + enchantment - erosion + increase damage bonus
The outcomes for certain strength, erosion and enchantment benchmarks are displayed in the table below:
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 |
Strategy
Digging serves many purposes for an enterprising hero looking to make their way through the dungeon: it is useful for aspiring vault hunters to make their way in and out quickly, and the Gnome King's Wine Cellar map of Mines' End requires a means of digging if you want to access the guaranteed luckstone.
The wand of digging in particular is prized as an escape item for quickly getting away from hostiles when a hero is at low health and/or completely surrounded, but it is not always guaranteed to put you in a better position, and certain monsters can still follow you to whatever level you land on (though this also includes pets). Monsters can also use it for the same purposes, which can make chasing them down annoying and time-consuming - very few heroes enjoy trying to retrieve their stolen inventory from a nymph that has just taken their wand of digging as well.
Digging can also be used to cross certain levels that are blocked by water: Medusa's Island can be circumvented by digging down on a safe square, as creating a pit or hole next to any moat of water will cause it to immediately fill and potentially drown the hero. After safely digging to the level below, find its up stair, then ready your sources of reflection and/or blindness before going up to kill Medusa.
Digging can be used to create direct paths between "minor" objectives and speed up dungeon navigation significantly, such as quicker paths between stairways and other stairways, quicker access to rooms without relying on finding secret doors, or direct lines from stairways to altars that facilitate carrying corpses to them for sacrifice. Digging tools are best suited for digging shortcuts through maze levels, since only one square can be dug at a time using magic - this is especially true on the ascension run, where the hero will have to contend with both the Wizard of Yendor and the mysterious force.
Digging is required to cross the Plane of Earth: the minotaur and Elvenking that generate there have a wand of digging and a pick-axe respectively, and the Wizard of Yendor always carries a spellbook of dig when making his guaranteed reappearance. Wands of digging are the best means of crossing the Plane of Earth by far, since a hero usually has many spare wands - while the spell of dig can be sufficient, it requires heavy investment of energy, and spell-casting builds that are capable will prefer wands anyway in order to save that energy for other needs; digging tools are the slowest methods outright, though blessing the digging tool can partially remedy this.
Digging for victory
Players that are daring or willing to try their luck can use digging as a metastrategy to try and gain entrance to the Castle as soon as possible.
Messages
- You start digging downward. You dig a pit in the floor.
- You dug downward with a digging tool.
- This <door/wall> seems too hard to dig.
- You are attempting to dig through a shop wall or door.
- The debris from your digging comes to life!
- Earth elementals and/or xorns were generated from digging on the Plane of Earth using a pick-axe or dwarvish mattock.
- A mysterious force <creates a/extends the> cave around you!
- An opening was created by digging on the Plane of Earth with a blessed pick.
- Crash! The ceiling collapses around you!
- Walls were generated from digging on the Plane of Earth with a non-blessed pick.
References
- ↑ src/shk.c in NetHack 3.6.7, line 3984
- ↑ src/dig.c in NetHack 3.6.7, line 493
- ↑ src/shk.c in NetHack 3.6.7, line 4000
- ↑ src/dig.c in NetHack 3.6.7, line 444
- ↑ src/dig.c in NetHack 3.6.7, line 388
- ↑ src/dig.c in NetHack 3.6.7, line 972:
res
is set to 1 if you wielded the pick - ↑ src/dig.c in NetHack 3.6.7, line 1016:
res
is returned if you declined to specify a direction - ↑ 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 - ↑ 9.0 9.1 src/dig.c in NetHack 3.6.7, line 300: note that
10 + rn2(5)
is 9 + d5