Difference between revisions of "Pain state"

From DoomWiki.org

[checked revision][checked revision]
(List of monsters sorted by pain chance: add Hexen & Strife tables as computed by HXINFO/SFINFO)
(List of monsters sorted by pain chance: add intro)
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
  
 
==List of monsters sorted by pain chance==
 
==List of monsters sorted by pain chance==
 +
Besides monsters and other enemies in the four main [[Doom engine#As a game engine|Doom-engine]] games, these tables also list all other shootable objects.
 +
 
{{col-begin}}
 
{{col-begin}}
 
{{col-break|width=45%}}
 
{{col-break|width=45%}}
 
===Doom===
 
===Doom===
{| {{prettytable}}
+
{| {{prettySortable}}
! Monster || Pain Chance || Hit Points
+
! Monster || data-sort-type="number"|Pain Chance || Hit Points
 
|-
 
|-
 
| [[Commander Keen]] || 256 (100%) || 100
 
| [[Commander Keen]] || 256 (100%) || 100
Line 60: Line 62:
 
{{col-break}}
 
{{col-break}}
 
===Heretic===
 
===Heretic===
{| {{prettytable}}
+
{| {{prettySortable}}
! Monster || Pain Chance || Hit Points
+
! Monster || data-sort-type="number"|Pain Chance || Hit Points
 
|-
 
|-
 
| [[Pod]] || 255 (99.61%) || 45
 
| [[Pod]] || 255 (99.61%) || 45
Line 104: Line 106:
 
{{col-break|width=45%}}
 
{{col-break|width=45%}}
 
===Hexen===
 
===Hexen===
{| {{prettytable}}
+
{| {{prettySortable}}
!Monster || Pain Chance || Hit Points
+
!Monster || data-sort-type="number"|Pain Chance || Hit Points
 
|-
 
|-
 
|[[Mushroom]] || 255 (99.61%) || 30
 
|[[Mushroom]] || 255 (99.61%) || 30
Line 156: Line 158:
 
|-
 
|-
 
|[[Afrit]] || 1 (0.39%) || 80
 
|[[Afrit]] || 1 (0.39%) || 80
 +
|-
 +
|Destructible tree || 0 (0.00%) || 70
 +
|-
 +
|Suit of armor || 0 (0.00%) || 60
 +
|-
 +
|Sitting corpse || 0 (0.00%) || 30
 +
|-
 +
|Evergreen tree || 0 (0.00%) || 20
 +
|-
 +
|Shrub (large) || 0 (0.00%) || 20
 +
|-
 +
|Pot (medium) || 0 (0.00%) || 15
 +
|-
 +
|Pot (short) || 0 (0.00%) || 15
 +
|-
 +
|Pot (tall) || 0 (0.00%) || 15
 +
|-
 +
|Shrub (small) || 0 (0.00%) || 10
 
|}
 
|}
 
{{col-break}}
 
{{col-break}}
 +
 
===Strife===
 
===Strife===
{| {{prettytable}}
+
{| {{prettySortable}}
!Monster || Pain Chance || Hit Points
+
!Monster || data-sort-type="number"|Pain Chance || Hit Points
 
|-
 
|-
 
|Practice Target || 255 (99.61%) || 99999999
 
|Practice Target || 255 (99.61%) || 99999999

Revision as of 04:18, 8 March 2018

A monster's pain state is an action frame used for that monster when being momentarily stunned by a damaging attack. Each monster type has a different probability of suffering this effect when hurt. This probability is called the monster's pain chance (from DeHackEd). The monster, when in pain from being hit by a projectile or shot, clawed or bitten, or punched or chainsawed, halts its movement or attack and displays its pain state sprite frame while usually giving a cry of pain, and then continues moving or possibly retaliates against its attacker. The player's pain state includes a reddening effect of the screen, as well as the third-person view sprite frame.

Combat strategies

The chaingun is particularly useful against monsters with a high pain chance, as due to its rapid rate of fire each bullet causes the monster to cringe convulsively in pain. This is called "doing the chaingun cha-cha" in the original Doom manual. Monsters especially vulnerable to be stunned due to continuous damage are imps, demons, lost souls, cacodemons, pain elementals, mancubi, arachnotrons and revenants. Only lost souls and Commander Keens have a 100% pain chance.

For those monsters with a low pain chance, the shotguns or plasma guns are more effective. Pain stunning with the plasma gun is often exploited in the final battle with the Spiderdemon in Doom E3M8: Dis.

Technical

The pain chance is handled in P_DamageMobj() in p_inter.c. This is the generic "hurt something" code which is called for all damage events. On each call, the monster's pain chance is compared to a random number from 0 to 255. If this number is less than the monster's pain chance, then the monster goes into pain state. There are no situations in the game where multiple separate damage events are combined into one pain chance check. For example, for rocket splashes, P_RadiusAttack() from p_map.c calls P_DamageMobj individually for each splash it makes, and the direct hit is also a separate call. BFG tracers and shotgun pellets also call P_DamageMobj individually for each one, even if many hit one target. A straightforward consequence of this handling is that attacks with many individual components, like super shotgun hits or BFG tracers, are very likely to give a monster pain, because the pain chance check only needs to succeed for one component.

List of monsters sorted by pain chance

Besides monsters and other enemies in the four main Doom-engine games, these tables also list all other shootable objects.