the-infocom-files / hitchhiker

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

Repeair robot message never shown #16

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

As an optional puzzle, you can summon a repair robot to fix the electronic thumb. When you show him the guarantee, it's apparently to have two different possible messages: One for if you've already shown him the thumb, and once for if you haven't. See ENGINEER-F:

           (<AND <VERB? GIVE SHOW>
             <PRSO? ,GUARANTEE>>
        <COND (<NOT <FSET? ,THUMB ,MUNGEDBIT>>
               <PERFORM ,V?GIVE ,THUMB ,ENGINEER>
               <RTRUE>)>
        <FCLEAR ,THUMB ,MUNGEDBIT>
        <ENGINEER-LEAVE>
        <MOVE ,THUMB ,PROTAGONIST>
        <COND (<EQUAL? ,THUMB-SHOWN 0>
               <TELL
"The " D ,ENGINEER " looks quizzically at the " D ,GUARANTEE " and says it's
expired but he'll see what he can do. " ,FIDDLES "\"Can't promise anything.\"
He" ,ROARS-OFF "." CR>)
              (T
               <SETG THUMB-SHOWN 0>
               <TELL
"The " D, ENGINEER " looks at it sceptically. \"Guaranteed to work normally for
life,\" he mutters. \"Well, it's perfectly normal for a 13X to break down. And
this one's reached the end of its life anyway. But I'll see what I can do.\""
CR CR ,FIDDLES "\"Best I can do for a 13X on an expired " D ,GUARANTEE ",\" he
says. \"Can't promise anything.\" He" ,ROARS-OFF "." CR>)>)>>

The reason it doesn't work is that the ENGINEER-LEAVE routine resets THUMB-SHOWN to 0. So it should be called after the messages are printed, not before.

eriktorbjorn commented 4 years ago

By the way, for a while I thought I had found another typo but apparently "sceptically" is the UK spelling of "skeptically". Makes sense for this game.