the-infocom-files / amfv

A Mind Forever Voyaging
5 stars 2 forks source link

"FOLLOW ORDERLY" doesn't always work after being led out of the hospital #88

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>LOOK
Hospital
Rockvil General Hospital is an old but prestigious facility. A nurse sits at the
admitting desk. The exit is northeast, and a hallway leads southwest to the
annex.

>NURSE, HELLO
"Can I help you?"

>NO
The nurse replies, "Well, then, there's no loitering here." She summons an
orderly to escort you away.

Elm & Kennedy
This is an intersection with streets heading in the four cardinal directions.
There is a park entrance on the northwest corner and a hospital on the southwest
corner. To the southeast lies a shopping mall, and a large, old building with an
impressive facade can be entered to the northeast.
The orderly releases you and reenters the hospital.

>FOLLOW ORDERLY
Hospital
Rockvil General Hospital is an old but prestigious facility. A nurse sits at the
admitting desk. The exit is northeast, and a hallway leads southwest to the
annex.

>NURSE, HELLO
"Can I help you?"

>YES
A few quick questions by the nurse reveal that you need no hospital attention.
She tells you so, and summons an orderly to lead you out.

Elm & Kennedy
This is an intersection with streets heading in the four cardinal directions.
There is a park entrance on the northwest corner and a hospital on the southwest
corner. To the southeast lies a shopping mall, and a large, old building with an
impressive facade can be entered to the northeast.
The orderly returns to the hospital.

>FOLLOW ORDERLY
You have no idea where the orderly is.

The game handles following by setting FOLLOW-FLAG and setting up a call to I-UNFOLLOW to clear the flag on the next move. Here's how V-NO (which works) handles it:

           (<EQUAL? ,YES-NO-FLAG 12>
        <COND (<EQUAL? ,HERE ,HOSPITAL>
               <TELL
"The nurse replies, \"Well, then, there's no loitering here.\" She summons
an orderly to escort you away." CR CR>
               <GOTO ,ELM-AND-KENNEDY>
               <SETG FOLLOW-FLAG 13>
               <QUEUE I-UNFOLLOW <+ ,ELAPSED-TIME 2>>
               <PUTP ,SPEAR-CARRIER ,P?SDESC "orderly">
               <TELL
"The orderly releases you and reenters the hospital." CR>)

And here's how V-YES (which doesn't work) handles it:

           (<EQUAL? ,YES-NO-FLAG 12>
        <COND (<EQUAL? ,HERE ,HOSPITAL>
               <TELL
"A few quick questions by the nurse reveal that you need no hospital
attention. She tells you so, ">
               <COND (<EQUAL? ,SYEAR 2061 2071>
                      <TELL
"adding haughtily that you couldn't afford their services anyway, ">)>
               <TELL "and summons an orderly to lead you out." CR CR>
               <SETG FOLLOW-FLAG 13>
               <QUEUE I-UNFOLLOW <+ ,ELAPSED-TIME 2>>
               <PUTP ,SPEAR-CARRIER ,P?SDESC "orderly">
               <GOTO ,ELM-AND-KENNEDY>
               <TELL "The orderly returns to the hospital." CR>)

The problem seems to be that in V-YES it sets up the timer before calling GOTO (which sets ELAPSED-TIME to 5). Moving the GOTO to before the timer is set up seems to fix it.