the-infocom-files / hitchhiker

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

TABLET-F clears TRYTAKEBIT on the toothbrush, but should it? #5

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

When you eat the buffered analgesic, TABLET-F clears TRYTAKEBIT on the toothbrush and the screwdriver:

<ROUTINE TABLET-F ()
     <COND (<VERB? EAT TAKE DRINK> ;"SWALLOW is synonym of DRINK"
        <MOVE ,TABLET ,LOCAL-GLOBALS>
        <FCLEAR ,SCREWDRIVER ,TRYTAKEBIT>
        <FCLEAR ,TOOTHBRUSH ,TRYTAKEBIT>
        <SETG HEADACHE <>>
        <SETG SCORE <+ ,SCORE 10>>
        <TELL
"You swallow the tablet. After a few seconds the room begins to calm
down and behave in an orderly manner. Your terrible headache goes." CR>)>>

I.e. they can now be picked up by implicit taking. But should it really do that to the toothbrush? The toothbrush already does it by itself:

<ROUTINE TOOTHBRUSH-F ()
     <COND (<AND <VERB? TAKE>
             <NOT <FSET? ,TOOTHBRUSH ,TOUCHBIT>>>
        <MOVE ,TOOTHBRUSH ,PROTAGONIST>
        <FSET ,TOOTHBRUSH ,TOUCHBIT>
        <FCLEAR ,TOOTHBRUSH ,TRYTAKEBIT>
        <TELL
"As you pick up the " D ,TOOTHBRUSH " a tree outside the window collapses.
There is no causal relationship between these two events.">
        <COND (<FSET? ,PHONE ,TOUCHBIT>
               <TWO-TREES>)>
        <CRLF>)>>

As it stands, you can do this:

>TAKE TOOTHBRUSH
You lunge for it, but the room spins nauseatingly away. The floor gives you a
light tap on the forehead.

>READ TOOTHBRUSH
How can you read a toothbrush?

>EAT ANALGESIC
You swallow the tablet. After a few seconds the room begins to calm down and
behave in an orderly manner. Your terrible headache goes.

>READ TOOTHBRUSH
(Taking the toothbrush first)
How can you read a toothbrush?

Which means that you never get the message about the oak tree collapsing. So the final message in RAMP-F no longer makes any sense:

                <V-SCORE>
                <TELL CR
"By the way, there WAS a causal relationship between your taking the "
D ,TOOTHBRUSH " and the tree collapsing at the very beginning of the game.
We apologise for this slight inaccuracy." CR>
                <FINISH>)>>