the-infocom-files / cutthroats

Cutthroats
3 stars 3 forks source link

Magnet oddities #58

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>LOOK
Crew's Quarters
You are below deck in the crew's quarters. Narrow, uncomfortable bunks line the
bulkheads, and you note the similarity between this area and a sardine can.
Sleeping here is necessary but uninviting. A ladder leads up and out to the fore
deck.

>INVENTORY
You are carrying:
  A portable electromagnet
  The portable electromagnet is touching:
    A portable drill
You have $130 in your pocket.

>TAKE DRILL
The magnet's stronger than you are.

>TOUCH BUNK WITH MAGNET
Fiddling with the bunk isn't notably helpful.

>LOOK
Crew's Quarters
You are below deck in the crew's quarters. Narrow, uncomfortable bunks line the
bulkheads, and you note the similarity between this area and a sardine can.
Sleeping here is necessary but uninviting. A ladder leads up and out to the fore
deck.
There is a portable drill here.

For some reason putting the magnet on or against a surface, or touching the surface with the magnet, will cause anything stuck to the magnet to fall off. See MAGNET-F:

           (<OR <AND <VERB? PUT-ON PUT-AGAINST>
                 <PRSO? ,MAGNET>
             <SET OBJ ,PRSI>>
            <AND <VERB? RUB>
             <PRSI? ,MAGNET>
             <SET OBJ ,PRSO>>>
        <COND (<FSET? .OBJ ,SURFACEBIT>
               <CLEAR-MAGNET>
               <RFALSE>)

The CLEAR-MAGNET moves all the stuck objects to the room. I don't know why the game does this, or why it only does it for surfaces, not containers.

eriktorbjorn commented 4 years ago

The reason the RUB action is included is probably because putting the magnet on/against something and touching something with the magnet are considered to be the same thing. Though in this particular case, the result is strange.

Also, there is a further bug here:

>PUT MAGNET AGAINST DRILL
The magnet is touching the portable drill.

>TOUCH DRILL WITH MAGNET
The magnet is touching the portable electromagnet.

That's because of this code, a bit further down in MAGNET-F:

              (<IN? .OBJ ,PLAYER>
               <TELL "The magnet is touching ">
               <THE? ,PRSI>
               <TELL D ,PRSI "." CR>)

Presumably it should use .OBJ, not ,PRSI here.