If there's some reason the player needs to be at a specific place and time, we might want to allow him to wait a number of minutes at once.
"Nine AM Appointment"
Waiting more is an action applying to one number.
Understand "wait [a time period]" or "wait for [a time period]" or "wait for a/an [a time period]" or "wait a/an [a time period]" as waiting more.
Carry out waiting more:
let the target time be the time of day plus the time understood;
decrease the target time by one minute;
while the time of day is not the target time:
follow the turn sequence rules.
The one nuance here is that after our wait command occurs, the turn sequence rules will occur one more time. So we need to subtract one minute from the parsed time to make the turn end on the desired number of minutes.
Report waiting more:
say "It is now [time of day + 1 minute]."
And if we want to ensure that the player doesn't (accidentally or intentionally) put the interpreter through a really long loop, we could put an upper limit on his patience:
Check waiting more:
if the time understood is greater than one hour, say "You really haven't got that kind of patience." instead.
The Specialist's Office is a room. The secretary is a woman in the Office. Instead of asking the secretary about "[appointment]", say "'Hang on just five more minutes,' she says, in a distracted manner."
Understand "appointment" or "specialist" or "doctor" as "[appointment]".
At 9:45 AM: say "At [the time of day in words], secretary glances at you and gives a reassuring smile."
Test me with "ask secretary about appointment / wait five minutes / g / g / wait 61 minutes / wait for half an hour / wait for a quarter of an hour / wait for an hour".
Suppose we want to allow the player to go to sleep some of the time:
"Change of Basis"
A person is either awake or asleep. A person is usually awake.
The important thing to note here is that it does not work to say "the player is either asleep or awake". This is because the player is not necessarily one specific person or thing during the game: the identity of the player can be changed, as we will see later.
So if we want to make rules about the properties of the player, we should attach these rules to the "person" kind.
Linear Algebra Class is a room. "The blackboard is covered with square arrangements of numbers. These are supposed to convey something to you, but mostly you're finding them soporific."
Now a few rules about changing from one state to the other:
Instead of sleeping: now the player is asleep; say "You drop off."
Instead of doing something other than waking up, waiting or sleeping when the player is asleep:
say "Ssh! You're sleeping!"
Instead of sleeping when the player is asleep:
say "Zzzz."
Instead of waking up when the player is asleep:
now the player is awake;
say "You come to suddenly, wiping drool from your lips."
Instead of doing something other than looking or sleeping when the player is awake:
say "You'd really rather just sleep through this."
Test me with "wake up / sleep / look / z / sleep / wake up / look".
"Delayed Gratification"
Hanging around until is an action applying to one time.
Check hanging around until:
if the time of day is the time understood, say "It is [time understood] now!" instead;
if the time of day is after the time understood, say "It is too late for that now." instead.
Carry out hanging around until:
while the time of day is before the time understood:
follow the turn sequence rules.
Report hanging around until:
say "You yawn until [time understood]."
Understand "wait until [time]" as hanging around until.
The Empty Field is a room. "It's an ordinary empty field. Nothing to see here at all-- yet. Wait until 11:45 PM, though."
At 11:45 PM:
say "Suddenly the air is filled with light and the sounds of an approaching band. Over the crest of the hill comes a parade of singing, stomping, hooting people: and not just people, but dogs, horses, elephants, giraffes... There are banners, and candles, and a flag that glows eerie-green in the dark; there is a float shaped like an enormous turtle, its shell covered with winking green lights; there is an old man dressed as a skeleton, carried in a litter, his neck garlanded with dried chiles. There are small girls throwing rose petals from a basket, and grown women half-naked carrying the emblems of Bacchic revelry, and two little boys each with a silver basin of clear water. All these go by in procession, and you join on at the end.";
end the story finally.
Test me with "look / z / z / wait until 11:45 PM".