the-infocom-files/zork3

Most of the GUARDIANS action routine doesn't seem to be used

Opened this issue · 2 comments

The GUARDIANS routine is used as the action routine both for the GUARDIAN local global object and for the MRG, MRGE and MRGW rooms.

It checks the optional parameter RARG to see what it's currently used for.

  • M-LOOK is used for the three rooms, to print their room description.
  • M-ENTER is used to see if the guardians kill you when entering any of the rooms.

Here is the rest of the routine:

	       (<NOT <==? .RARG ,M-END>> <RFALSE>)
	       (<VERB? EXAMINE>
		<COND (<==? ,HERE ,IN-MIRROR>
		       <TELL "You can't see them from here." CR>)
		      (T <TELL
"The Guardians are quite impressive. I wouldn't get in their way if
I were you!" CR>)>)
	       (<AND <VERB? THROW> <==? ,PRSI ,GUARDIAN>>
		<COND (<EQUAL? ,PRSO ,ME>
		       <TELL "You step">)
		      (T
		       <TELL "The " D ,PRSO " falls">
		       <REMOVE ,PRSO>)>
		<TELL
" in front of the Guardians, who ">
		<COND (<EQUAL? ,PRSO ,ME>
		       <TELL "decimate you">)
		      (T <TELL "destroy it">)>
		<TELL " in perfect
unison. Satisfied, they resume their posts." CR>)
	       (<VERB? ATTACK>
	        <TELL
"You aren't close enough, and even if you were, the fight
would be a bit one-sided." CR>)
	       (<VERB? HELLO>
	        <TELL "The statues are impassive." CR>)>>

But this doesn't make sense to me. I thought rooms checked for actions when RARG was M-BEG, and when the action routine is used for the GUARDIAN object RARG is 0. And I guess that's why I couldn't trigger any of these responses.

Since the GUARDIAN is local global to all these rooms, I see no reason why the verbs have to be handled by the rooms at all. My instinct would be to break up GUARDIANS in two routines: One GUARDIAN-ROOM-F for the three rooms, and one GUARDIAN-F for the GUARDIAN object.

I haven't tried that, though.

If we do enable this code, as described above, there's this bug:

>THROW ME AT GUARDIANS
You step in front of the Guardians, who decimate you in perfect unison.
Satisfied, they resume their posts.

>THROW HANDS AT GUARDIANS
The pair of hands falls in front of the Guardians, who destroy it in perfect
unison. Satisfied, they resume their posts.

Seems I can trigger the messages while invisible, but the responses are strange, as noted above:

>KILL GUARDIANS
(with the sword)
You can't.
You aren't close enough, and even if you were, the fight would be a bit one-
sided.
One of the stone figures (or maybe both, it's hard to tell) suddenly springs to
life and crushes you with his stone bludgeon.

    ****  You have died  ****

I just don't know right now...