the-infocom-files / hitchhiker

The Hitchhiker’s Guide to the Galaxy
21 stars 4 forks source link

If you die as Trillian while carrying the tweezers, they reappear in Arthur's inventory #41

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

Whenever you use the spare improbability drive, the game has to make sure objects that can appear both in The Heart of Gold and in the sub-area are handled correctly. Part of this is handled in the room you enter, part of it in JIGS-UP and part of it in LEAVE-DARK. (Possibly other places, I'm still in the process of testing this.)

With Trillian, it has to remember where the handbag and tweezers were so it can put them back. (It also remembers the handbag's open/closed status.)

If you die at the party without solving her puzzle, the tweezers are only moved back to their old location if they are still in the handbag. Which makes sense. If she lost the tweezers at the party, they won't be on the Heart of Gold later. (There is no such check for the handbag, but I guess she always remembers that.)

However, it only checks if the tweezers are in the handbag. Not if she's carrying them. And that leads to a slight bug:

When you return to the Heart of Gold as Arthur, you are now carrying the tweezers.

Perhaps instead of <IN? ,TWEEZERS ,HANDBAG>, JIGS-UP should check <HELD? ,TWEEZERS>?

eriktorbjorn commented 4 years ago

Or, if we still want to assume that Trillian loses the tweezers if they're not in the handbag, it should remove them. Not just leave them where they are. I.e. where JIGS-UP does this:

               <COND (<IN? ,TWEEZERS ,HANDBAG>
                  <MOVE ,TWEEZERS <GET ,PARTY-TABLE 1>>)>

It should move the tweezers to LOCAL-GLOBALS (which is where it the game seems to like to store "gone" objects) otherwise.