Problem with enemy

Hello everyone, I want to make the next puzzle in Inform 7:

Player must enter to a room, but there’s an enemy there. If player doesn’t attack the enemy, the enemy kills him and the game finishes.

Section 9.4 of Writing with Inform talks about ending the story. Something like this might work, though it’s quite bare-bones:

A monster is a kind of person.  A monster can be alive or dead.  A monster is usually alive.

The Start is east of the Dungeon. The Dungeon is a room.  The Jabberwock is a monster in the dungeon.

Instead of attacking the Jabberwock:
	Say "You slay the Jabberwock -- O frabjous day!";
	Now the Jabberwock is dead.

Instead of doing something other than attacking when the Jabberwock is visible and the Jabberwock is alive:
	Say "Oh no the monster kills you.";
	End the story saying "You were delicious."
1 Like

Thank you so much!