A room has a number called grue counter. The grue counter of a room is usually 0.
A room can be grue infested. A room is usually not grue infested.
Every turn while the player is in a grue infested room:
Increase the grue counter of the location by one.
The dungeon is a room. "You stand in a basic medieval dungeon." The dungeon is grue infested.
The first time the player enters the dungeon:
try looking;
say "It is dark. You are likely to be eaten by a grue."
Grue lunch is a scene. Grue lunch begins when the grue counter of the dungeon is greater than 10.
When grue lunch begins:
say "A large, smelly, foul tempered creature resembling a cross between a troll and an orc lumbers out from one of the open passageways. It sniffs the air, catches your scent, and looses a mighty roar! Before you are able to do anything else, it quickly lunges forward, chomping down on your head with a sickening [bold type]*crunch*" ;
end the story saying "You have been eaten by a grue."
This is the actual syntax, and it is surprisingly readable. Getting used to what the parser wants you to say can be tricky sometimes - just because the language is english like doesn't mean you can write your code in completely free-form english, but it's damn close!Once you've gotten your head around a few of the foibles, it's a lot less like writing a program and a lot more like just writing a book. In any case, agreed heartily with parent, it's a lot of fun to play around with!