the-infocom-files / enchanter

Enchanter
8 stars 3 forks source link

The game should respond to "PLAY KRILL" #5

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

There is this code in V-PLAY, which seems like a reference to MDL Zork:

<ROUTINE V-PLAY ()
         <COND (<EQUAL? ,PRSO ,KRILL ,GLOBAL-KRILL>
            <TELL
"You are so engrossed in the role of the " D ,PRSO " that
you kill yourself, just as he would have done!" CR>
            <JIGS-UP <>>)
           (T <TELL "How peculiar!" CR>)>>

However, when I try it I get this instead:

>PLAY KRILL
You can't seekrill here.

So not only does it not use the custom response, the default response is buggy as well.

The problem seems to be GLOBAL-KRILL-F, which has a default case for every action it doesn't explicitly handle:

           (T
        <GLOBAL-NOT-HERE-PRINT ,GLOBAL-KRILL>
        <RTRUE>)>> 

So the message seems to be printed by GLOBAL-NOT-HERE-PRINT. I haven't looked any closer at that yet, but it may be worth pointing out that Enchanter is one of the games that has a buggy PRSI-PRINT. See https://github.com/the-infocom-files/deadline/issues/17

I guess the reason it's in V-PLAY is that it's used for both GLOBAL-KRILL and KRILL. But, as I said, it doesn't work. At least not for GLOBAL-KRILL.

eriktorbjorn commented 4 years ago

Other things that use GLOBAL-NOT-HERE-PRINT, with similar results:

eriktorbjorn commented 4 years ago

The turtle messages are a bit trickier to trigger. GLOBAL-TURTLE only becomes a global object after you try to talk to the turtle.

After that, if you try to interact with the turtle when it's not there:

>EXAMINE TURTLE
You can't see anyturtle here.

>TURTLE, HELLO
You can't see any rainbow turtle here.

I've verified that those two messages are printed by the two calls to GLOBAL-NOT-HERE-PRINT, so one of them does work apparently.

I guess it depends on if PRSO-PRINT or PRSI-PRINT can use PRSO / PRSI (well, PRSI-PRINT should almost certainly use PRSI, but it currently uses PRSO) or if it has to fall back on BUFFER-PRINT.

This example probably shows the difference between the two cases:

>KILL KRILL
You can't seekrill here.

>KILL IT
You can't see warlock Krill here.
arcanetrivia commented 3 years ago

I feel like "You can't see warlock Krill here" needs a "the" ("the warlock Krill"). Unless it's meant to be a title, but in that case it ought to be capitalized ("Warlock Krill").