the-infocom-files / amfv

A Mind Forever Voyaging
5 stars 2 forks source link

Strange response to "PUT object ON BAR" #26

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>LOOK
Ezzi's Bar
This noisy lounge is a favorite hangout for students from the nearby college.
Battered wooden stools are the only seating. The only exit is south.

>PUT KEY ON BAR
That's easy for you to say since you don't even have the mug of beer.

If you do have the mug of beer, the game will respond with "Dropped." and drop the beer, not the key. Here's why:

BAR-OBJECT-F redirects the action to COUNTER:

           (<AND <VERB? PUT-ON>
             <PRSI? ,BAR-OBJECT>
             <EQUAL? ,HERE ,BURGER-MEISTER ,EZZIS-BAR ,BAR>>
        <PERFORM ,V?PUT-ON ,PRSO ,COUNTER>
        <RTRUE>)>>

And COUNTER-F assumes you're putting the beer on it:

              (<PRSI? ,COUNTER>
               <PERFORM ,V?DROP ,BEER>
               <RTRUE>)

Since COUNTER is a local global object, allowing the player to actually put objects on it just causes too many issues. But it should print a better failure message if PRSO is anything other than the beer. Perhaps by calling V-YELL.

eriktorbjorn commented 4 years ago

This case in COUNTER-F also means that it's unlikely (impossible?) that it will ever reach the final case:

     <COND (<VERB? PUT PUT-ON>
        <COND (<EQUAL? ,HERE ,KITCHEN>
               <TELL
"There's no room on the counter. Maybe you should try the table." CR>)
              (<PRSI? ,COUNTER>
               <PERFORM ,V?DROP ,BEER>
               <RTRUE>)
              (<NOT <EQUAL? ,HERE ,EPILOGUE-KITCHEN>>
               <PERFORM ,V?PUT ,PRSO ,GLOBAL-TABLE>
               <RTRUE>)>)>>

I think the purpose of the last case is so that the game warns you about leaving things on counters, except if it's the counter in your kitchen in the 2091 simulation. I have not been able to test that one, though.