the-infocom-files / suspect

Suspect
3 stars 2 forks source link

PLAYER-BEEN-TO-OFFICE? isn't set in superbrief mode #16

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

In superbrief mode DESCRIBE-ROOM does not call the room's action routine with the M-LOOK parameter. Therefore it's probably a bad idea to have any kind of side effects in such code. But OFFICE-F does:

    <COND (<==? .RARG ,M-LOOK>
           <SETG PLAYER-BEEN-TO-OFFICE? T>
           <TELL
"This is the farm's office. There are filing cabinets, a large and a
small desk, a personal computer, a telephone, a copier, and other expected
office

It would probably be better to set that flag in the M-ENTER case, even if it's likely that the player types "LOOK" at some point during his stay.

Since I've seen this kind of bug in a few other games now. Maybe no one ever uses superbrief mode?

eriktorbjorn commented 4 years ago

Interestingly, Zork II has a special case for avoiding this kind of bug when entering the final room of the game.

eriktorbjorn commented 4 years ago

Mind you, the effect of not setting PLAYER-BEEN-TO-OFFCE? is fairly small as far as the game goes. (Though if something like it happened to me in real life, it would be a pretty big deal.) It's tested in PLAYER-ARRESTED?:

                <TELL " escorts you out to the waiting police car.
All your protests are ignored.|
|
In the subsequent trial, you are ">
                <COND (<OR ,PLAYER-FOLLOWED-VERONICA?
                           ,PLAYER-BEEN-TO-OFFICE?>
                       <TELL
"convicted of second degree murder. There was damning evidence, such as">)
                      (T
                       <TELL
"acquitted, in spite of">)>
                <TELL " the fact that">