If you have been true to your god and you are not in Gehennom, you become invulnerable while praying, i.e. you can't die. Prayer is the only method to become invulnerable. Prayer requires three turns and invulnerability is in effect until the prayer ends. Caution: a mind flayer's psychic blast and a stinking cloud can damage you while invulnerable.
While you are invulnerable:
- Monsters flinch from melee attacks, and grabbing monsters loosen their grip.
- Swallowing attacks have no effect.
- You are considered unencumbered for healing and exercise/abuse purposes.
- Teleportitis does not operate.
- The usual harassment of a player who has killed the Wizard of Yendor does not operate, e.g. the Wizard will not reappear.
- If trapped in lava, you will not sink further.
- You do not become hungrier.
- Timeouts other than for Luck do not operate; in particular, stoning, sliming, strangulation, vomiting, and sickness freeze at the point where the prayer began.
You can also become invulnerable in SLASH'EM by drinking a potion of invulnerability, however, this is vastly different from the invulnerability caused by praying. Notably, not preventing death by any source other than hit-point loss.
- pray.c in NetHack 3.4.3, line 1582
- mhitu.c in NetHack 3.4.3, line 528
- mhitu.c in NetHack 3.4.3, line 332
- allmain.c in NetHack 3.4.3, line 154
- allmain.c in NetHack 3.4.3, line 219
- allmain.c in NetHack 3.4.3, line 266
- allmain.c in NetHack 3.4.3, line 362
- gethungry in eat.c
- timeout.c in NetHack 3.4.3, line 185