checking if a player has visited every room in a region

How do you check to see if a player has visited every room in a region?

The code below doesn’t throw up any errors but doesn’t work either and the player doesn’t receive the message when all grottoes have been visited.

[code]Grottoes is a region.
Damp Grotto and Dank Grotto and Dripping Grotto and Flooded Grotto and Slimy Grotto are in Grottoes.

Spelunking is a scene.
Spelunking begins when player has been enclosed by every room in Grottoes.
When Spelunking begins: say “You’ve explored all the grottoes there are to discover now.”[/code]

Help appreciated, thank you.

Try: Spelunking begins when every room in Grottoes is visited.

That works, cheers!

I was trying to work the player into the coding as I’ve a wandering troglodyte and didn’t want it to print the message when the troglodyte had visited all the grottoes but that coding only relates to the player.

I believe the reason that your original code doesn’t work is that it tests to see whether the player has ever been enclosed by every grotto at once. (From 9.13 of the documentation: “the present perfect: ‘if X has been Y …’ is true if it has ever been the case that “X is Y” at the start of any turn (or any action).”) So it doesn’t act the way it would idiomatically act in English.

Is there any way to get tenses to accomplish something like what killgoblin wants to accomplish, or do we have to use flags like “visited”? Something like this will work:

Chairatorium is a room. A chair is a kind of supporter. A chair is enterable. A chair can be sat-on. A chair is usually not sat-on. The blue chair, the yellow chair, the red chair, and the green chair are chairs in chairatorium. Musical Chairs is a scene. Musical Chairs begins when every chair is sat-on. When Musical Chairs begins: say "Music begins to play." Every turn when the player is enclosed by a chair (called the seat): now the seat is sat-on.

but I had to set the “sat-on” flag myself, with the “every turn” rule. (I used “every turn” instead of “after entering” to cover hypothetical cases in which a different rule moves the player to the chair.) Is there a way to do this without setting a flag manually, if it’s not a case like Juhana’s, where the “visited” flag is automatically set?

[This post has been edited, because the first time it posted it didn’t actually include any of the stuff I wrote – automatic logout follies.]