# Headstone

Dungeon features

&nbsp;&nbsp;Air

_&nbsp;Altar

#&nbsp;Corridor

#&nbsp;Cloud

#.&nbsp;Drawbridge

+-|&nbsp;Door

.&nbsp;Doorway

{&nbsp;Fountain

|&nbsp;Headstone

.&nbsp;&nbsp;Floor

&gt;&lt;&nbsp;Ladder

.&nbsp;Ice

#&nbsp;Iron&nbsp;bars

}&nbsp;Lava

}&nbsp;Moat

#&nbsp;Sink

&nbsp;&nbsp;Solid&nbsp;rock

&gt;&lt;&nbsp;Staircase

\&nbsp;Throne

^"&nbsp;Trap

#&nbsp;Tree

-&nbsp;|&nbsp;Wall

~&nbsp;Vibrating square

Not to be confused with the ASCII tombstone that the game prints when a character dies.
A headstone is a dungeon feature that appears in NetHack, represented by |. Random heastones can be encountered in the dungeon, and if your character character dies and leaves a corpse, a headstone is created with an inscription bearing the character's name and manner of death.
Random headstones may also contain some treasure, but grave-robbing carries the risk of summoning an undead monster.

Contents

1 Generation

1.1 Treasure

2 Description

2.1 Engraving
2.2 Inscriptions

3 UnNetHack
4 Internals
5 Encyclopedia entry
6 References

Generation
Headstones are generated in the following areas:

in a graveyard, with a 20% chance per floor tile
in a room in a filler level in the Dungeons of Doom, with a 180 - (2 * depth) chance per room
in a bones file, on the spot where the previous player died - but only if they died on a regular floor tile
Headstone squares will never contain traps.

Treasure
The single headstones generated in regular rooms generate with some treasure: 

13 chance of a pile of gold being buried in the grave.
Zero to four random items, which are always cursed, will be buried in the grave.
110 of these graves will have a bell on top, which is not necessarily cursed. The inscription on these always reads "Saved by the bell!"
Headstones left in bones files do not contain treasure buried in the grave; instead, the dead player's possessions are piled on top of the grave.

Description
Headstones can be destroyed by either digging down on them or kicking them over from an adjacent square. Kicking a headstone will damage you and briefly injures your leg, regardless of whether the attempt was successful - it may take several attempts to successfully kick the headstone over. Digging always creates a pit on the square even if the source was something instantaneous, like a wand of digging, and will unearth any items buried under it at the bottom of the pit.
Destroying a grave may result in an alignment penalty:[1]

Samurai
−1 if lawful, +1 if chaotic
"You disturb the honorable dead!"

Archeologist
+3 if chaotic, −3 otherwise (±1 if kicked over)
"You feel like a despicable grave-robber!"

Other
−1 if lawful and alignment record &gt; −10
"You have violated the sanctity of this grave!"

Digging up a grave may produce its "owner", with four different possibilities for what generates:[2]

2⁄5
A very old corpse
"You unearth a corpse."

1⁄5
A zombie
"The grave's owner is very upset!" (if hallucinating: "Dude! The living dead!")

1⁄5
A mummy
"You've disturbed a tomb!" (if hallucinating: "I want my mummy!")

1⁄5
Nothing
"The grave seems unused.  Strange...."

If you attempt to pick up from a grave with no items on it, you will get a YAFM: "You don't need a gravestone. Yet."

Engraving
You cannot engrave on a grave with your finger. Engraving with a hard object generates a ghoul (once per grave&nbsp;– "You disturb the undead!") and abuses wisdom.[3]
Elbereth is ignored on headstones; this is to prevent cheeky players from naming themselves Elbereth to leave behind a permanently warded square when they die.

Inscriptions
Player graves are inscribed with the cause of death. Randomly generated grave inscriptions include various epitaphs, randomly selected from a list in dat/epitaph.txt, which is much too long to present in its entirety here. 
NetHack 3.6.0 added some epitaphs from the custom epitaphs used on NAO.

Saved by the bell. (There is also a bell on top of the grave.)[4][5]
Go away!
1994-1995. The Longest-Lived Hacker Ever
Be careful, or this could happen to you!
Beetlejuice Beetlejuice Beetlejuice
Beware of Electric Third Rail
Caution! This grave contains toxic waste
Here lies an Atheist, all dressed up and no place to go. (Thurmont, Maryland)
Here lies Ezekiel, age 102. The good die young. (East Dalhousie, Nova Scotia)
Here lies Johnny Yeast. Pardon me for not rising. (Ruidoso, New Mexico)
Here lies my wife: Here let her lie! Now she's at rest and so am I. (John Dryden's epitaph for his wife)
Here lies the body of Jonathan Blake. Stepped on the gas instead of the brake. (Uniontown, Pennsylvania)
I made an ash of myself. (Julian Skaggs of West Virginia, who was cremated)
Look out below!
Made in Taiwan
Note -- there are NO valuable items in this grave
Og friend. Og good dude. Og died. Og now food (possibly a reference to Internet Oracle lore, or to Cavemen's ability to commit cannibalism without penalty)
He always lied while on the earth and now he's lying in it
Please don't dig me up. I'm perfectly happy down here. -- Resident
Postman, please note forwarding address: Gehennom, Asmodeus's Fortress, fifth lemure on the left
Mary had a little lamb/Its fleece was white as snow/When Mary was in trouble/The lamb was first to go
Rest in peace
Rest In Pieces
R.I.P.
Soon ripe. Soon rotten. Soon gone. But not forgotten.
Soon you'll join this fellow in hell! -- the Wizard of Yendor
Sum quod eris (Latin: "I am what you will be"—dead.)
The Grave of the Unknown Hacker
We weren't sure who this was, but we buried him here anyway
Don't be daft, they couldn't hit an elephant at this dist- (Alleged last words of General John Sedgwick, killed at the Battle of Spotsylvania Court House, May 9, 1864; in fact he completed the sentence)
Audi Partem Alteram (Latin: "Listen to the other side")
Dulce et decorum est pro patria mori (Horace: "It is sweet and fitting to die for one's country"; quoted as "the old Lie" by Wilfred Owen in "Dulce et Decorum Est)
Auri sacra fames (Latin: "Accursed hunger for gold")
Auribus teneo lupum (Latin: "I hold a wolf by the ears", or a tiger by the tail)
Obesa Cantavit (Latin: "The fat lady has sung")

The following information pertains to an upcoming version (NetHack 3.7.0). If this version is now released, please verify that it is still accurate, then update the page to incorporate this information.
The following epitaphs will be added:

I didn't mean it when I said 'Bite me'
Curse god and die
Dear wife of mine.  Died of a broken heart, after I took it out of her.
Check enclosed.
Every day, in every way, I am getting better and better.
Anything for a change.
What are you doing over there?
I TOLD you I was sick!
Don't tread on me!
Come Monday, I'll be all right.
De'Ath
Forget about the dog, Beware of my wife.
I have all the time in the world
And sometimes the bear eats you.
UnNetHack
UnNetHack includes a large number of new headstone messages, including the following:

Apres moi, le deluge. ("After me, the flood"; attributed to Louis XV, also the motto of 617 Squadron, RAF "The Dam Busters"). This grave will always have a scroll of flood on top of it.
It must be Thursday. I never could get the hang of Thursdays.
If a man's deeds do not outlive him, of what value is a mark in stone?
Nobody believed her when she said her feet were killing her.
On the whole, I'd rather be in Minetown.
Game over, man.  Game over.
Attempted suicide.
Always attack a floating eye from behind!
Killed by a black dragon -- This grave is empty.
This was actually just a pit, but since there was a corpse, we filled it.
Confusion will be my epitaph.
The reports of my demise are completely accurate.
Do not open until Christmas.
Go away!  I'm trying to take a nap in here!  Bloody adventurers...
Sparky -- he was a very good dog.
Tu quoque, Brute? (Latin - "You too, Brutus?")
At last... a nice long sleep.
I'd rather be sailing.
I'm gonna make it!
R2D2 -- Rest, Tin Piece.
Dulce et decorum est pro patria mori. (Latin - "It is sweet and honorable to die for your country").
Go Team Ant!
Brains... Brains... Fresh human brains…
...for famous men have the whole earth as their memorial.
NetHack 1987-2003?
Et in Arcadia ego. (Latin - "And in Arcadia I am").
And they said it couldn't be done!
Don't let this happen to you!
SOLD.
Wish you were here!
Lookin' good, Medusa.
Taking a year dead for tax reasons.
...but the blood has stopped pumping and I am left to decay…
Applaud, my friends, the comedy is finished.
Beware the ...
It wasn't a fair fight.
You should see the other guy.
...and they made me engrave my own headstone too!
Are we all being disintegrated, or is it just me?
I'll be back!
Don't forget to stop and smell the roses.
VACANCY.
Take my stuff, I don't need it anymore.
Beware of Discordians bearing answers.
Hodie mihi, cras tibi. (Latin - Today me, tomorrow for you).
I took both pills!
American Democracy 1776-2016.
Burninated.
And so it ends?
Hack 1984-1985.
Adventure, hah!  Excitement, hah!
I was killed by 

<illegible scrawl="">
SLASH'EM 1997-2006.
(This space for sale)
This way to the crypt.
Out to Lunch.
All's well that end well
Algernon
<expletive deleted="">
Here lies a programmer.  Killed by a fatal error.
He farmed his way here
One corpse, sans head
Forget Disney World, I'm going to Hell!
I will survive!
SporkHack 2007-2010
For sale: One soul, slightly used. Asking for 3 wishes.
Res omnia mea culpa est
Basil, assaulted by bears
Not again!
On one of the variations of the top level of the Ruins of Moria, there will be a grave with the message (Balin, Son of Fundin, Lord of Moria).

Internals
make_grave generates a headstone with a (random or given) epitaph.  Graveyards and bones files call this function directly.
mkgrave may generate treasure and the "saved by the bell" grave.  Randomly generated headstones call this function.
Encyclopedia entry

"Who'd care to dig 'em," said the old, old man,
"Those six feet marked in chalk?
Much I talk, more I walk;
Time I were buried," said the old, old man.

[ Three Songs to the Same Tune, by W.B. Yeats ] 

References

↑ src/dig.c in NetHack 3.6.0, line 900

↑ src/dig.c in NetHack 3.6.0, line 913

↑ src/engrave.c in NetHack 3.6.0, line 570

↑ src/mklev.c in NetHack 3.6.0, line 1497

↑ src/mklev.c in NetHack 3.6.0, line 1513

</expletive></illegible>