Lost soul limit

To prevent overloading the engine with lost souls, a hard-coded lost soul limit was added which prevents pain elementals from spawning them if there are already 21 lost souls in the level. Because pain elementals have no other attacks, this has the side effect of rendering them helpless when the limit is reached. A pain elemental will still attempt to attack the player, and will follow the typical attack animation, but no lost soul will emerge from its mouth and none will appear upon its death.

The best-known example is probably MAP09: The Pit of Doom II. Pain elementals inhabit the first few rooms, but they are unable to fight on "Ultra-Violence" or "Nightmare!" due to the limit already being exceeded by emplacements of lost souls elsewhere.

This limit is removed in some source ports, although others have made it optional because:
 * On maps where pain elementals are numerous or difficult to reach, or when playing with fast monsters, entire rooms can easily become filled with lost souls, destroying play balance.
 * A few levels exploit the limit as a special effect (see below).
 * Older computers, at least at the time, could have performance issues with large numbers of monsters.

Hell Revealed's MAP19: Everything Dies purposely uses the lost soul limit to create a trap at the beginning of the level. The player starts inside a room with a megasphere in the middle, and four pain elementals rendered harmless by the presence of three dozen lost souls in an inaccessible room. Grabbing the megasphere, however, will cause all of the lost souls to be crushed, abruptly allowing the pain elementals to attack.