the-infocom-files / witness

The Witness
3 stars 4 forks source link

You can knock on the front door from other rooms than the front porch and the entry #38

Open eriktorbjorn opened 5 years ago

eriktorbjorn commented 5 years ago

FRONT-DOOR is local global not just to FRONT-PORCH and ENTRY, but also to FRONT-YARD, DRIVEWAY and DRIVEWAY-ENTRANCE.

I first thought this was a bug (I had only noticed it in one of the rooms), but later realized that it was so that you can "GO TO FRONT DOOR". However, it also means that you can interact with the door in other ways, like knocking on it.

FRONT-DOOR-F does try to fix this, but only does so before you've first entered the house:

<ROUTINE FRONT-DOOR-F ("AUX" (VAL <>))
    <COND (<VERB? KNOCK>
           <COND (<AND <==? ,PRSO ,FRONT-DOOR>
               <NOT ,WELCOMED>
               <FSET? ,CORPSE ,INVISIBLE>>
              <COND (<==? ,HERE ,FRONT-PORCH> <WELCOME>)
                (T <TELL "You can't reach the front door."CR>)>)
             (<INHABITED? <DOOR-ROOM ,HERE ,FRONT-DOOR>>
              <TELL "A muffled voice says, \"Come in!\"" CR>)
             (T
              <TELL "There is no answer at the door." CR>)>)
          (<VERB? WALK-TO>
           <COND (<EQUAL? ,HERE ,DRIVEWAY-ENTRANCE ,GARAGE>
              <SET VAL T> <GOTO ,DRIVEWAY>)>
           <COND (<EQUAL? ,HERE ,DRIVEWAY ,FRONT-YARD>
              <SET VAL T> <GOTO ,FRONT-PORCH>)>
           .VAL)>>

This isn't just a cosmetic problem, knocking on the door from, say, the driveway entrance will trigger a "@get_child called with object 0" Frotz error. Probably because DOOR-ROOM can't find the other side of the door.