enemies have stats, just like an ordinary player (in the game files, they are just an instance of the Player struct)
enemies can be fought when attempting to pass a door (but you need the key first)
by using the search command, you can check if a door is guarded by an enemy, or if it is locked
once you attempt to pass a door, you can't go back (if you die, all your stats are reset, but any items you used in the battle are not returned to you)