the-infocom-files / zork2

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

Objects in the receptacle work a bit strange #49

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>PUT NEWSPAPER IN RECEPTACLE
Done.

>LOOK IN RECEPTACLE
The receptacle is empty.

>LIGHT MATCH
One of the matches start to burn.

>BURN NEWSPAPER WITH MATCH
The newspaper burns inside the receptacle.
The cloth bag inflates as it fills with hot air.
A small label drops from the bag into the basket.
The match has gone out.

>TAKE NEWSPAPER
You don't really want to hold a burning newspaper.

>POUR WATER ON NEWSPAPER
The newspaper is extinguished.

>TAKE NEWSPAPER
An interesting idea...

When putting objects in the receptacle, the object's NDESCBIT is cleared, so if we want "LOOK IN RECEPTACLE" to work, the receptacle probably has to handle that action by itself.

The BALLOON-BURN function clears both TAKEBIT and READBIT, probably to prevent both explicit and implicit taking of the object. Maybe that could be handled by a CONTFCN instead, similar to how the bucket does it? That way you shouldn't have to fiddle with the object's bits like that.

eriktorbjorn commented 4 years ago

Actually, a CONTFCN doesn't work since it doesn't cover implicit taking. So "READ NEWSPAPER" would still be able to take the burning newspaper. Even if you clear READBIT. See https://github.com/the-infocom-files/zork2/issues/50 for another example.

This seems like a shortcoming of CONTFCN to me.

eriktorbjorn commented 4 years ago

Also, if we don't clear TAKEBIT from the burning object, we probably open up to using the wizard's wand to filch or fry the object.