the-infocom-files / enchanter

Enchanter
8 stars 3 forks source link

The message for "LOOK IN EGG" when it's empty is never printed #21

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

EGG-F contains this case:

           (<AND <VERB? LOOK-INSIDE>
             <FSET? ,PRSO ,OPENBIT>
             <NOT <FIRST? ,PRSO>>>
        <TELL
"On the inside of the egg are many complex cutting devices." CR>)

But it doesn't work as was probably intended:

>LOOK IN EGG
The beautiful, ornamented egg contains:
  A shredded scroll

>TAKE SHREDDED SCROLL
Taken.

>LOOK IN EGG
The beautiful, ornamented egg is empty.

So why doesn't it work? Easy, it's because the individual parts of the egg are also inside it. So, abusing https://github.com/the-infocom-files/enchanter/issues/20, we see:

>DROP HANDLE, KNOB, SLIDE, CRANK AND BUTTON
lapis handle: Dropped.
emerald knob: Dropped.
silver slide: Dropped.
golden crank: Dropped.
diamond-studded button: Dropped.

>LOOK IN EGG
On the inside of the egg are many complex cutting devices.

Since you can't put anything back into the egg ("You can't put the object inside the egg without damaging it."), it should be enough to check if the shredded scroll is inside instead of checking if the egg is empty.