the-infocom-files / starcross

Starcross
5 stars 3 forks source link

You can implicitly take the object under the globe #35

Open eriktorbjorn opened 5 years ago

eriktorbjorn commented 5 years ago
>PUT BLACK ROD UNDER GLOBE
The black rod slides under the globe.

>LOOK
Laboratory
This is a glaringly lit room filled with strange devices, most completely
incomprehensible. For example, a huge projector of some sort points menacingly
at a silvery globe floating in midair in the center of the room. The silvery
globe is the size of a basketball. Beneath the projector is a dial with four
positions.
Lying beneath the globe is a black rod.

>READ BLACK ROD
(Taken)
How can I read a black rod?

>FIND BLACK ROD
You have it.

>LOOK
Laboratory
This is a glaringly lit room filled with strange devices, most completely
incomprehensible. For example, a huge projector of some sort points menacingly
at a silvery globe floating in midair in the center of the room. The silvery
globe is the size of a basketball. Beneath the projector is a dial with four
positions.
Lying beneath the globe is a black rod.

That's because UNDER-GLOBE is cleared by FF-ROOM-FCN handling the TAKE action. Implicit taking bypasses that.

Perhaps it could use M-END to have the room's action routine check each turn if the object is still in the room instead?

eriktorbjorn commented 5 years ago

That is, instead of

           (<AND <==? .RARG ,M-BEG>
             <VERB? TAKE>
             <==? ,PRSO ,UNDER-GLOBE>>
        <SETG UNDER-GLOBE <>>
        <RFALSE>)>>

it could use something like this:

           (<AND <==? .RARG ,M-END>
             ,UNDER-GLOBE
             <NOT <IN? ,UNDER-GLOBE ,HERE>>>
        <SETG UNDER-GLOBE <>>
        <RFALSE>)>>

I've given it a quick try, and it seems to work.

eriktorbjorn commented 5 years ago

I just noticed that there is code in ITAKE that looks like it's meant to handle this bug:

        <COND (<==? ,PRSO ,UNDER-GLOBE>
               <SETG UNDER-GLOBE <>>
               <FCLEAR ,PRSO ,NDESCBIT>)>

However, it's only run in the case where you're carrying so many objects that you fumble and drop them.