the-infocom-files / cutthroats

Cutthroats
3 stars 3 forks source link

Custom message for "PUT GUNK IN TUBE" isn't shown #53

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

From GUNK-F:

           (<OR <AND <VERB? OIL>
             <EQUAL? ,PRSI ,PUTTY>>
            <AND <VERB? PUT>
             <EQUAL? ,PRSO ,PUTTY>>>
        <COND (<PRSI? ,TUBE>
               <TELL-YOU-CANT "reverse entropy.">)
              (T <TELL "It isn't a lubricant." CR>)>)>>

The purpose of this seems to be that "LUBRICATE ... WITH PUTTY" always prints "It isn't a lubricant." while "PUT PUTTY IN ..." should print "It isn't a lubricant." in most cases, but if you put it back into the tube it prints "You can't reverse entropy."

Except that doesn't happen:

>PUT GUNK IN TUBE
The tube refuses to accept anything.

That's because PRSI gets to handle the action first, and it gets caught by this in TUBE-F:

     <COND (<AND <VERB? PUT>
             <EQUAL? ,PRSI ,TUBE>>
        <TELL "The tube refuses to accept anything." CR>)

So if we want the entropy message, the special case should probably be in TUBE-F.