the-infocom-files / ballyhoo

Ballyhoo
5 stars 4 forks source link

AWAITING-REPLY isn't always cleared after the did not / did so puzzle #17

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

There is a somewhat cartoonish "puzzle" where you ask the guard about the missing girl. He will insist that you already asked, like so:

>ASK THE GUARD ABOUT THE GIRL
"But you already asked me about her, right?"

>DID NOT
"Of course you did now, didn't you?"

>DID NOT
"Did so."

>DID SO
"Did not ... Er, um ... Well, I guess I didn't answer that question before. All
I can say is that I haven't seen the kid all evening."

The way this is implemented, when you ask the guard about the girl it will set AWAITING-REPLY to 6 and start the I-DID timer. Usually AWAITING-REPLY is cleared by I-REPLY, but this scene is one of the exceptions. The timer keeps running until either:

So there are two problems I can see here:

The AWAITING-REPLY reply flag is not cleared when you solve the puzzle. The timer isn't even stopped, though it will be stopped by I-DID as soon as you use another action than YES or NO. Like this:

>DID SO
"Did not ... Er, um ... Well, I guess I didn't answer that question before. All
I can say is that I haven't seen the kid all evening."

>DID NOT
"Did so."

>JUMP
Your feet barely leave the ground.

>DID NOT
You sound rather negative.

But if you agree too soon, the timer is stopped and AWAITING-REPLY isn't cleared. So now there's nothing to clear that flag until you trigger some other event in the game that uses the flag. So now the guard will answer even if you're no longer in the same room:

>ASK THE GUARD ABOUT GIRL
"But you already asked me about her, right?"

>YES
"Thought you'd see it my way."

>EAST
Near White Wagon
You are standing on a gentle upslope of the grassy field, next to a rather
imposing trailer whose door is closed to the east. In dark panorama, the field
continues north and west -- and south, where a large banner has been erected.

Part of a narrow pole is sticking out from under the wagon.

>NO
"Of course you did now, didn't you?"

A trivial change to V-YES should take care of both. This is what the code looks like now:

           (<EQUAL? ,AWAITING-REPLY 6>
        <COND (<NOT <EQUAL? ,DID-C 0>>
               <FSET ,PROTAGONIST ,RMUNGBIT>
               <TELL 
"\"Did not ... Er, um ... Well, I guess I didn't answer that question
before. All I can say is that I haven't seen the kid all evening.\"" CR>)
              (T
               <TELL "\"Thought you'd see it my way.\"" CR>
               <SETG DID-C 0>
               <DISABLE <INT I-DID>>)>)