Kill percentage flag used for -nomonsters and respawning

In the Doom source, the MF_COUNTKILL flag (used to calculate how many monsters are in a level, for the kill percentage) is also used to determine which monsters are hidden with the -nomonsters command line argument, and which monsters will respawn on nightmare mode. This has some unexpected consequences.

Some of the consequences of overusing this flag are:

Lost Souls
The lost soul monster had this flag removed in later versions, most likely to prevent overinflation of the kill percentage as was common in earlier versions on maps with one or more pain elementals in Doom 2. As a consequence, lost souls do not respawn.

However, they are hidden with -nomonsters, due to a specific hack in P_MOBJ.C : // don't spawn any monsters if -nomonsters if (nomonsters       && ( i == MT_SKULL || (mobjinfo[i].flags & MF_COUNTKILL)) ) {       return; }

Commander Keen
The Commander Keen object, which only appears in Vanilla Doom on MAP32: Grosse (Doom II), is tagged with MF_COUNTKILL. Deathmatching with the -nomonsters causes Keen not to appear. Because killing the four Keens is needed to expose the end to the level (via Tag 666), Grosse cannot be exited when using -nomonsters, unless one is also using the -timer command.

Dead Simple
MAP07: Dead Simple (Doom II) has monsters that must be killed to access the exit, but has another exit that is only reachable via a deathmatch spawnspot, so can be exited. In addition, the normal exit can be accessed by rocket jumping.