Difference between revisions of "Prayer"

From NetHackWiki
Jump to navigation Jump to search
m
(languages + lede + spacing + etc.)
 
(24 intermediate revisions by 17 users not shown)
Line 1: Line 1:
 +
{{languages}}
 
{{religion}}
 
{{religion}}
<!-- confirmed current to 3.4.3 -->
+
In ''[[NetHack]]'', '''prayer''' is an action used to communicate with the player's [[god]], and is performed with the '''#pray''' [[extended command]].
'''Prayer''', invoked with the #pray [[extended command]], is an action used to communicate with the player's [[god]]. The purpose of praying is to ask for help from your god, and as such, it must not be done too often. The player has a [[prayer timeout]], a counter which is raised when praying, and decrements one turn at a time. Only when this counter reaches zero may the player pray safely again (exceptions exist, see below). Thus prayer is usually reserved for one of a few things: saving the player from almost certain doom, performing some action the player cannot yet do (removing cursed items, getting out of walls, etc.), or creating [[holy water]]. For those players who like a challenge, avoiding any interaction with gods, altars and other religious concepts in the game will satisfy the [[atheist]] conduct.
+
 
 +
==Description==
 +
The purpose of praying is to ask your god for help, and you must not do so too often. The player has a [[prayer timeout]], a counter which is raised when praying, and decrements one turn at a time. Only when this counter reaches zero may the player pray safely again (exceptions exist, see below). Thus prayer is usually reserved for one of a few things: saving the player from almost certain doom, performing some action the player cannot yet do (removing cursed items, getting out of walls, etc.), or creating [[holy water]]. For those players who like a challenge, avoiding any interaction with gods, altars and other religious concepts in the game will satisfy the [[atheist]] conduct.
  
 
Inexperienced players often treat prayer as an [[escape item]] reserved for emergencies. However, it is not 100% reliable due to the long maximum [[prayer timeout]], and conventional escape items can drastically reduce the need for emergency prayers.
 
Inexperienced players often treat prayer as an [[escape item]] reserved for emergencies. However, it is not 100% reliable due to the long maximum [[prayer timeout]], and conventional escape items can drastically reduce the need for emergency prayers.
  
During the course of a successful prayer, you are [[invulnerability|protected from all harm]] (except from psychic blasts by [[mind flayer]]s, from a [[stinking cloud]] or from [[boulder trap]]s). During this protection, the timer for the Wizard's periodic harassment of the player does not advance.
+
During the course of a successful prayer, you are [[invulnerability|protected from all harm]] (except from psychic blasts by [[mind flayer]]s, from a [[poison cloud]] or from [[boulder trap]]s). During this protection, the timer for the Wizard's periodic harassment of the player does not advance.
 +
 
 +
==Safe and unsafe prayer==
 +
The following conditions make it unsafe to pray. Praying when it is unsafe may end up with the prayer being [[#Unsuccessful prayers|unsuccessful]], with various negative effects.
  
==When not to pray==
 
Because prayer is usually used in dire situations, it is important to know when prayer will '''not''' save you. In fact, praying at the wrong time can hurt you, as your god may become angry enough to strike you with lightning or enact some other punishment. The following conditions make it unsafe to pray:
 
* You are polymorphed into a [[demon]] and are attempting to pray to a non-chaotic god.
 
 
* You are polymorphed into an [[undead]] creature and are attempting to pray to a non-chaotic god. (Neutrals have a 90% chance of being able to pray anyway.)
 
* You are polymorphed into an [[undead]] creature and are attempting to pray to a non-chaotic god. (Neutrals have a 90% chance of being able to pray anyway.)
 
* Your [[alignment record]] is negative.
 
* Your [[alignment record]] is negative.
Line 18: Line 21:
 
* You are standing on another god's [[altar]], and both your [[alignment record]] and your [[luck]] are OK.
 
* You are standing on another god's [[altar]], and both your [[alignment record]] and your [[luck]] are OK.
  
==When to pray for help==
+
If you are polymorphed into a [[major demon]] and are attempting to pray to a non-chaotic god, it is ''impossible'' to pray; you merely receive a message "The very idea of praying to a <non-chaotic> god is repugnant to you." and no prayer occurs.{{refsrc|src/pray.c|1804|nethack=3.6.6}}
  
{{main|Trouble}}
+
If none of the above apply, it is safe to pray. If you're not sure, [[enlightenment]] will tell you whether or not you can safely pray.
  
Not all afflictions are equally severe. Gods make a distinction between two groups of problems: minor problems and major problems.{{reffunc|pray.c|in_trouble}} Most players do not bother to pray for relief from minor problems, but it is often the solution to a major problem.
+
==Successful prayers==
 +
If your prayer is successful, your god may do one or more beneficial things for you. The following algorithm shows what your god decides you are worthy of receiving.
 +
 
 +
* If your alignment is at least 14, and you have no major or minor problems, the result is always 5.
 +
* If your alignment is less than 4, but still positive, the result is always 1.
 +
* If your alignment is 0, there is a chance based on [[Luck]] (''!rnl(2)'') that the result will be 1, otherwise it is 0.
 +
* If none of the above apply, the result is generated by 1d(Luck+''x''), where ''x'' is:{{refsrc|src/pray.c|979|nethack=3.6.6}}
 +
** 4 if you are on a co-aligned altar in a temple with a priest,
 +
** 3 if you are on a co-aligned altar not in a temple (or the priest is missing), or
 +
** 2 if you are not on an altar (which also caps the end result of the whole expression at 3).
  
Major problems:
 
* Turning to stone (thanks to a [[cockatrice]] or [[chickatrice]])
 
* Sliming from a [[green slime]]
 
* Wearing an [[amulet of strangulation]]
 
* Standing in [[lava]]
 
* Terminal [[sickness]] ([[food poisoning]] or [[illness]] attack a la [[Juiblex]] and [[Pestilence]])
 
* Hunger status "[[Weak]]" or worse
 
* HP less than or equal to 1/7 of the maximum, or less than 6
 
** In 3.6.0, rather than 1/7 of maximum HP, the percentage changes depending on your XL. Furthermore, your maximum HP is capped at (level*15) for this calculation.
 
 
{|class="prettytable"
 
{|class="prettytable"
!XL
+
!Lookup number
!Percentage
+
!Result
 +
|-
 +
|0
 +
|nothing
 
|-
 
|-
|1-5
+
|1
|1/5
+
|Fix one [[major problem]]
 
|-
 
|-
|6-13
+
|2
|1/6
+
|Fix all major problems
 
|-
 
|-
|14-21
+
|3
|1/7
+
|Fix all major problems or, if you have no major problems, fix one [[minor problem]]
 
|-
 
|-
|22-29
+
|4
|1/8
+
|Fix all major and minor problems
 
|-
 
|-
|30+
+
|5+
|1/9
+
|Fix all major and minor problems, then grant a [[favor]]
 
|}
 
|}
* [[Lycanthropy]]
 
* Being overtaxed or worse as a result of more than 3 points of strength drain (based on your base [[strength]], not counting [[armor]] modifiers){{refsrc|pray.c|147}}
 
* {{anchor|wall}}Being stuck in a [[wall]] without means of escape{{refsrc|pray.c|335}}
 
* Wearing a cursed ring or boots of [[levitation]]
 
* Not having use of one's hands{{refsrc|pray.c|163}}
 
* Wearing a cursed [[blindfold]] or [[towel]]
 
 
Minor problems:
 
* [[Punishment]]
 
* Wearing one or more cursed items (other than a ring or boots of [[levitation]] or a [[blindfold]]/[[towel]])
 
* Having a cursed [[loadstone]]
 
* [[Blindness]]
 
* [[Attribute]] loss
 
* Having wounded legs (from kicking a wall or heavy object for example)
 
* Being "[[Hungry]]" but not worse
 
* [[Stunning]]
 
* [[Confusion]]
 
* [[Hallucination]]
 
 
Note that if your maximum [[HP]] is less than or equal to 5 * (level + 2) and you are praying as a result of low HP, you will also receive 1d5 extra points to your maximum, and then be healed to that new maximum.{{refsrc|pray.c|325}}
 
 
==Water prayer==
 
The other useful purpose of prayer (besides praying for help) is to make [[holy water|holy]] or [[unholy water]].  Praying while standing on an [[altar]] on which [[potion of water|potions of water]] were dropped will (assuming the prayer is successful) bless or curse these. Which one you get is dependent on your own alignment and that of the altar you are praying on. If you are standing on a coaligned altar, the water will become blessed (holy), and you will also receive the benefit of the prayer. If you are standing on another god's altar, the water will become cursed (unholy). Note that making a water prayer on another god's altar will [[anger]] ''your'' god, so this should be done with extreme caution.
 
  
Praying at a co-aligned altar additionally has the other effects described below, whether or not there was water to bless.
+
A successful prayer will also give you a hint about your current alignment record, when your god's mood is described:
 
 
In [[Slash'EM Extended]], a water prayer carries a 1% risk of the altar disappearing permanently.
 
 
 
==Alignment clues==
 
After a prayer is completed, you will receive a message giving you a hint as to your current alignment, in the form of "You feel that <god> is <feeling>".{{refsrc|pray.c|794}}
 
  
 
{|class="prettytable"
 
{|class="prettytable"
Line 101: Line 79:
 
|}
 
|}
  
==How your god decides what to grant==
+
===Water prayer===
 
+
Praying while standing on an altar on which there are [[potion of water|potions of water]] will bless or curse these, turning them into [[holy water]] or [[unholy water]]. Which one you get is dependent on the alignments of you and the altar. If you are standing on a coaligned altar and your prayer is successful, the water will be blessed and you will also receive any other benefits of the prayer. If you are standing on another god's altar, the water will become cursed (unholy). Note that making a water prayer on another god's altar will [[anger]] ''your'' god (it technically counts as an unsuccessful prayer), so this should be done with extreme caution.
The following table shows how your god decides what you are worthy of receiving during a prayer. This assumes that it is safe to pray. If you are not on an altar, the result is always capped at 3.
 
 
 
* If your alignment is at least 14, and you have no major or minor problems, you are granted a favor. See "Favors and gifts", below.
 
* If your alignment is less than 4, but still positive, the result is always 1.
 
* If your alignment is 0, there is a chance based on Luck (''!rnl(2)'') that the result will be 1, otherwise it is 0.
 
* If none of the above apply, the result is generated by 1d(''[[Luck]]''+x), where ''x'' is:{{refsrc|pray.c|824}}
 
** 4 if you are on an altar in a temple with a priest,
 
** 3 if you are on an altar not in a temple (or the priest is missing), or
 
** 2 if you are not on an altar.
 
  
 +
===Favors===
 +
A '''favor''', also known as a '''boon''' or '''prayer boon''', is a special gift given to you by your god as a result of praying while in good standing. If your god decides to grant you a favor, the game chooses a random number ''x'' such that 0 <= ''x'' < (Luck+6)/2 rounded down{{refsrc|src/pray.c|1015|nethack=3.6.6}}, and uses the result as follows:-
  
 
{|class="prettytable"
 
{|class="prettytable"
!Lookup number
+
!x
 
!Result
 
!Result
 
|-
 
|-
 
|0
 
|0
|nothing
+
|No favor.
 
|-
 
|-
 
|1
 
|1
|Fix one major problem
+
|Your weapon is uncursed if it is cursed, and blessed if it is uncursed. Any [[erosion]] is repaired. It is ''not'' made [[erodeproof]]. Only weapons and [[weapon-tool]]s are eligible for this effect.
|-
 
|2
 
|Fix all major problems
 
|-
 
|3
 
|Fix all major problems or, if you have no major problems, fix one minor problem
 
|-
 
|4
 
|Fix all major and minor problems
 
|-
 
|5+
 
|Fix all major and minor problems, then grant a favor
 
|}
 
 
 
In practice, this has the following implications:
 
* If you have zero alignment and no worse than -2 Luck (e.g. an early [[pacifist]] or [[protection racket]]eer), there is a 50% chance that one major problem will be fixed (higher with Luck above 2).
 
* If your alignment is positive, at least one major problem will be fixed.
 
* If you are not on an altar, a favor will be granted only if you have no problems, and have high alignment. At most one minor problem will be fixed.
 
* The chance of a minor problem ''not'' being fixed is ''2/(Luck+2)'', assuming you have no major problems.
 
 
 
==Favors and gifts==
 
 
 
If your god decides to grant you a favor, as explained above, the following table is used. The lookup number is generated by ''1d([[Luck]]/2 + 3)'' (With ''Luck/2'' rounded down).{{refsrc|pray.c|850|comment=Internally the formula is <tt>[[rn2]](([[Luck]] + 6)>>1)</tt>, and the results range from 0 to 7+, not 1 to 8+.}}
 
 
 
{|class="prettytable"
 
!Lookup number
 
!Result
 
|-
 
|1
 
|No favor.
 
 
|-
 
|-
 
|2
 
|2
|Your weapon is uncursed if it is cursed, and blessed if it is uncursed. Any [[erosion]] is repaired. It is ''not'' made [[erodeproof]]. Only weapons and [[weapon-tool]]s are eligible for this effect.
+
| You either regain one lost experience level as though from a blessed [[potion of full healing]], or otherwise gain 5 maximum [[hitpoints]]; in both cases your hitpoints are restored to maximum. Any drained strength is restored, and your [[nutrition]] is reset to 900 if it's lower than 900. ''(“You are surrounded by a golden glow.”)''
 
|-
 
|-
 
|3
 
|3
| You either regain one lost experience level as though from a blessed [[potion of full healing]] (up to 1/2 the levels lost), or otherwise gain 5 maximum [[hitpoints]]; in both cases your hitpoints are restored to maximum. Any drained strength is restored, and your [[nutrition]] is reset to 900 if it's lower than 900. ''(“You are surrounded by a golden glow.”)''
 
|-
 
|4
 
 
|
 
|
 
*First time: ''“Hark, mortal! To enter the [[castle]], thou must play the right tune!”'' (''“Hark, creature! ...”'' if not human). No effect.
 
*First time: ''“Hark, mortal! To enter the [[castle]], thou must play the right tune!”'' (''“Hark, creature! ...”'' if not human). No effect.
 
*Second time: Tune to enter the castle is revealed.
 
*Second time: Tune to enter the castle is revealed.
*Subsequent times, or if the drawbridge has already been opened: Same as effect 3 above.
+
*Subsequent times, or if the drawbridge has already been opened: Same as effect 2 above.
 +
|-
 +
|4
 +
|Uncurses all possessions (as blessed [[scroll of remove curse]]), except that a worn [[helm of opposite alignment]] will not be made uncursed.''(“You are surrounded by a light blue aura.”)'' ''(“Your <item> softly glows amber.”)'' If blind ''(“You feel the power of <deity>.”)''
 
|-
 
|-
 
|5
 
|5
|Uncurses all possessions (as blessed [[scroll of remove curse]]).''(“You are surrounded by a light blue aura.”)'' ''(“Your <item> softly glows amber.”)'' If blind ''(“You feel the power of <deity>.”)''
+
|You gain one [[intrinsic]], selected in order from ([[Telepathy]], [[Speed]], [[Stealth]]). If you already possess all of them, you gain [[intrinsic protection]] as from an [[aligned priest]], except without the natural AC limits. ''(“Thou hast pleased me with thy progress, and thus I grant thee the gift of <intrinsic>! Use it wisely in my name!”)''
 
|-
 
|-
 
|6
 
|6
|You gain one [[intrinsic]], selected in order from ([[Telepathy]], [[Speed]], [[Stealth]]). If you already possess all of them, you gain [[intrinsic protection]] as if from a priest, except without the natural AC limits. ''(“Thou hast pleased me with thy progress, and thus I grant thee the gift of <intrinsic>! Use it wisely in my name!”)''
+
|You get a blessed [[spellbook]]. ''(“A spellbook appears at your <feet>!”)''
 +
 
 +
The game will generate a random spellbook according to the usual object generation probabilities, excluding [[novel]]s. It will then re-roll another random spellbook up to ''xlvl'' times if it picks a spell you already have in your [[spellcasting]] {{kbd|Z}} menu, a spell school you are restricted in, or a [[blank spellbook]] (unless you're carrying a [[magic marker]] or have not yet identified the blank spellbook, in which case you're eligible to receive it).
 +
{{upcoming|NetHack 3.7|There is a 25% chance that "Divine knowledge of <spell> fills your mind!" and you learn the spell directly without getting a book. Being illiterate does not influence these odds.}}
 
|-
 
|-
|7
+
|7+
|You get a [[spellbook]]. ''(“A spellbook appears at your <feet>!”)''The game will generate a random spellbook according to the usual object generation probabilities. It will then re-roll another random spellbook up to ''xlvl'' times if it picks a spell you already know, a spell school you are restricted in, or (if not carrying a [[magic marker]] or you haven't identified one) a [[blank spellbook]]. "Know" means present in the [[spellcasting]] {{kbd|Z}} command menu. The book is always blessed.
+
|If you are Pious, you are [[Crowning|crowned]]. If already crowned or your alignment record is less than 20, same as effect 6 above.
|-
 
|8+
 
|If you are Pious, you are [[Crowning|crowned]]. If already crowned or your alignment record is less than 20, same as effect 7 above.
 
 
|}
 
|}
 
Usually crowning is considered undesirable. Therefore, if you are repeatedly sacrificing and praying, you should try to reduce the chances of this happening. Putting away your [[luckstone]] will decrease your Luck to at most 10, reducing (but not eliminating) the possibility of crowning.
 
 
If you can reduce your Luck to 9 or lower, you are safe from crowning. This can be achieved by breaking a [[mirror]] (-2), or by [[jumping]] in [[Sokoban]] (-1). Be careful not to affect your Luck further by sacrificing too much, or by spending many turns without your luckstone.
 
 
If you don't have any reason to keep your [[alignment record]] high, you can prefer to lower it instead of luck for the time of prayer. This allows you to receive all other profits from favors except for crowning, especially getting spellbooks (every time you'd be crowned instead). Sadly, there are only few ways to lower your alignment record reliably anytime (without altering any other statistics). These are offering 0 zorkmids to coaligned priest or healing your pet as a chaotic non-healer. Don't forget to check your alignment for '''not''' being piously aligned with a [[stethoscope]], [[wand of enlightenment]] or a [[wand of probing]]. Alignment record is increased really easy, so check it before '''every''' prayer.
 
  
 
==Unsuccessful prayers==
 
==Unsuccessful prayers==
Unsuccessful prayers can happen for a variety of reasons, documented above.  The following table indicates the result of praying during one of these situations. Note you lose all intrinsic [[protection]] if any god [[smite]]s you (unless attempting to convert high [[altar]]s on the [[Astral Plane]] or in [[Moloch's Sanctum]]) or your god gets [[angry]].
+
Unsuccessful prayers can happen for a variety of reasons, and have a variety of consequences, the most common of which is being [[smite]]d.
  
 
{|class="prettytable"
 
{|class="prettytable"
 
!Condition
 
!Condition
 
!Result
 
!Result
|-
 
|Polymorphed into a demon and praying to a non-chaotic god
 
|You are simply unable to pray: "The very idea of praying to a <non-chaotic> god is repugnant to you."{{refsrc|pray.c|1514}}
 
 
|-
 
|-
 
|Polymorphed into an [[undead]] creature and attempting to pray to a lawful god (or a neutral god, 10% of the time)
 
|Polymorphed into an [[undead]] creature and attempting to pray to a lawful god (or a neutral god, 10% of the time)
|If lawful, receive "Vile creature, thou durst call upon me?".  If neutral, receive  "Walk no more, perversion of nature!".  Both then receive "You feel like you are falling apart."  You return to natural form (even if wearing an [[amulet of unchanging]]), take 1d20 damage, and abuse your constitution.{{refsrc|pray.c|1602}}
+
|If lawful, receive "Vile creature, thou durst call upon me?".  If neutral, receive  "Walk no more, perversion of nature!".  Both then receive "You feel like you are falling apart."  You return to natural form (even if wearing an [[amulet of unchanging]]), take 1d20 damage, and abuse your constitution.{{refsrc|src/pray.c|1890|nethack=3.6.7}}
 
|-
 
|-
 
|Prayer timeout is too high
 
|Prayer timeout is too high
Line 208: Line 140:
 
|-
 
|-
 
|Standing on a different god's altar and praying as normal
 
|Standing on a different god's altar and praying as normal
|You receive an alignment clue (see above), then lose one alignment point.  No other effects.  Your prayer timeout is not incremented.
+
|Your god (may?) become [[angry]] and/or [[smite]] you. You lose all divine protection.
 
|-
 
|-
 
|Praying in [[Gehennom]]
 
|Praying in [[Gehennom]]
|Your god won't help you and may be angered.{{refsrc|pray.c|1614}}
+
|Your god won't help you and may be angered.{{refsrc|src/pray.c|1902|nethack=3.6.7}}
 
|}
 
|}
  
{{basedon|name=Matthew Lahut|url=http://www.steelypips.org/nethack/pray.html}}
+
==Strategy==
 +
Given its ability to fix a wide variety of [[trouble]]s, prayer is a very helpful tool for escaping a tough situation, but the mechanics of prayer timeout mean that it can't be used twice in quick succession.
 +
 
 +
The successful prayer algorithm has the following implications:
 +
* If you have zero alignment and no worse than -2 Luck (e.g. an early [[pacifist]] or [[protection racket]]eer), there is a 50% chance that praying will fix one major problem (higher with Luck above 2).
 +
* If your alignment is positive, at least one major problem will be fixed.
 +
* If you are not on an altar, a favor will be granted only if you have no problems, and have high alignment. At most one minor problem will be fixed.
 +
* The chance of a minor problem ''not'' being fixed is ''2/(Luck+2)'', assuming you have no major problems.
 +
 
 +
Praying can also play a part in [[altar farming]], but runs the risk of being crowned, which may be considered undesirable since it permanently increases prayer timeout. Dropping or bagging your [[luckstone]] will decrease your Luck to at most 10, reducing (but not eliminating) the possibility of crowning.
 +
 
 +
If you can reduce your Luck to 9 or lower, you are safe from crowning. One portable way to do this is to break a [[mirror]] for a -2 Luck penalty. Be careful not to affect your Luck further by sacrificing too much or spending many turns without your luckstone.
 +
 
 +
If you don't have any reason to keep your [[alignment record]] high, you can prefer to lower it instead of Luck for the time of prayer. This allows you to receive all other profits from favors except for crowning, especially getting spellbooks (every time you'd be crowned instead). Sadly, there are only a few reliable ways to lower your alignment record anytime (without altering any other statistics). You can offer 0 zorkmids to a coaligned priest, pray at a cross-aligned altar (with no water on the altar), attack a creature while standing on an engraved Elbereth, or heal your pet as a chaotic non-healer. [[Monk]]s who know the spell of [[stone to flesh]] can eat lots of [[meatball]]s.  [[Knight]]s can lower alignment by eating while satiated; meatballs are best for this as well. You can also attack enemies from atop an [[Elbereth]] engraving (a weak attack on a [[sessile]] monster is recommended to make this method reusable). Don't forget to check your alignment for ''not'' being piously aligned with a [[stethoscope]], [[wand of enlightenment]] or a [[wand of probing]]. Alignment record is increased very easily, so check it before every prayer.
 +
 
 +
==Encyclopedia entry==
 +
{{encyclopedia|
 +
Whatever a man prays for, he prays for a miracle.  Every
 +
prayer reduces itself to this:  Great God, grant that twice
 +
two be not four.
 +
|[ Fathers and Sons, by Ivan Turgenev ]
 +
}}
  
 
==References==
 
==References==
<references />
+
<references/>
 
+
{{nethack-366}}
{{nethack-343}}
 
 
[[Category:Religion]]
 
[[Category:Religion]]
 
[[Category:Extended commands]]
 
[[Category:Extended commands]]

Latest revision as of 16:26, 18 February 2024

In NetHack, prayer is an action used to communicate with the player's god, and is performed with the #pray extended command.

Description

The purpose of praying is to ask your god for help, and you must not do so too often. The player has a prayer timeout, a counter which is raised when praying, and decrements one turn at a time. Only when this counter reaches zero may the player pray safely again (exceptions exist, see below). Thus prayer is usually reserved for one of a few things: saving the player from almost certain doom, performing some action the player cannot yet do (removing cursed items, getting out of walls, etc.), or creating holy water. For those players who like a challenge, avoiding any interaction with gods, altars and other religious concepts in the game will satisfy the atheist conduct.

Inexperienced players often treat prayer as an escape item reserved for emergencies. However, it is not 100% reliable due to the long maximum prayer timeout, and conventional escape items can drastically reduce the need for emergency prayers.

During the course of a successful prayer, you are protected from all harm (except from psychic blasts by mind flayers, from a poison cloud or from boulder traps). During this protection, the timer for the Wizard's periodic harassment of the player does not advance.

Safe and unsafe prayer

The following conditions make it unsafe to pray. Praying when it is unsafe may end up with the prayer being unsuccessful, with various negative effects.

  • You are polymorphed into an undead creature and are attempting to pray to a non-chaotic god. (Neutrals have a 90% chance of being able to pray anyway.)
  • Your alignment record is negative.
  • Your luck is negative.
  • Your god is still angry at you from an earlier event.
  • Your prayer timeout is not yet zero. (If you are currently suffering from a major problem, it is safe to pray with a timeout as high as 200; if a minor problem, it may be as high as 100.)
  • You are in Gehennom.
  • You are standing on another god's altar, and both your alignment record and your luck are OK.

If you are polymorphed into a major demon and are attempting to pray to a non-chaotic god, it is impossible to pray; you merely receive a message "The very idea of praying to a <non-chaotic> god is repugnant to you." and no prayer occurs.[1]

If none of the above apply, it is safe to pray. If you're not sure, enlightenment will tell you whether or not you can safely pray.

Successful prayers

If your prayer is successful, your god may do one or more beneficial things for you. The following algorithm shows what your god decides you are worthy of receiving.

  • If your alignment is at least 14, and you have no major or minor problems, the result is always 5.
  • If your alignment is less than 4, but still positive, the result is always 1.
  • If your alignment is 0, there is a chance based on Luck (!rnl(2)) that the result will be 1, otherwise it is 0.
  • If none of the above apply, the result is generated by 1d(Luck+x), where x is:[2]
    • 4 if you are on a co-aligned altar in a temple with a priest,
    • 3 if you are on a co-aligned altar not in a temple (or the priest is missing), or
    • 2 if you are not on an altar (which also caps the end result of the whole expression at 3).
Lookup number Result
0 nothing
1 Fix one major problem
2 Fix all major problems
3 Fix all major problems or, if you have no major problems, fix one minor problem
4 Fix all major and minor problems
5+ Fix all major and minor problems, then grant a favor

A successful prayer will also give you a hint about your current alignment record, when your god's mood is described:

Feeling Feeling (hallucination) Alignment range
well-pleased pleased as punch 14 or greater
pleased ticklish 4 to 13
satisfied full 0 to 3

Water prayer

Praying while standing on an altar on which there are potions of water will bless or curse these, turning them into holy water or unholy water. Which one you get is dependent on the alignments of you and the altar. If you are standing on a coaligned altar and your prayer is successful, the water will be blessed and you will also receive any other benefits of the prayer. If you are standing on another god's altar, the water will become cursed (unholy). Note that making a water prayer on another god's altar will anger your god (it technically counts as an unsuccessful prayer), so this should be done with extreme caution.

Favors

A favor, also known as a boon or prayer boon, is a special gift given to you by your god as a result of praying while in good standing. If your god decides to grant you a favor, the game chooses a random number x such that 0 <= x < (Luck+6)/2 rounded down[3], and uses the result as follows:-

x Result
0 No favor.
1 Your weapon is uncursed if it is cursed, and blessed if it is uncursed. Any erosion is repaired. It is not made erodeproof. Only weapons and weapon-tools are eligible for this effect.
2 You either regain one lost experience level as though from a blessed potion of full healing, or otherwise gain 5 maximum hitpoints; in both cases your hitpoints are restored to maximum. Any drained strength is restored, and your nutrition is reset to 900 if it's lower than 900. (“You are surrounded by a golden glow.”)
3
  • First time: “Hark, mortal! To enter the castle, thou must play the right tune!” (“Hark, creature! ...” if not human). No effect.
  • Second time: Tune to enter the castle is revealed.
  • Subsequent times, or if the drawbridge has already been opened: Same as effect 2 above.
4 Uncurses all possessions (as blessed scroll of remove curse), except that a worn helm of opposite alignment will not be made uncursed.(“You are surrounded by a light blue aura.”) (“Your <item> softly glows amber.”) If blind (“You feel the power of <deity>.”)
5 You gain one intrinsic, selected in order from (Telepathy, Speed, Stealth). If you already possess all of them, you gain intrinsic protection as from an aligned priest, except without the natural AC limits. (“Thou hast pleased me with thy progress, and thus I grant thee the gift of <intrinsic>! Use it wisely in my name!”)
6 You get a blessed spellbook. (“A spellbook appears at your <feet>!”)

The game will generate a random spellbook according to the usual object generation probabilities, excluding novels. It will then re-roll another random spellbook up to xlvl times if it picks a spell you already have in your spellcasting Z menu, a spell school you are restricted in, or a blank spellbook (unless you're carrying a magic marker or have not yet identified the blank spellbook, in which case you're eligible to receive it).

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

There is a 25% chance that "Divine knowledge of <spell> fills your mind!" and you learn the spell directly without getting a book. Being illiterate does not influence these odds.
7+ If you are Pious, you are crowned. If already crowned or your alignment record is less than 20, same as effect 6 above.

Unsuccessful prayers

Unsuccessful prayers can happen for a variety of reasons, and have a variety of consequences, the most common of which is being smited.

Condition Result
Polymorphed into an undead creature and attempting to pray to a lawful god (or a neutral god, 10% of the time) If lawful, receive "Vile creature, thou durst call upon me?". If neutral, receive "Walk no more, perversion of nature!". Both then receive "You feel like you are falling apart." You return to natural form (even if wearing an amulet of unchanging), take 1d20 damage, and abuse your constitution.[4]
Prayer timeout is too high Your god's anger is incremented by one, you lose 3 luck, and your god smites you.
Alignment or luck is negative, or your god is angry with you Your god smites you.
Standing on a different god's altar and praying for unholy water Your god's anger is incremented by one, you lose 3 luck, your prayer timeout is increased, and your god smites you.
Standing on a different god's altar and praying as normal Your god (may?) become angry and/or smite you. You lose all divine protection.
Praying in Gehennom Your god won't help you and may be angered.[5]

Strategy

Given its ability to fix a wide variety of troubles, prayer is a very helpful tool for escaping a tough situation, but the mechanics of prayer timeout mean that it can't be used twice in quick succession.

The successful prayer algorithm has the following implications:

  • If you have zero alignment and no worse than -2 Luck (e.g. an early pacifist or protection racketeer), there is a 50% chance that praying will fix one major problem (higher with Luck above 2).
  • If your alignment is positive, at least one major problem will be fixed.
  • If you are not on an altar, a favor will be granted only if you have no problems, and have high alignment. At most one minor problem will be fixed.
  • The chance of a minor problem not being fixed is 2/(Luck+2), assuming you have no major problems.

Praying can also play a part in altar farming, but runs the risk of being crowned, which may be considered undesirable since it permanently increases prayer timeout. Dropping or bagging your luckstone will decrease your Luck to at most 10, reducing (but not eliminating) the possibility of crowning.

If you can reduce your Luck to 9 or lower, you are safe from crowning. One portable way to do this is to break a mirror for a -2 Luck penalty. Be careful not to affect your Luck further by sacrificing too much or spending many turns without your luckstone.

If you don't have any reason to keep your alignment record high, you can prefer to lower it instead of Luck for the time of prayer. This allows you to receive all other profits from favors except for crowning, especially getting spellbooks (every time you'd be crowned instead). Sadly, there are only a few reliable ways to lower your alignment record anytime (without altering any other statistics). You can offer 0 zorkmids to a coaligned priest, pray at a cross-aligned altar (with no water on the altar), attack a creature while standing on an engraved Elbereth, or heal your pet as a chaotic non-healer. Monks who know the spell of stone to flesh can eat lots of meatballs. Knights can lower alignment by eating while satiated; meatballs are best for this as well. You can also attack enemies from atop an Elbereth engraving (a weak attack on a sessile monster is recommended to make this method reusable). Don't forget to check your alignment for not being piously aligned with a stethoscope, wand of enlightenment or a wand of probing. Alignment record is increased very easily, so check it before every prayer.

Encyclopedia entry

Whatever a man prays for, he prays for a miracle. Every
prayer reduces itself to this: Great God, grant that twice
two be not four.

[ Fathers and Sons, by Ivan Turgenev ]

References