the-infocom-files / sorcerer

Sorcerer
3 stars 3 forks source link

"EXAMINE BED" prints no response if you're the only thing in it #9

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>LOOK
Your Quarters, in the bed
This is your chamber in the Hall of the Guild of Enchanters, with a doorway to
the west. A private chamber is a great privilege, especially for an Enchanter as
young as yourself, but how many Enchanters can say they defeated the infamous
Krill?

>EXAMINE BED

>PUT BOOK ON BED
Done.

>EXAMINE BED
Sitting on the bed is:
  a spell book

I'm guessing it has to do with the game trying to print what's inside the bed, and the only thing in it is the invisible PROTAGONIST object. (If so, this problem probably happens in other games as well.)

eriktorbjorn commented 4 years ago

The same thing happens with "LOOK IN BED", even though V-LOOK-INSIDE actually tries to work around that:

           (<FSET? ,PRSO ,CONTBIT>
        <COND (<EQUAL? ,PRSO <LOC ,PROTAGONIST>>
               <MOVE ,PROTAGONIST ,ROOMS>
               <COND (<FIRST? ,PRSO>
                  <PRINT-CONT ,PRSO>)
                 (T
                  <TELL "It's empty (not counting you)." CR>)>
               <MOVE ,PROTAGONIST ,PRSO>)

But while it works as intentional for things like the log boat, etc. it doesn't for the bed, because the bed has SURFACEBIT, and that's handled much earlier in V-LOOK-INSIDE.