the-infocom-files/zork2

Floating the collar should only affect Cerberus if he's wearing it

Opened this issue · 1 comments

>LOOK
Kennel
This room looks like it was once a kennel for a very large dog (some of the
bones would fit a dinosaur). It apparently hasn't been used for a long time, as
the dust is fairly thick all over. The only exit is northeast.
A gigantic dog collar, large enough for three rhinoceros-sized dogs, is lying
amidst the debris.

>WAVE WAND AT COLLAR
The wand grows warm, the gigantic dog collar seems to glow dimly with magical
essences, and you feel suffused with power.

>SAY "FLOAT"
The wand glows very brightly for a moment.
The huge dog rises about an inch off the ground, for a moment.

This is handled by COLLAR-FCN:

<ROUTINE COLLAR-FCN ()
	 <COND (<AND <VERB? TAKE> ,CERBERUS-LEASHED>
		<JIGS-UP
"That wasn't such a good idea. The creature was enjoying being your pet.
As you unfasten the collar, the disappointed monster hound begins to growl,
and then its three fang-crammed mouths rend you into little doggy biscuits.">)
	       (<AND <VERB? ENCHANT> <EQUAL? ,SPELL-USED ,W?FLOAT>>
		<PERFORM ,V?ENCHANT ,CERBERUS>
		<RTRUE>)>>

Everything here should check CERBERUS-LEASHED, not just the "TAKE" action.

There's also this case in zork-substrate's V-ENCHANT:

		      (<AND <EQUAL? ,SPELL-USED ,W?FLOAT>
			    <FSET? ,PRSO ,TAKEBIT>>
		       <COND (<AND <EQUAL? ,SPELL-VICTIM ,COLLAR>
				   <IN? ,COLLAR ,CERBERUS>>
			      <SETG SPELL-VICTIM ,CERBERUS>)>
		       <TELL
"The " D ,PRSO " floats serenely in midair." CR>)

Not sure what the point is there.