So the code that keeps creatures the "first, second, etc" in the room seems to work great as long as the creatures are able to engage you.
When it works:
> assess
You assess your combat situation...
You (solidly balanced) are facing a croff pothanit (2) at melee range.
A striped badger (1: solidly balanced) is moving behind you at missile range.
A croff pothanit (1: solidly balanced) is moving to flank you at missile range.
A croff pothanit (2: solidly balanced) is facing you at melee range.
(You are also defending against a croff pothanit.)
>
A croff pothanit trots into view.
> assess
You assess your combat situation...
You (solidly balanced) are facing a croff pothanit (3) at melee range.
A striped badger (1: solidly balanced) is moving behind you at pole weapon range.
A croff pothanit (2: solidly balanced) is moving to flank you at pole weapon range.
A croff pothanit (3: solidly balanced) is facing you at melee range.
(You are also defending against a croff pothanit.)
When it doesn't work:
> ass
You assess your combat situation...
You (solidly balanced) are facing a striped badger (1) at melee range.
A croff pothanit (1: off balance) is behind you at melee range.
A striped badger (1: somewhat off balance) is facing you at melee range.
A striped badger (2: badly balanced) is behind you at melee range.
A croff pothanit (2: off balance) is flanking you at melee range.
(You are also defending against a croff pothanit.)
>
A croff pothanit trots into view.
> ass
You assess your combat situation...
You (solidly balanced) are facing a striped badger (1) at melee range.
A croff pothanit (2: off balance) is behind you at melee range.
A striped badger (1: solidly balanced) is facing you at melee range.
A striped badger (2: badly balanced) is behind you at melee range.
A croff pothanit (3: slightly off balance) is flanking you at melee range.
(You are also defending against a croff pothanit.)
>
A striped badger waddles into view.
> ass
You assess your combat situation...
You (solidly balanced) are facing a striped badger (2) at melee range.
A croff pothanit (2: badly balanced) is behind you at melee range.
A striped badger (2: solidly balanced) is facing you at melee range.
A striped badger (3: very badly balanced) is behind you at melee range.
A croff pothanit (3: slightly off balance) is flanking you at melee range.
(You are also defending against a croff pothanit.)