the-infocom-files/hitchhiker

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

Opened this issue · 0 comments

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:

  • Pick up the stone in the lair. This removes its NDESCBIT and TRYTAKEBIT.
  • Throw the stone. This is like dropping, except the stone doesn't get its bits back.
  • Look. (Or "VERBOSE" if you want to save a turn). This is important, because it gives the stone back its NDESCBIT.
  • Implicitly pick up the stone, e.g. "READ STONE".
  • Go to another room and drop the stone.
  • Look.

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

  • Handle THROW in STONE-F, in addition to DROP.
  • If the special case in PRINT-CONT is still necessary, have it give the stone TRYTAKEBIT along with NDESCBIT.