the-infocom-files / zork2

Zork II: The Wizard of Frobozz
8 stars 4 forks source link

When putting an object in the keyhole, the object in the other keyhole disappears #43

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

From PKH-FCN:

            (<EQUAL? ,PRSO ,LETTER-OPENER ,KEY>
             <COND (<FIRST? <SET KH <PKH ,PRSI>>>
                <TELL
"There is a faint noise from behind the door and a small cloud of
dust rises from beneath it." CR>
                <SET OBJ <FIRST? .KH>>
                <REMOVE .OBJ>
                <COND (,MUD-FLAG
                       <SETG MATOBJ .OBJ>)>
                <RFALSE>)>)

This means that putting the letter opener or key in one keyhole will remove the object in the other keyhole. If the mat is under the door (MUD-FLAG), it is remembered so that you get it back when you take or pull the mat.

Normally this is ok, since the door is locked and you can't get to the other side until you've opened the door. But what if you solve the puzzle, and then do it again? Surely the key or letter opener shouldn't vanish into thin air then?

So perhaps change it so that the object is only removed if it lands on the mat, where you can later get it back. Otherwise, move it to <LOC .KH> instead?