Sure! Here's a simple text-based game inspired by Undertale that can be played as a finished game using JavaScript in a single HTML file:
Welcome to Undertale Game
(Instructions: Tap/click on the pictograms to interact!)
In this game, the player wakes up in a mysterious underground world and encounters a monster. The player can choose to attack or flee. The damage inflicted during the attack is calculated randomly, and the game ends if the player's HP reaches zero. Otherwise, the game continues with different dialogues based on the player's actions.
Please note that this is a basic implementation and can be further expanded to include more features, graphics, and gameplay elements.