Claim set · data/claims/nethack.yaml

NetHack 3.6.7 (source release)

Game: NetHack.

NetHack's README calls the game “a distant descendent of Rogue and Hack”. nethack/lineage

DeveloperNetHack 3.6.7 source code · README#L3-L5which is a distant descendent of Rogue and Hack, and a direct descendent ofChecked by claude, 2026-10-21 — read the README's opening paragraph at the pinned tag

Cited by: NetHack

NetHack 3.6.7 starts the hero at 900 nutrition. Once per game turn, and again for each melee attack the hero makes, it takes 1, unless the hero has slow digestion, is polymorphed into a form that doesn't eat, or is praying under divine protection, and only at a chance of 1 in 10 while the hero is asleep or fainted. On odd turns, regeneration (not from an artifact) and a Stressed or heavier load each take 1 more; on even turns, the Hunger property and Conflict (not from an artifact) do, and once every 20 turns each worn ring that has a charge other than 0 or takes none, the worn amulet, and carrying the Amulet of Yendor take 1 each. nethack/hunger-clock

About: NetHack Hunger clock

Value: 900 nutrition at the start

CodeNetHack 3.6.7 source code · src/eat.c#L116-L120u.uhunger = 900;NetHack 3.6.7 source code · src/allmain.c#L172-L176/* once-per-turn things go here */NetHack 3.6.7 source code · src/allmain.c#L281gethungry();NetHack 3.6.7 source code · src/eat.c#L2790-L2804if ((!Unaware || !rn2(10)) /* slow metabolic rate while asleep */NetHack 3.6.7 source code · src/eat.c#L2806-L2841switch ((int) (moves % 20)) { /* note: use even cases only */NetHack 3.6.7 source code · include/youprop.h#L373#define Unaware (multi < 0 && (unconscious() || is_fainted()))NetHack 3.6.7 source code · include/hack.h#L25SLT_ENCUMBER = 1, /* Burdened */NetHack 3.6.7 source code · src/pray.c#L1873-L1877if (p_type == 3 && !Inhell) { … u.uinvulnerable = TRUE;NetHack 3.6.7 source code · src/hack.c#L1975-L1983overexertion() … gethungry();NetHack 3.6.7 source code · src/uhitm.c#L406-L409|| overexertion()) goto atk_done;Checked by claude, 2026-10-25 — read init_uhunger, the once-per-turn block of moveloop (moves++ at L173), gethungry L2788-L2843 (returns early on u.uinvulnerable, which a successful prayer sets at pray.c L1877); near_capacity() > SLT_ENCUMBER means Stressed or worse; attack() calls overexertion() at uhitm.c L408, which runs gethungry() once more

Cited by: Hunger clock, NetHack

NetHack 3.6.7 counts the hero Satiated above 1,000 nutrition, Not Hungry above 150, Hungry above 50, Weak above 0, and Fainting at 0 or below. While Fainting, a hero not already fainted or helpless faints on entering the state, and later at a chance that grows as nutrition falls (1 in 20 at 0), for 10 turns plus a tenth of the deficit; on an update where neither happens, the hero starves once nutrition is below −(100 + 10 × Constitution). nethack/hunger-states

About: NetHack Hunger clock

CodeNetHack 3.6.7 source code · src/eat.c#L2936-L2939: (h > 50) ? HUNGRY : (h > 0) ? WEAK : FAINTING;NetHack 3.6.7 source code · src/eat.c#L2977-L2999if (u.uhs <= WEAK || rn2(20 - uhunger_div_by_10) >= 19) {NetHack 3.6.7 source code · src/eat.c#L3001-L3008} else if (u.uhunger < -(100 + 10 * (int) ACURR(A_CON))) {NetHack 3.6.7 source code · src/eat.c#L2842newuhs(TRUE);Checked by claude, 2026-10-21 — read newuhs L2928-L3020: uhunger_div_by_10 is the rounded tenth (0 or negative here), so rn2(20 - d) >= 19 has chance (1 - d)/(20 - d); the starvation test is the else branch of that roll's if

Cited by: Hunger clock, NetHack

In NetHack 3.6.7, food that brings nutrition to 2,000 or more chokes a hero who was Satiated (for a meal, at its start). A hero who doesn't breathe always vomits and loses 1,000 nutrition instead; a hero being strangled always dies; any other hero vomits 1 time in 20 and otherwise dies. nethack/choking

About: NetHack Hunger clock

CodeNetHack 3.6.7 source code · src/eat.c#L2863-L2865if (u.uhunger >= 2000) {NetHack 3.6.7 source code · src/eat.c#L2543context.victual.canchoke = (u.uhs == SATIATED);NetHack 3.6.7 source code · src/eat.c#L238-L260if (Breathless || (!Strangled && !rn2(20))) {Checked by claude, 2026-10-21 — read lesshungry L2856-L2880 and choke L238-L290: choke returns at once unless u.uhs is SATIATED (the amulet of strangulation aside), and the else branch ends in done(CHOKING)

Cited by: Hunger clock, NetHack

In NetHack 3.6.7 the hero's melee attack hits when a roll of 1 to 20 is below a total of 1 + Luck + the strength and dexterity bonus + the target's armor class + the hero's level (a polymorphed hero's monster level) + the hero's to-hit increment from rings of increase accuracy. The total gains 2 against a stunned, a fleeing, or a sleeping target (which the attack wakes), and 4 against one that can't move; it loses 3 while the hero is trapped and more for a heavier load; it adds the wielded weapon's to-hit and the hero's skill bonus, and adjusts for a monk and for an elf against an orc. An engulfed hero always hits. Computed, the chance is (total − 1) / 20, held within 0 to 100%. Damage is computed only after a hit. nethack/to-hit

About: NetHack Hit chance

CodeNetHack 3.6.7 source code · src/uhitm.c#L266-L267tmp = 1 + Luck + abon() + find_mac(mtmp) + u.uhitincNetHack 3.6.7 source code · src/uhitm.c#L275-L291if (!mtmp->mcanmove) {NetHack 3.6.7 source code · src/uhitm.c#L293-L322tmp -= (tmp2 * 2) - 1;NetHack 3.6.7 source code · src/uhitm.c#L612-L613int mhit = (tmp > dieroll || u.uswallow);NetHack 3.6.7 source code · src/rnd.c#L172x = RND(x) + 1;NetHack 3.6.7 source code · src/uhitm.c#L481-L494malive = hmon(mon, weapon, HMON_MELEE, dieroll);NetHack 3.6.7 source code · src/weapon.c#L889-L894abon() … int str = ACURR(A_STR), dex = ACURR(A_DEX);NetHack 3.6.7 source code · src/do_wear.c#L980u.uhitinc += obj->spe;Checked by claude, 2026-10-25 — read find_roll_to_hit L255-L324, abon() (weapon.c L889-L925, from ACURR(A_STR) and ACURR(A_DEX)), and hitum L602-L613; rnd(20) is 1 to 20, so tmp > dieroll holds for tmp - 1 of the 20 rolls

Cited by: Hit chance

Computed from both games' code, NetHack 3.6.7's melee roll keeps the rate of Rogue 5.4's swing: each point of the attacker's level or the target's armor class adds 5% to the chance to hit, which is (level + armor class + bonuses) / 20 in Rogue and (level + armor class + Luck + bonuses) / 20 in NetHack. nethack/to-hit-like-rogue

About: NetHack Hit chance

CodeNetHack 3.6.7 source code · src/uhitm.c#L266-L267tmp = 1 + Luck + abon() + find_mac(mtmp) + u.uhitincNetHack 3.6.7 source code · src/uhitm.c#L612-L613int mhit = (tmp > dieroll || u.uswallow);NetHack 3.6.7 source code · src/rnd.c#L172x = RND(x) + 1;Rogue 5.4.4 source code · fight.c#L378-L384int need = (20 - at_lvl) - op_arm;Rogue 5.4.4 source code · main.c#L186-L189return range == 0 ? 0 : abs((int) RN) % range;Checked by claude, 2026-10-21 — Rogue: res in 0..19 hits when res >= 20 - level - AC - bonus, level + AC + bonus values of 20; NetHack: rnd(20) in 1..20 below tmp, tmp - 1 values of 20, tmp - 1 = Luck + abon + AC + uhitinc + level + adjustments

Cited by: NetHack

An ordinary NetHack 3.6.7 level places rooms, one of which may be a vault, in free rectangles until none is left, a room fails to fit, or it has 40. It sorts them by left edge, and joins each to the next, stopping early at a chance of 1 in 50 per join. It then joins each room to the one two along when they aren't yet connected, then any pair still unconnected. With 3 or more rooms it makes 4 to (room count + 3) attempts at another corridor; an attempt gives up before digging when the square outside its door is already open, and stops short, leaving a dead end, at a chance of 1 in 35 per step. nethack/rooms-and-corridors

About: NetHack Procedural dungeon

CodeNetHack 3.6.7 source code · src/mklev.c#L227-L239while (nroom < MAXNROFROOMS && rnd_rect()) {NetHack 3.6.7 source code · include/global.h#L330#define MAXNROFROOMS 40 /* max number of rooms per level */NetHack 3.6.7 source code · src/mklev.c#L62-L64if (x->lx < y->lx)NetHack 3.6.7 source code · src/mklev.c#L700-L704sort_rooms();NetHack 3.6.7 source code · src/mklev.c#L319-L348for (i = rn2(nroom) + 4; i; i--) {NetHack 3.6.7 source code · src/mklev.c#L294-L295if (nxcor && levl[xx + dx][yy + dy].typ)NetHack 3.6.7 source code · src/sp_lev.c#L2248if (cct++ > 500 || (nxcor && !rn2(35)))Checked by claude, 2026-10-21 — read makerooms, do_comp, sort_rooms and its call in makelevel, and makecorridors; smeq[] tracks connected sets; the last loop calls join(a, b, TRUE), and dig_corridor gives up 1 time in 35 per step when nxcor is set; the loop count rn2(nroom) + 4 runs 4 to nroom + 3

Cited by: NetHack, Procedural dungeon

NetHack 3.6.7's main dungeon, the Dungeons of Doom, holds one level built in Rogue's style. Its code's comment says “Rogue levels are structured 3 by 3, with each section containing a room or an intersection”, and each of the nine cells is an intersection at a chance of 1 in 5, so long as at least one room is made. nethack/rogue-level

About: NetHack Procedural dungeon

CodeNetHack 3.6.7 source code · dat/dungeon.def#L17-L21LEVEL: "rogue" "R" @ (15, 4)NetHack 3.6.7 source code · src/extralev.c#L209-L213Rogue levels are structured 3 by 3, with each section containingNetHack 3.6.7 source code · src/extralev.c#L228-L243if (!rn2(5) && (nroom || (x < 2 && y < 2))) {NetHack 3.6.7 source code · src/mklev.c#L698-L701makeroguerooms();Checked by claude, 2026-10-21 — read makeroguerooms L206-L260 and its call in makelevel; the level's depth, @ (15, 4) in dungeon.def, isn't traced through dungeon.c, so the statement leaves it out

Cited by: NetHack, Procedural dungeon, Rogue

Restoring a NetHack 3.6.7 game deletes the save file once it is read, unless the game is in wizard (debug) or explore mode; in those modes the Unix build asks “Do you want to keep the save file?”. While a restore runs, the Unix build makes the file unreadable, to disallow parallel restores. nethack/restore-deletes

About: NetHack Permadeath

CodeNetHack 3.6.7 source code · src/restore.c#L901-L902if (!wizard && !discover)NetHack 3.6.7 source code · sys/unix/unixmain.c#L295(void) chmod(fq_save, 0); /* disallow parallel restores */NetHack 3.6.7 source code · sys/unix/unixmain.c#L307-L319if (yn("Do you want to keep the save file?") == 'n') {Checked by claude, 2026-10-21 — read dorecover L860-L910 and the Unix main's restore path L290-L320; discover is explore mode

Cited by: NetHack, Permadeath

When a NetHack 3.6.7 hero dies in wizard (debug) or explore mode, from any cause of death from an ordinary death to genocide (not a panic, quitting, escaping, or ascending), and a worn amulet of life saving hasn't already saved the hero, the game asks “Die?”; answering no saves the hero's life and play goes on. nethack/die-prompt

About: NetHack Permadeath

CodeNetHack 3.6.7 source code · src/end.c#L1187-L1194if (!survive && (wizard || discover) && how <= GENOCIDED && !paranoid_query(ParanoidDie, "Die?")) { … savelife(how); survive = TRUE;NetHack 3.6.7 source code · src/end.c#L1168-L1186if (Lifesaved && (how <= GENOCIDED)) {NetHack 3.6.7 source code · include/hack.h#L137-L153GENOCIDED = 10,Checked by claude, 2026-10-25 — read done() L1150-L1201; savelife(how) restores the hero, then done returns; in normal play really_done(how) runs

Cited by: NetHack, Permadeath

When a NetHack 3.6.7 game starts, it shuffles the descriptions of amulets, potions, rings, scrolls, spellbooks, wands, and venoms within each class, and of helmets, gloves, cloaks, and boots within each of those groups. Water keeps a fixed description, and scrolls, spellbooks, and amulets keep the unique or non-magic ones fixed; a type whose name is already known keeps its description. nethack/shuffled-descriptions

About: NetHack Item identification

CodeNetHack 3.6.7 source code · src/o_init.c#L178-L179shuffle_all();NetHack 3.6.7 source code · src/o_init.c#L243-L266AMULET_CLASS, POTION_CLASS, RING_CLASS, SCROLL_CLASS,NetHack 3.6.7 source code · src/o_init.c#L81-L95if (objects[j].oc_name_known)NetHack 3.6.7 source code · src/o_init.c#L208-L221case POTION_CLASS: … *hi_p = POT_WATER - 1; … if (objects[i].oc_unique || !objects[i].oc_magic) break; *hi_p = i - 1;Checked by claude, 2026-10-25 — read shuffle, obj_shuffle_range, and shuffle_all; init_objects calls shuffle_all after the probability check

Cited by: Item identification, NetHack

When a NetHack 3.6.7 hero dies, unless a worn amulet of life saving or the wizard and explore modes' “Die?” prompt saves the hero, the game records the score and ends the program. nethack/death-ends

About: NetHack Permadeath

CodeNetHack 3.6.7 source code · src/end.c#L1168-L1201really_done(how);NetHack 3.6.7 source code · src/end.c#L1618-L1626nh_terminate(EXIT_SUCCESS);Checked by claude, 2026-10-21 — read done() L1150-L1201 and really_done L1207-L1627, which has no return before topten() and nh_terminate()

Cited by: NetHack, Permadeath