the-infocom-files / hitchhiker

The Hitchhiker’s Guide to the Galaxy
20 stars 4 forks source link

The sharp stone can be made "invisible" (oversight in STONE-F) #11

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

I can't get a short transcript of this, so I'll just explain. The sharp stone (in the Buggblatter Beast lair) actually has NDESCBIT and is described by OUTER-LAIR-F. Probably so that it will be described first, even after the beast is moved there:

<ROUTINE OUTER-LAIR-F (RARG)
     <COND (<EQUAL? .RARG ,M-LOOK>
        <TELL
"This is a large walled courtyard. Strewn about are a profusion of gnawed bones
bleaching in the sun. In case the significance of these fails to strike you,
there is also a " D ,MEMORIAL " in the middle of the courtyard, on which the
Beast has roughly carved the names of all its victims.">
        <COND (<IN? ,STONE ,HERE>
               <TELL CR
"Some " D ,STONE "s lie near the exit to the west.">)>
        <CRLF>)>>

The stone then reacts to being picked up and dropped:

<ROUTINE STONE-F ()
     <COND (<AND <VERB? TAKE>
             <FSET? ,STONE ,TRYTAKEBIT>>
        <FCLEAR ,STONE ,NDESCBIT>
        <FCLEAR ,STONE ,TRYTAKEBIT>
        <RFALSE>)
           (<AND <VERB? DROP>
             <EQUAL? ,HERE ,OUTER-LAIR>>
        <FSET ,STONE ,NDESCBIT>
        <FSET ,STONE ,TRYTAKEBIT>
        <RFALSE>)
           (<VERB? EXAMINE>
        <TELL "It's hard as a rock." CR>)>>

But DROP isn't the only action to move the stone to the room. You can also THROW it. And if you do that, the stone does not get its TRYTAKEBIT back. Now it can be picked up by implicit taking, e.g. "READ STONE".

It seems that Steve Meretzky thought of that, because there is a special case in PRINT-CONT for the stone and the lair:

            <COND (<AND <EQUAL? .Y ,STONE>
                    <EQUAL? ,HERE ,OUTER-LAIR>
                    <IN? .Y ,HERE>>
                   <FSET .Y ,NDESCBIT>)

So I'm not sure if the stone actually needs NDESCBIT, because as far as I can tell this means that DESCRIBE-OBJECT is never called for it in this room. Besides that, it does not give the rock TRYTAKEBIT again. So if you do something like this:

The stone is not shown, because it now has NDESCBIT. Suggested fixes: