A hit point is an abstract unit for the amount of damage a thing can take before being destroyed, equivalent to one-percent of the player character's initial health. 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). When using "spy mode" in a cooperative multiplayer game, any redness indicates damage taken by the "spying" player.
- A non-player may enter a pain state where it does nothing for a brief period, possibly allowing the opponent to continue attacking. This is the equivalent of the player's red screen, for monsters.
- A character struck by a weapon is pushed a short distance in the direction of fire, again in proportion to the strength of the attack (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 is destroyed (it "dies").
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 (for example, 3-24 for a fireball from an imp), 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 tracer ray from the BFG does a hypothetical 15-120 points of damage, calculated by summing 15 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 nearly uniform in real play, as expected. For the tracer ray, 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, fifteen eight-sided dice rolled together.
- This article incorporates text from the open-content Wikipedia online encyclopedia article Hit point.