Sure, here's a basic example of a text-based game written in a single HTML file using JavaScript. The game is called "The Enigmatic Puzzles". Please note that this is a simplified version and may not have all the features you mentioned.
The Enigmatic Puzzles