Prayer

From NetHackWiki
Revision as of 14:40, 11 May 2008 by Killian (talk | contribs) (Favors and gifts: add some wikilinks)
Jump to navigation Jump to search


A user has suggested improving this page or section as follows:

"Some of this page is based on a spoiler for NetHack 3.3.1, and could therefore be incorrect. The information should be checked to see if it is still current."

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.

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 10% 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.

When to pray for help

Main article: Trouble

Not all afflictions are equally severe. Gods make a distinction between two groups of problems: minor problems and major problems. Most players do not bother to pray for relief from minor problems, but it is often the solution to a major problem.

Major problems:

Minor problems:

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.

Other times to pray

The other useful purpose of prayer (besides praying for help) is to make holy or unholy water. Praying while standing on an altar on which potions of water were dropped will create (assuming the prayer is successful) 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.

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>".

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

How god decides what to grant

This section has been updated for NetHack 3.4.3.

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 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, your base roll is a number between 1 and Luck + x inclusive, where x is:[2]
    • 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.
  • If you are not on an altar, the result is capped at 3.
Lookup number Result
0 nothing
1 Fix one major problem
2 Fix all major problems
3 Fix all major problems or 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 runner), 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, no favors will be granted, and 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

This section has been updated for NetHack 3.4.3.

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+6), divided by 2, rounded up.[3]

Lookup number Result
1 No favor.
2 Your weapon is dipped in holy water and any erosion is repaired. It is not made erodeproof.
3 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 strength drain is reversed, your nutrition is reset to 900 if hungry or worse, and your Luck is restored to 0 if negative. (“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.
  • Second time: Tune to enter the castle is revealed.
  • Subsequent times, or if the drawbridge has already been opened: Same as effect 3 above.
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>.”)

6 You gain one intrinsic, selected in order from (Telepathy, Speed, Stealth). If you already possess all of them, you gain protection as if from a priest, except without the natural AC limits.
7 You get a spellbook. (“An object 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) a blank spellbook. The book is always blessed.

8+ You are crowned. If already crowned, same as effect 7 above.

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.

Condition Result
Polymorphed into a demon and praying to a non-chaotic god Receive "The very idea of praying to a <non-chaotic> god is repugnant to you.", no other effects.
Polymorphed into an undead creature and attempting to pray to a non-chaotic god 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) and take 1d20 - 1 damage.
Prayer timeout is too high Your god's anger is incremented by one, you lose 3 luck, and a possible negative effect occurs (see below).
Alignment or luck is negative, or your god is angry with you You get a possible negative effect (see below)
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 a possible negative effect occurs (see below)
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.

Possible negative effects of praying

The negative effect that an unsuccessful prayer might incur depends on four things:

  • Your god's anger
  • Whether you were praying to your own god or a different god
  • Your luck
  • Your alignment

The following algorithm and lookup table shows how the negative effect is chosen.

  1. Base value
    1. If you are praying to your own god, start with three times your god's anger.
    2. If you are praying to a different god, start with half your alignment (likely to be greater than three times your god's anger, so praying to a different god is usually worse).
  2. Luck modifier
    1. If your luck is positive or your alignment is at least 4, subtract one third of your luck from the base value.
    2. Otherwise, add the absolute value of your luck to the base value (so the more negative your luck is, the more the punishment is going to hurt).
  3. Rolling
    1. If the value is greater than 15, it is capped at 15.
    2. Roll 1d(your value) and use the following lookup table.

You will lose any protection you may have in addition to the following possible effects.

Value Message Effect
1 - 2 "You feel that <god> is displeased." If you are hallucinating, you receive "You feel that <god> is bummed." No effect
3 - 4 If your aligment is less than zero, you receive "Thou have strayed from the path, mortal." If you have positive alignment, or you are praying to the wrong god, you receive "Thou art arrogant, mortal." In both cases you receive "Thou must relearn thy lessons!" You lose 1 WIS and one level.
5 - 6 "Thou hast angered me." "A black glow surrounds you." Random cursing of inventory items.
7 - 8 No message. If you are not punished, you become punished. If you are already punished, same as 5 - 6
9 - 10 If you are praying to the wrong god, you receive "Thou durst scorn me?". Otherwise you receive "Thou durst call upon me?" In both cases you receive "Then die, mortal!" or "Then die, creature!" if not human. A hostile minion of your god is summoned.
10+ "Thou hast angered me." Your god zaps you with a fatal lightning bolt.
  • If you are engulfed in a monster lacking shock-resistance, it dies.
  • If you are not engulfed, and you do not have shock resistance, you die.

If you survive via engulfing or shock resistance, you receive "<god> is not deterred... A wide-angle disintegration beam hits you!".

  • If you are still engulfed and the monster lacks disintegration resistance, the monster dies.
  • If you are not engulfed, and do not have disintegration resistance, you die.

If you survive yet again, you receive "You bask in its black glow for a minute..." and your god says "I believe it not!"

If you are on the Astral Plane, you receive "Thou cannot escape my wrath, mortal! Destroy <him>, my servants!" and three hostile minions are summoned.

This page is based on a spoiler by Matthew Lahut, available at http://www.steelypips.org/nethack/pray.html

References

  1. pray.c#line163
  2. pray.c#line824
  3. Actually the formula is rn2((Luck + 6)>>1), and the results range from 0 to 7+. (pray.c, line 850)


This page may need to be updated for the current version of NetHack.

It may contain text specific to NetHack 3.4.3. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-343}} tag to the current version's tag or {{noversion}} as appropriate.