the-infocom-files / ballyhoo

Ballyhoo
5 stars 4 forks source link

GEN-LINE-F should probably check for LEAVE #77

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

Generic routines are used to help the parser decide which object it should use if the player types something ambiguous. Once such routine is GEN-LINE-F, which has this case:

     <COND (<AND <VERB? DISEMBARK EXIT>
             <EQUAL? <LOC ,PROTAGONIST> ,LONG ,SHORT>>
        <LOC ,PROTAGONIST>)

This means that "EXIT LINE" will default to the line you are currently in:

>EXAMINE LINE
[Which line do you mean, the short line or the long line?]

>LONG LINE
You see nothing unusual about the long line.

>EXIT LINE
You get out of the long line.

But "LEAVE LINE" doesn't work the same way:

>LEAVE LINE
[Which line do you mean, the short line or the long line?]

>LONG LINE
You get out of the long line.

In other cases where it checks for EXIT and DISEMBARK, it also checks for LEAVE (see BIGTOP-F and LION-CAGE-F). So it should probably do that here too.

eriktorbjorn commented 4 years ago

There's also this bit in GEN-LINE-F for when you're not in either line:

           (<AND <VERB? DISEMBARK>
             <NOT <EQUAL? <LOC ,PROTAGONIST> ,LONG ,SHORT>>>
        ,LONG)
>DISEMBARK LINE
Look around you.

>EXIT LINE
[Which line do you mean, the short line or the long line?]

It should probably check all three actions here as well.