the-infocom-files / zork2

Zork II: The Wizard of Frobozz
8 stars 4 forks source link

Objects can stop glowing even when they're not there #63

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>WAVE WAND AT CARD
The wand grows warm, the card seems to glow dimly with magical essences, and you
feel suffused with power.

>CUT CARD WITH SWORD
Your skillful elvish swordsmanship slices the card into innumerable slivers
which blow away.
The card stops glowing and the power within you weakens.

This does not happen with the alternative syntax:

>RUB CARD WITH WAND
The wand grows warm, the card seems to glow dimly with magical essences, and you
feel suffused with power.

>CUT CARD WITH SWORD
Your skillful elvish swordsmanship slices the card into innumerable slivers
which blow away.

That's because of I-WAND:

     <COND (<AND ,WAND-ON
             <OR <EQUAL? ,WAND-ON-LOC ,HERE>
             <IN? ,WAND-ON ,WINNER>>>
        <TELL
"The " D ,WAND-ON " stops glowing and the power within you weakens." CR>
        <SETG WAND-ON <>>
        <RTRUE>)

That's because WAND-ON-LOC is only set for the first syntax, not the second, as seen in WAND-FCN:

              (<VERB? WAVE>
               <COND (<AND <EQUAL? ,PRSO ,WAND> ,PRSI>
                  <SETG WAND-ON ,PRSI>
                  <SETG WAND-ON-LOC ,HERE>)
                 (T <TELL "At what?" CR> <RTRUE>)>)
              (<VERB? RUB>
               <COND (<AND <EQUAL? ,PRSI ,WAND> ,PRSO>
                  <SETG WAND-ON ,PRSO>)
                 (T <TELL "Touch what?" CR> <RTRUE>)>)

But I don't really see the purpose of WAND-ON-LOC, to be honest.