the-infocom-files / witness

The Witness
3 stars 4 forks source link

You can ask people for cigarettes and drinks even when they're not there (or dead) #34

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

I got this from Nathan Simpson's bugs list.

>TALK TO PHONG
You can't speak to someone who isn't here.

>ASK PHONG FOR CIGARETTE
"I think we both need one." And so you both have one.

>ASK PHONG FOR DRINK
"I think we both need one."  And so you both have one.

It's because of a logic error in CIGARETTE-F:

       (<OR <AND <VERB? GIVE TURN> <IOBJ? PLAYER> <NOT <==? ,WINNER ,PLAYER>>>
        <AND <VERB? SGIVE>     <DOBJ? PLAYER> <NOT <==? ,WINNER ,PLAYER>>>
        <AND <VERB? ASK-FOR> <FSET? ,PRSO ,PERSON>>
        <AND <VERB? TAKE>
         <OR <FIND-FLAG ,HERE ,PERSON ,WINNER> ;<NOT ,PRSI>
             <FSET? ,PRSI ,PERSON>>>>
    <TELL
"\"I think we both need one.\" And so you both have one." CR>)>>

I think that in the ASK-FOR case, it will end up asking the global version of the person for a drink, but it won't check if that person is present. (Or, in the case of Mr. Linder, even alive.)

And also in SEEKING-DRINK?:

<ROUTINE SEEKING-DRINK? ()
 <COND (<VERB? GIVE>
    <COND (<AND <IOBJ? PLAYER> <NOT <==? ,WINNER ,PLAYER>>>
           <RTRUE>)>)
       (<VERB? SGIVE>
    <COND (<AND <DOBJ? PLAYER> <NOT <==? ,WINNER ,PLAYER>>>
           <RTRUE>)>)
       (<VERB? ASK-FOR>
    <COND (<FSET? ,PRSO ,PERSON>
           <RTRUE>)>)
       (<VERB? TAKE>
    <COND (<FIND-FLAG ,HERE ,PERSON>
           <RTRUE>)
          (<AND ,PRSI <FSET? ,PRSI ,PERSON>>
           <RTRUE>)>)>>