Test if `to decide if` phrase was true with past-tense verb?

I have a situation where the PC is searching for something that’s not present in the immediate area, but I want him to have to check every room before giving up. I can’t quite get the grammar to work:

Apartment is a region. Bedroom, Living Room, Hallway, and Kitchen are in Apartment.

Bedroom is east of Hallway. Living Room is south of Hallway. Kitchen is west of Living Room.

Front Porch is south of Living Room. The player is in Front Porch.

Five women and four men are in Living Room.

To decide if the apartment is thoroughly explored:
	if Bedroom is unvisited, no;
	if Living Room is unvisited, no;
	if Hallway is unvisited, no;
	if Kitchen is unvisited, no;
	yes.

The Party is a scene. The Party begins when the player is in Living Room for the first time.
When The Party begins:
	say "There's a bunch of glamorous-looking people here. Looks like it's time to find your roommate, say hello, and get a beer.".

Every turn during The Party:
	if the apartment is thoroughly explored:
		if the apartment was not thoroughly explored:
			say "Hmmmm, that's funny. You can't find your roommate anywhere.";
	continue the action.

Inform chokes on the phrase if the apartment was not thoroughly explored. (In this particular situation, it would be easy to just change it to something like if every room regionally in Apartment is visited, but in the larger situation I’m abstracting from, the test is substantially more complicated and I want to try to use the to decide if definition as written, if possible.)

Looking back at WI 9.13, “The Past and Perfect Tenses,” I realize that the conditions tested are simple relationships: “if the Sorting Hat is in the Hall,” “if the gate has been open,” etc.

What I really want is to test whether this is the turn on which the player’s action finally made the complex condition true. Is there an easy way to do so? I haven’t been able to come up with a phrasing that tests exactly that.

I don’t know the underlying reasons, but testing for the past tense seems to work if you exchange the To decide phrase for an (otherwise equivalent) “definition”, like this:

Definition: the apartment is thoroughly explored:
	if Bedroom is unvisited, no;
	if Living Room is unvisited, no;
	if Hallway is unvisited, no;
	if Kitchen is unvisited, no;
	yes.

An alternative way (which works with the original To decide phrase) would be to use a scene:

Absent Roommate is a scene.
Absent Roommate begins when the apartment is thoroughly explored.
When Absent Roommate begins:
	say "Hmmmm, that's funny. You can't find your roommate anywhere.";

Yet another alternative (though a bit inelegant) would be to use an additional global boolean variable which starts out false and is checked for and set to true in the every turn rule:

lost-roommate is a truth state that varies. lost-roommate is false.

Every turn during The Party:
	if lost-roommate is false:
		if the apartment is thoroughly explored:
			now lost-roommate is true;
			say "Hmmmm, that's funny. You can't find your roommate anywhere.";
1 Like

Excellent, thank you.

I was explicitly trying to avoid leaving a global variable used once to check one thing lying around for the entirety of a long game, and I’ve been trying to get myself to remember the differences between to decide and definition: phrases for a while now. I’d started writing a scene to track it when I saw your response, but just switching the to decide phrase to definition got me going again immedately.

Thanks again, St John!

1 Like

Just the one global can spare you the Every Turn rule altogether, though, and since it’s a region anyway, “every room in the apartment is visited” can work as your conditional without a definition or to-decide phrase.

Missing-roommate is initially false.
Report looking when missing-roommate is false and every room in the apartment is visited:
    say "Hmmmm, that's funny. You can't find your roommate anywhere.";
    Now missing-roommate is true.
1 Like

My silly brain kept working on this while I was out doing errands. If this is the real layout you’re going with and not just an example for your question, it will always be the case that “thoroughly explored” will be achieved either by entering the Bedroom or the Kitchen, and when either is the location you only need to check the other one to know whether the apartment is thoroughly explored. And assuming the roommate is a Person in the game, you can hang the flag on them instead of using a global. Hence:

The roommate is a person. The roommate can be noticed missing. 
The roommate is not noticed missing.

Report looking when the roommate is not noticed missing and the bedroom is visited and the kitchen is visited:
    say "Hmmmm, that's funny. You can't find your roommate anywhere.";
    now the roommate is noticed missing.
1 Like

You’re right, but the situation I’m writing in the larger piece is substantially more complex: “have we checked exhaustively” includes other actions besides just visiting selected rooms (there are also rooms in the apartment that aren’t yet accessible at this point in the game, so I’m also not willing to check every room in the region. The door to the absent roommate’s bedroom, for instance, is locked while he’s gone, but I’m separately tracking a KNOCK ON action to see if it’s happened yet, and also making sure there’s an obnoxious NPC demonstrating the knocking action right next to you on another door opening on another direction in the same room).

Similarly, the roommate eventually participates in a number of other interactions, so I’m hesitant to attach a property to him. (Although admittedly that is perhaps just me being precious about data purity.)

1 Like

I suspect it’s because the definition of a ‘To decide’ phrase is treated as an immutable pattern, so the ‘is’ in ‘the apartment is thoroughly explored’ is not treated as a verb that can have different tenses but just like any other word that’s part of the pattern-matching for the phrase- similarly ‘the apartment’ doesn’t represent the object ‘Apartment’ but is simply part of pattern-matching. Consequently, to do this with a ‘To decide…’ phrase you’d need to define a separate phrase using the past tense:

To decide if the apartment was thoroughly explored:
	if Bedroom was unvisited, no;
	if Living Room was unvisited, no;
	if Hallway was unvisited, no;
	if Kitchen was unvisited, no;
	yes.

Conversely, when making the ‘Definition…’ phrase, ‘the apartment’ is taken to refer to the object ‘Apartment’ , ‘is’ to be a verb, and ‘thoroughly explored’ to be an adjectival phrase applicable to to the object ‘Apartment’.

5 Likes