Hit point

Hit points are an abstraction for the amount of damage a monster or player can take before dying. When an attack succeeds, some number of hit points (determined by the type of attack, any armor worn, and a random number) are deducted from the target's remaining supply.

Losing hit points has the following effects:


 * The player's vision is temporarily reddened. The amount of redness increases with the damage taken; in extreme cases, such as a direct hit from a rocket, the player's vision is almost totally obscured for about one second (hence the development of the no red cheat).
 * A character struck by a weapon is pushed a short distance in the direction of fire, again in proportion to the attacker's strength (but in inverse proportion to the victim's mass).
 * The player's face in the status bar may change.
 * When the target reaches zero hit points, it dies.

Barrels and Pods also have hit points, exploding when they reach zero.

Technical
Damage inflicted by inanimate objects (such as crushers, barrels, and damaging floors) is determined entirely by the location of the affected character. For attacks by monsters and weapons, an additional variation is introduced by the function P_Random, which calls the pseudorandom number generator (m_random.c).

The possible damage values of an attack form are commonly stated as a simple range (e.g., 3-24 for an Imp fireball), but the standard deviation of such a range depends on how many times the generator is actually called. For example, a bullet from the pistol does 5-15 points of damage, calculated by multiplying one random number (1-3) by 5. On the other hand, a blast tracer from the BFG does 16-128 points of damage, calculated by summing 16 random numbers (1-8).

Due to the periodicity of the generator, the more times it is called during a single attack, the farther its results deviate from an ideal bell curve. Again using the above examples, the probabilities for the bullet are very nearly uniform in real play, as expected. For the blast tracer, however, values outside the range 49-87 are not even possible, and the distribution between those values is much flatter than it would be for, say, sixteen eight-sided dice rolled together.