the-infocom-files / moonmist

Moonmist
4 stars 3 forks source link

"NOD HEAD" behaves strangely #31

Open eriktorbjorn opened 2 years ago

eriktorbjorn commented 2 years ago
After a warm hug, she asks anxiously, "You did read my letter, and not just give
it a hasty glance?"

>NOD HEAD
[I assume you mean: Tamara's head.]
"Then you know about my engagement, and the White Lady, and the fact that...
that someone is trying to kill me!"

No, I'm pretty sure I meant my own head.

I believe this is because there is one global HEAD object, with the following action routine:

<ROUTINE HEAD-F ("AUX" P P2)
 <COND (<NOT <SET P <FIND-BODY ,HEAD>>>
    <RTRUE>)
       (<REMOTE-VERB?>
    <RFALSE>)
       ;(<AND <EQUAL? .P ,PLAYER>
         <NOT <FSET? ,HERE ,WORNBIT>>>
    <NOT-HERE ,MIRROR-GLOBAL ;,HEAD>)
       (<VERB? NOD>
    <PERFORM ,V?YES>
    <RTRUE>)
       (<VERB? SHAKE>
    <PERFORM ,V?NO>
    <RTRUE>)>>

The "[I assume you mean: Tamara's head.]" message is printed by FIND-BODY. Maybe it should check for NOD and SHAKE before calling FIND-BODY, so that these two actions don't ever assume someone else's head?

eriktorbjorn commented 2 years ago

That won't stop you from doing "NOD TAMARA'S HEAD", of course. So maybe NOD and SHAKE should guard against that? Not sure how to do that, though.