the-infocom-files / amfv

A Mind Forever Voyaging
5 stars 2 forks source link

"SEARCH BENCH" doesn't work as intended #12

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>LOOK
City Hall
The city's seat of government is an old concrete-slab building dating back to
the late twentieth century. The only exit is east.
A government official is sitting on a bench in the center of the lobby, eating a
snack.

>SEARCH BENCH
You'll have to open it first.

>SIT ON BENCH
You are now on the bench.

>SEARCH BENCH
It's empty (not counting you).
You find nothing unusual.

The first response is because BENCH has CONTBIT but not OPENBIT. I'm not sure if it should have OPENBIT or not, since the game doesn't seem to be entirely consistent about that.

The other (double) response is definitely because of a bug in V-SEARCH:

<ROUTINE V-SEARCH ()
     <COND (<FSET? ,PRSO ,ACTORBIT>
        <TELL "That wouldn't be polite." CR>
        <RTRUE>)
           (<FSET? ,PRSO ,CONTBIT>
        <COND (<PRSO? <LOC ,PLAYER>>
               <DESCRIBE-VEHICLE>)
              (<NOT <FSET? ,PRSO ,OPENBIT>>
               <TELL "You'll have to open it first." CR>
               <RTRUE>)
              (<AND <FIRST? ,PRSO>
                <NOT <FSET? <FIRST? ,PRSO> ,NDESCBIT>>>
               <PRINT-CONT ,PRSO>
               <RTRUE>)>)>
     <TELL "You find nothing unusual." CR>>

The player is inside BENCH, so it calls <DESCRIBE-VEHICLE>, but since it doesn't <RTRUE> there it continues to the "You find nothing unusal." message.

I think this can only happen to BENCH, because I couldn't find any other vehicle that was also a container.