the-infocom-files / zork1

Zork I: The Great Underground Empire
11 stars 3 forks source link

The game doesn't always tell if the thief leaves with your last light source #68

Open eriktorbjorn opened 5 years ago

eriktorbjorn commented 5 years ago

Usually, if the thief steals your torch you can see something like this:

>WAIT
Time passes...
A seedy-looking individual with a large bag just wandered through the room. On
the way through, he quietly abstracted some valuables from your possession,
mumbling something about "Doing unto others before..."
The thief seems to have left you in the dark.

But if you gave the thief the torch and he walks away with it, you don't get any message about the room turning dark.

>LOOK
Round Room
This is a circular stone room with passages in all directions. Several of them
have unfortunately been blocked by cave-ins.
There is a suspicious-looking individual, holding a large bag, leaning against
one wall. He is armed with a deadly stiletto.
The thief is holding:
  A torch (providing light)
The thief just left, still carrying his large bag. You may not have noticed that
he robbed you blind first.

Or like this:

>LOOK
Round Room
This is a circular stone room with passages in all directions. Several of them
have unfortunately been blocked by cave-ins.
There is a suspicious-looking individual, holding a large bag, leaning against
one wall. He is armed with a deadly stiletto.
The thief is holding:
  A torch (providing light)
  A sword
The thief, finding nothing of value, left disgusted.

In the first of those buggy cases, the game does call STOLE-LIGHT?. I haven't checked why this doesn't work, but I'm guessing that the room didn't actually turn dark yet. Usually, the ROB routine makes any object the thief steals invisible. This works fine because the thief always leaves right after.

But when he leaves, I think he usually (always?) actually only turns invisible. And since he's still carrying a visible torch, it's maybe keeping the room illuminated. A bug in the world model? Or are there cases where you'd want that to work?

When I was trying to fix up the old version of Mini-Zork I, I managed to get around this by having the thief's inventory turn invisible (except for the bag and the stiletto) when he leaves.

In the second buggy case, it doesn't call STOLE-LIGHT? because whoever wrote the code didn't consider that he could be carrying your torch anyway. So that may have to be fixed, as well.

Note that there are several other cases in THIEF-VS-ADVENTURER that may need the same fixes, if it's deemed worth fixing.