the-infocom-files / leathergoddesses

Leather Goddesses of Phobos
4 stars 3 forks source link

Failing to take the trellis will still ruin the trap #68

Open eriktorbjorn opened 3 years ago

eriktorbjorn commented 3 years ago
>LOOK
Fork, Of Sorts
   This jungle path once split here, went around a mighty tree, and rejoined off
to the east. Now, it splits here, goes around a whole bunch of leaves, and
rejoins off to the east.
   The edge of a trellis is just visible under a whole bunch of leaves.
   Trent is here, counting on his fingers and mumbling to himself.

>TAKE TRELLIS
You're already juggling as many items as you could possibly carry.

>LOOK
Fork, Of Sorts
   This jungle path once split here, went around a mighty tree, and rejoined off
to the east. Now, it splits here, goes around a mighty hole, and rejoins off to
the east.
   Trent is here, doing some quick limbering exercises.
   You can see a trellis here. Sitting on the trellis is a whole bunch of
leaves.

Notice how the room's description changed from "goes around a whole bunch of leaves" to "goes around a mighty hole". That means the trellis is no longer covering the hole, and the flytrap won't fall into it.

This is handled by TRELLIS-F:

           (<AND <VERB? TAKE>
             <FSET? ,TRELLIS ,TRYTAKEBIT>
             <NOT <UNTOUCHABLE? ,TRELLIS>>>
        <UNDO-TRAP>
        <RFALSE>)

In at least some other cases where the game checks if you're about to pick up an object, it checks how many other objects you are carrying at the moment. E.g. this bit in MOUSE-F:

           (<AND <VERB? TAKE>
             <NOT <FSET? ,MOUSE ,MUNGBIT>>
             <L? <CCOUNT ,PROTAGONIST> 11>>
        <FSET ,MOUSE ,MUNGBIT>
        <INCREMENT-SCORE 14 9 T>
        <RFALSE>)

I think it would make sense to add <L? <CCOUNT ,PROTAGONIST> 11> to TRELLIS-F as well.

eriktorbjorn commented 3 years ago

The trellis also has TRYTAKEBIT when you first find it in Cleveland. The game uses UNDO-TRAP for more than just the trap. That is, of course, much less serious. I'm just mentioning that fixing this will fix both these cases.