the-infocom-files/zork1

The pot of gold appears at the foot of the rainbow, even if was already there

Opened this issue · 0 comments

>LOOK
End of Rainbow
You are on a small, rocky beach on the continuation of the Frigid River past the
Falls. The beach is narrow due to the presence of the White Cliffs. The river
canyon opens here and sunlight shines in from above. A rainbow crosses over the
falls to the east and a narrow path continues to the southwest.

>WAVE SCEPTRE
Suddenly, the rainbow appears to become solid and, I venture, walkable (I think
the giveaway was the stairs and bannister).
A shimmering pot of gold appears at the end of the rainbow.

>WAVE SCEPTRE
The rainbow seems to have become somewhat run-of-the-mill.

>LOOK
End of Rainbow
You are on a small, rocky beach on the continuation of the Frigid River past the
Falls. The beach is narrow due to the presence of the White Cliffs. The river
canyon opens here and sunlight shines in from above. A rainbow crosses over the
falls to the east and a narrow path continues to the southwest.
At the end of the rainbow is a pot of gold.

>WAVE SCEPTRE
Suddenly, the rainbow appears to become solid and, I venture, walkable (I think
the giveaway was the stairs and bannister).
A shimmering pot of gold appears at the end of the rainbow.

So the pot appears, even though it was already in the room.

I think that either the pot should vanish if you wave the sceptre again (unless it has been taken; check TOUCHBIT?), or the message should only appear if the pot was still invisible.

Though if we make the pot disappear, we have to invent a new message for that.

So here's what it the more complicated solution could look like:

	 <COND (<VERB? WAVE RAISE>
		<COND (<OR <EQUAL? ,HERE ,ARAGAIN-FALLS>
			   <EQUAL? ,HERE ,END-OF-RAINBOW>>
		       <COND (<NOT ,RAINBOW-FLAG>
			      <TELL
"Suddenly, the rainbow appears to become solid and, I venture,
walkable (I think the giveaway was the stairs and bannister)." CR>
			      <COND (<FSET? ,POT-OF-GOLD ,INVISIBLE>
				     <FCLEAR ,POT-OF-GOLD ,INVISIBLE>
				     <COND (<EQUAL? ,HERE, END-OF-RAINBOW>
					    <TELL
"A shimmering pot of gold appears at the end of the rainbow." CR>)>)>
			      <SETG RAINBOW-FLAG T>)
			     (T
			      <ROB ,ON-RAINBOW ,WALL>
			      <TELL
"The rainbow seems to have become somewhat run-of-the-mill." CR>
			      <COND (<NOT <FSET? ,POT-OF-GOLD ,TOUCHBIT>>
				     <FSET ,POT-OF-GOLD ,INVISIBLE>
				     <COND (<EQUAL? ,HERE ,END-OF-RAINBOW>
					    <TELL
"The pot of gold fades away." CR>)>)>
			      <SETG RAINBOW-FLAG <>>
			      <RTRUE>)>)