the-infocom-files/trinity

You can touch the umbrella while it's in the tree

Opened this issue · 1 comments

I might not have reported this if it wasn't that the game tries to handle it:

>EXAMINE UMBRELLA
The closed umbrella dangles in the tree overhead, high out of reach. Its handle
is carved in the shape of a parrot's head.

>TOUCH UMBRELLA
The umbrella is high out of reach.

>TOUCH UMBRELLA WITH COIN
You touch the seven-sided coin next to the umbrella, but nothing interesting
happens.

At first glance it looks like it should be handled by this bit in PARASOL-F:

	       (<IN? ,PRSO ,TREE>
		<COND (<AND <T? ,PRSI>
		     	    <VERB? HIT LOOSEN TAKE TAKE-WITH TOUCH
				   TOUCH-TO SHAKE>>
		       <NICE-TRY>
		       <RTRUE>)
		      (<INTBL? ,PRSA ,TOUCHVERBS ,NTOUCHES>
		       <CANT-REACH ,PARASOL>
		       <RTRUE>)>

However, "TOUCH object WITH object" is the V-STOUCH-TO action:

<SYNTAX TOUCH OBJECT = V-TOUCH>
<SYNTAX TOUCH OBJECT WITH OBJECT (HELD CARRIED HAVE) = V-STOUCH-TO>
<SYNTAX TOUCH OBJECT (HELD CARRIED HAVE) TO OBJECT = V-TOUCH-TO>
<VERB-SYNONYM TOUCH RUB DISTURB>

V-STOUCH-TO gets rerouted to V-TOUCH-TO like this:

<ROUTINE V-STOUCH-TO ()
	 <PERFORM ,V?TOUCH-TO ,PRSI ,PRSO>
	 <RTRUE>>

So by the time it reaches PARASOL-F the umbrella is PRSI. And this part of the code isn't reached when the umbrella is PRSI because it's handled under <THIS-PRSI?> earlier in the routine.

I was surprised to see that the umbrella is closed when it's in the tree - not how I always imagined it - but I guess it has to be. The wind carries you away with it if it's open.