                     What Affects Your Prayer-Timeout
                     ================================

                by Kundi Xue (xkd@soda.csua.berkeley.edu),
          with additions by Boudewijn Wayers (dedos4@win.tue.nl).


Prayer-timeout and luck are different things. Your prayer-timeout is a
number greater than or equal to zero, and if it is at zero, you can pray
successfully.

The following describes briefly how your prayer-timeout is affected by
various things you can do.

Your prayer-timeout is 300 at the start, and is reduced by one for each
move until it reaches zero. It is affected by various things. I use the
following notation:

=: set to
+: plus
-: minus

random(x): a random number is generated, averaging at x. This number
can become quite high: it is a Poisson-like distribution.

random(x,y): a random number between x and y, all having the same
chance.


Your god give you a favourable answer to a prayer		=random(350)
 - when you are the Hand of Elbereth (additional)		+random(1000)
 - when you are the Envoy of Balance (additional)		+random(2000)
 - when you are the Glory of Arioch (additional)		+random(3000)
 - after you killed the Wizard of Yendor (additional)		+random(1000)

Your god gives you an artifact through sacrifice	
				=random(300+50*(number of artifacts in game))

Your god fixes your trouble(s)					+random(100)

You change alignment						+300

You make your god angry at you	 				=random(300)

You are praying without trouble and before prayer timeout
 or with minor trouble and prayer timeout > 100
 or with major trouble and prayer timeout > 200			+random(250)
In all three cases, your god will become displeased.

If you make a wish						+random(100,150)

If your sacrifice is accepted while your god is not angry, and
your prayer timeout has not reached zero yet, and:
 - you are chaotic				-(sacrifice value)*500/24
 - you are not chaotic		 		-(sacrifice value)*300/24

You can pray successfully if
 - your god is not angry, and
 - your luck is not below 0, and
 - your alignment is not below 0, and
 - you are not praying without trouble while prayer timeout > 0, and
 - you are not praying with minor troubles while prayer timeout > 100, and
 - you are not praying with major troubles while prayer timeout > 200, and
 - you are not praying on the wrong altar.


You still have a chance of god giving you nothing even though he's
pleased. This may happen when your alignment is 0 and you have a bad
die roll.

Note that your timeout can never drop below zero: if this would happen,
it is set to zero instead.

