the-infocom-files / zork2

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

Library book glitches #54

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

When you first enter the library, you see:

>SOUTH
This must have been a large library, probably for the royal family. All of the
shelves have been gnawed to pieces by unfriendly gnomes. To the north is an
exit.
A handsome book, bound in green leather, sits in the center of the room.
Right beside the purple book sits a white one.
Worn and battered in one corner of the room is a blue book.
Lying in the dust, and covered with mold, is a purple book.

The description of the white book obviously only works if the purple book is also in the room. So the game makes sure to clear the TOUCHBIT on the books if you do anything to them:

<ROUTINE RANDOM-BOOK ()
     <COND (<VERB? TAKE MOVE PUT>
        <FSET ,WHITE-BOOK ,TOUCHBIT>
        <FSET ,PURPLE-BOOK ,TOUCHBIT>
        <FSET ,GREEN-BOOK ,TOUCHBIT>
        <FSET ,BLUE-BOOK ,TOUCHBIT>
        <RFALSE>)>>

But, once again, implicit taking is our enemy:

>READ PURPLE BOOK
(Taken)
This book is written in a tongue with which I am unfamiliar. Assuming that one
can indeed tell a book by its cover, it is likely filled with purple prose, the
like of which is rarely seen outside the Great Underground Empire.
Opening the purple book reveals a Flathead stamp.

>LOOK
Library
This must have been a large library, probably for the royal family. All of the
shelves have been gnawed to pieces by unfriendly gnomes. To the north is an
exit.
A handsome book, bound in green leather, sits in the center of the room.
Right beside the purple book sits a white one.
Worn and battered in one corner of the room is a blue book.

So I guess we need to add "READ" to the verbs that RANDOM-BOOK looks at.

Bonus question: Since you can open the purple book and get the stamp without disturbing the TOUCHBIT on the books, is it also possible to return later with the wizard's wand and filch the purple book? I haven't gotten far enough to test yet. I do remember one of the ledges collapsing after you get the crown, but was it this one?

If filching is a problem, is it enough to check for the "ENCHANT" verb, and see if SPELL-USED is W?FILCH? Actually, the "float" and "fry" spells are worth testing as well.

eriktorbjorn commented 4 years ago

I've tried filching and frying the purple book. The white book still claims to be "right beside the purple book".

Floating the purple book is even better:

A handsome book, bound in green leather, sits in the center of the room.
Right beside the purple book sits a white one.
Worn and battered in one corner of the room is a blue book.
Lying in the dust, and covered with mold, is a purple book. (floating in midair)