Hit point

From DoomWiki.org

A hit point (commonly known as HP) 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 sometimes 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 or goes below zero hit points, it is destroyed, or "dies." Depending on the amount or type of damage done, the target may transition to a different state for its death animation. An example is a gibbing death.

Inanimate objects such as the exploding barrels in the Doom games, the pods in Heretic, and trees in Hexen also have hit points. Whether or not any given object can take damage is determined entirely by an internal flag called MF_SHOOTABLE.

Technical[edit]

Damage inflicted by inanimate objects (such as crushers, barrels, and damaging floors) is determined by the type of sector or sector action. For crushing damage, Doom, Heretic, and Strife inflict a constant 10 damage per 4 tics. Damage of crushers and polyobjects in Hexen may vary per action. Damage inflicted by damaging floors is done in constant amounts (such as 5, 10, or 20) at periodic intervals.

For attacks by players, monsters, and weapons, variation is introduced through use of the function P_Random, which implements a pseudo-random number generator (see m_random.c).

The possible damage values of such a randomized form of attack are commonly stated as a simple range (for example, 3-24 for a fireball from an imp), but the central tendency 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, in steps of 5, 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, which contains a table of 256 numbers, more calls during the process of a single attack result in greater deviation 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.

Source[edit]

  • This article incorporates text from the open-content Wikipedia online encyclopedia article Hit point, dated 13 October 2007.

See also[edit]