                  Monsters (not) leaving corpses
                 ================================

             by Boudewijn Wayers (dedos4@win.tue.nl),
               and Peter Snelling (snelling@bnr.ca).


Recently, someone asked why it seemed that wraiths so seldom left a
corpse. After having had a LONG look at the sources, I think I can
conclude the following:

First, some monsters NEVER leave a corpse (these monsters are mentioned
in the WCST 7.00 spoilers). Next, some monsters ALWAYS leave a corpse,
when killed the "usual" way: these are lizards, the three riders in
the endgame, and "big" monsters (all monsters that are defined as
Large, Huge or Gargantuan: have a look at the sources to know which
are). Of course, if you turn anything to stone, you won't be able to
eat its corpse, since there will be none. Also, on the Rogue level no
corpses are ever left.

Now some monsters may not be killed by you, but by another cause (things
that spring to mind are applying some tool, making a wrong move (into a
trap), gettting caught in a blast, being hit by another monster when
you are causing conflict, or throwing something cursed at you and being
hit themselves). If this is the case, there is a 2/3 chance that the
monster will leave a corpse, except when you are on a graveyard level
and the monster is an undead, in which case the chance is 2/9.

Now suppose you killed the monster yourself. Again, the game first
looks if you are on a "graveyard" level, and whether the monster you
have killed is an undead. If this is the case, there is a 1/3 chance
that no corpse will be left to start with.

Now you must do some counting. Start out with the number two (2).
Add one (1) if the monster frequency (this can be looked up in the
sources, in monst.c, and ranges from 0 to 7) is less than 2.
Then add 1 if the monster size is Tiny (again, look in monst.c). There
is a one-in-(this number) chance that a corpse will be generated.


An example (the wraith-frequency is 2, and a wraith isn't Tiny):

Suppose a wraith is killed by a trap, with no graveyard on the level.
  There is a 2/3 chance that a corpse will be left.

Suppose a wraith is killed by you, with no graveyard on the level.
  There is a 1/(2+0+0) = 1/2 chance that a corpse will be left.

Suppose a wraith is killed by a trap, with a graveyard on the level.
  There is a 1/3*2/3 = 2/9 chance that a corpse will be left.

Suppose a wraith is killed by you, with a graveyard on the level.
  There is a 1/3*1/4 = 1/12 chance that a corpse will be left.

So the chances of getting a wraith corpse are (if my reading of the
source is correct):

Cause	Gravey	Chance
Other	No	2/3  = 24/36
You	No	1/2  = 18/36
Other	Yes	2/9  =  8/36
You	Yes	1/12 =  3/36

From the above, it is obvious that you should let wraiths be killed, in
stead of killing them off yourself, if you want the largest chance of
them leaving a corpse. Also, you could try to have them follow you up
or down a staircase, to a level without a graveyard.

