the-infocom-files / trinity

Trinity
23 stars 5 forks source link

Calling SAID-CRUMBS? from EBAG doesn't work as intended #80

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

EBAG-F has this, which is apparently there to check if you refer to the empty (or soggy) bag as "crumbs":

<ROUTINE EBAG-F ()
     <COND (<SAID-CRUMBS?>
        <TELL "The crumbs are all gone." CR>
        <RFATAL>)

But it doesn't work. Probably because the first thing SAID-CRUMBS? does is to check if you're carrying the full bag of crumbs (BAG):

<ROUTINE SAID-CRUMBS? ()
     <COND (<NOT <IN? ,BAG ,PLAYER>>
        <RFALSE>)
eriktorbjorn commented 3 years ago

Similarly, the CRUMBS-GONE? routine will only work if you are carrying the bag of crumbs, even though it's clearly meant to work if you are carrying the empty or soggy bag as well:

<ROUTINE CRUMBS-GONE? ()
     <COND (<NOT <SAID-CRUMBS?>>
        <RFALSE>)
           (<PRSO? BAG>
        <TAKE-CRUMBS>
        <RTRUE>)
           (<PRSO? EBAG SOGGY>
        <TELL "The crumbs are all gone." CR>
        <RTRUE>)>
     <RFALSE>>

This routine is called from:

eriktorbjorn commented 3 years ago

The SAID-CRUMBS? routine is called from:

So I guess it should be safe to remove that check from SAID-CRUMBS?? Or did I miss something?