Bones loading was only checking to see if a monster was marked extinct, it wasn't adding up the born count of a species in the current game with the number of that species on the bones level being loaded. That made it possible to exceed the correct number of nazgul and erinys via bones. This adds a common routine called propagate() that makemon() and restmonchn(ghostly) share, for incrementing the born count and checking for extinction, etc. When a bones level is loaded, restmonchn() will flag an illegal monster (duplicated unique, or too many of a species) by setting the individual monster's mhpmax to the cookie value DEFUNCT_MONSTER. Before getbones() finishes loading the bones level, it will purge those monsters from the chain.
9.4 KiB
9.4 KiB